Harness Mode
A harness is a delivery process you build once and run again: agents, scripts, questions and approvals as nodes on a canvas. A run goes node by node against the chat's instance and logs what every node did.
Included in paid plans and the trial
Open a harness
In an empty chat, switch Mode to Harness. The left panel becomes the Harnesses list: pick a harness, or press + to create one. The canvas shows the harness you picked, and runs use the instance this chat is connected to. Double-click a name to rename it, drag names to reorder them, and use the ⋯ menu to rename, copy, export, publish or delete a harness.
Build on the canvas
Right-click the canvas to add a node. Drag from one connection point to another to connect two nodes; a run starts at the node that has no arrow coming in. When an arrow leaves a node with several outputs, its label reads ? until you click it and choose the output.
- Agent: a team member, built-in or custom, works on a prompt. Its reply is the node’s result.
- TypeScript / JavaScript: runs code with the run’s results and variables. What it returns is the node’s result.
- User input: asks you for text when the run reaches it. You can drop files on it too.
- Confirm: a Yes / No question with an output for each answer. It can pick an answer by itself after a set time.
- Options: you choose one of several outputs, with an optional default picked after a set time.
- Questions: a script returns a list of questions, and you answer them in one form.
- Open file: shows you a file from disk or from the run, and adds your comments to a run variable.
- Wait: pauses the run for a set time, and can repeat while a condition holds.
- If / else: a condition sends the run down its True or False output.
- Group: nodes inside a node. Double-click a group to open it, add Input and Output nodes inside, and use the breadcrumbs to go back.
Each node's menu can duplicate it, copy it for pasting elsewhere, or make a linked duplicate that mirrors the original: edit the original and every linked copy follows.
Configure a node
Click a node to open its settings on the right. For an agent you choose the team member, optionally a different model, and write the system prompt and the prompt; the arrow icon opens a long prompt in its own window.
Placeholders bring run data into prompts: {{run['Story to deliver'].last}} is the latest result of the node named Story to deliver, and {{name}} is a variable.
- Continue session keeps one conversation with the agent across a run, and a session key splits it, for example one conversation per ticket.
- Skip questions modal keeps the questions an agent asks on its result instead of stopping the run; Auto-reply answers sends your answers back to the same conversation.
- The gear beside the name can cache the response, log the execution, and override the run’s Skip confirmation, Don’t ask me and Headless settings for this node.
In code nodes, run['Node name'].last reads a node's latest result and variables are available by name. setRunVariable, setInstanceVariable and setGlobalVariable store values, readFile reads a file from the run, and console.log writes to the logs.
Run it
- 1
Choose where agents run
Run with switches agent nodes between Local Claude Code, on your own Claude subscription, and the SNcode API. - 2
Press Run
If the harness has properties, you can change their values for this run first. If the last run stopped part-way, SNcode offers to resume it or start from the beginning. - 3
Answer when asked
User input, Confirm, Options, Questions and Open file nodes wait for you, and the gate asks before an agent runs anything on the instance. The status line says what the run is waiting for, and the tab shows when it needs your attention.
- Properties: run variables (yes/no, text or number) that every new run starts with.
- Variables: what the run has stored, by scope. Run variables last for one run, Instance variables stay with the chat’s instance, and Global variables are shared by every run.
- Logs: every step with its timing, prompts, replies, console output and returned value.
- Documents: the files the run produced.
When an agent hits its usage limit, the run shows a countdown and the agent retries by itself once the limit resets.
Next
A harness that works deserves to be shared. Next, export it as a file or publish it to sncode.dev, in Sharing Harnesses.