Quad Harness
0.2.0Download

Docs The agent

Subagents and sessions

Split work with subagents, workflows and hand-offs to sub-sessions, see them nested in the Sessions window, and learn the rules every child session follows.

5 min read

One agent in one conversation is not always the best shape for a task. Quad Harness gives you three ways to split work:

Subagent Workflow Hand-off
Who starts it The agent The agent You or the agent
Runs Inside the current turn Inside the current turn, many at once In the background, on its own
The parent waits Yes, for the answer Yes, for all answers No
Result The child’s final text comes back to the parent All answers come back together A new session you can open and continue
Shows as A sub-session of the parent Sub-sessions of the parent A sub-session of the parent

All three need the Subagents and workflows feature.

Subagents

The agent calls its subagent tool to give a self-contained task to a child agent with its own, fresh context. The child works, and its final answer comes back as the tool result. This keeps a long investigation (reading thirty files to find where a value is set, say) out of the main conversation’s context.

A subagent can be a named agent: the agent passes the name, and the child runs with that file’s instructions and only its listed tools.

You can ask for this directly:

Use a subagent to find every place the parser's error type is constructed, then summarise the patterns.

Workflows

The workflow tool runs many subagents as one job and waits for all of them:

  • Parallel tasks: a list of named tasks run at the same time. By default four run at once, at most eight.
  • Stages: lists of tasks run one stage after another. A task in a later stage can use {{previous}} to get the earlier stage’s answers.

For example, “review this change three ways” can become three parallel reviewers (correctness, tests, naming) whose answers are merged.

On a Mac that is short of memory, the app runs fewer at once: two when strained, one when critical. See Running on a small Mac.

Hand-offs and sub-sessions

A hand-off moves a piece of work out of the current session into a new sub-session that carries the task over. Unlike a subagent, it does not block: the parent carries on, and the child runs on its own.

Hand off yourself

  1. Open the session’s menu in the Sessions window and choose Hand off to new session…, or choose Hand off to new session… in the command palette.
  2. In the dialog:
    • Title for the new session.
    • Brief: what the child should do. It is filled in from the session’s goal if there is one, otherwise from the agent’s last reply.
    • Context: Brief only starts fresh with only the brief. Include the conversation so far copies the parent’s history up to its last finished turn and adds the brief at the end.
    • Start now: run the child’s first turn at once, in the background.
  3. Confirm. The new session is selected.

The dialog warns you when other sub-sessions of the same parent are already running, since they may edit the same files.

Tip. Select text in the conversation and choose Side chat to open the hand-off dialog with that text, for a quick tangent that should not clutter the main thread.

The agent hands off

The agent has a handoff tool for work that is independent of what it is doing. It creates the child, starts its first turn in the background and returns the child’s id. It is offered to top-level sessions, not to subagents.

What you see

  • In the Sessions window, sessions form a tree. A parent row has a chevron and a badge counting its sub-sessions at any depth. The badge uses the accent colour while any of them is running or needs approval.
  • A branch is folded while it is idle and opens by itself while a descendant is running, waiting for approval, or open. If you fold or open it by hand, it stays that way.
  • A dot shows each row’s own state: running, waiting for approval, stopped or failed.
  • The child’s conversation header says Handed off from, Forked from or Run as a subagent of, with a link back to the parent.
  • The Agents window shows a tile for each subagent and sub-session (and each background command) with what it is doing and whether it needs approval. With two or more, you can compare them side by side and open the one you want to continue.

A child that runs in the background asks for approvals like any session. Open it from the Sessions window to answer.

The rules every child follows

  • Never more permissive than its parent. A child takes the parent’s permission mode: a Plan-mode parent’s child cannot write, and a Standard-mode child asks for its approvals. You can raise a child’s mode yourself afterwards. Raising the parent later does not raise children already made.
  • Same setting. Workspace, model, hooks and MCP servers are the parent’s.
  • Independent. Stopping the parent does not stop a handed-off child, and does not refuse the child’s pending approvals. (Stopping the parent does stop its subagents, which share its turn.)
  • Bounded. At most four handed-off children may be running at once per parent, and sessions nest at most eight levels deep. The app says so when a limit is hit.
  • Deleting is safe. Deleting a parent moves its children up to the grandparent (or the top level) rather than deleting them. The delete dialog offers this one only or with its sub-sessions. The second deletes nothing if any of them is running.

Creating a sub-session is not a change to your files, so the handoff tool is allowed in every mode and never asks. What the child then does is governed by its own mode.

Forks

A fork copies a session up to a point into a new session, linked as a sub-session:

  • Fork from this reply on one of the agent’s replies.
  • Branch from here in the Rewind window.

Worktrees for parallel work

Sub-sessions share the parent’s folder. Two sessions editing the same files can collide, exactly as two people would. When you want an attempt that cannot disturb anything:

  1. Start a new session (⌘N).
  2. Choose the folder, then A new worktree of the folder.

The session works in its own checkout under the app’s data folder, on a branch named quad/<name>. Review and commit there, then merge the branch the usual way.

Note. The Agents window has a Best of 3 card for running one task three times in separate worktrees and picking the best. It is not available yet; the card says so. Use hand-offs to try a second approach alongside and compare them in the Agents window.