Skip to content

Subagent dispatch

When the parent agent spawns named helpers.

13 min

A single agent that tries to do everything becomes a runaway. It drifts between tasks, forgets its scope, and spends the user's budget in places nobody asked it to go. The discipline that stops this is structural: spawn named subagents with narrow scopes, specific models, and their own budgets. The dispatch surface makes the hierarchy visible so the user can intervene at the right altitude.

A good subagent dispatch reads like a well-run kitchen. The head chef coordinates; the stations execute; everyone knows what they're on and what they're not.

"A good agent delegates. A great interface shows the delegation."
The pattern

Tree, not log.

Subagent dispatch is an indented tree, not a flat log. The parent sits at the top with its single scope-of-work. Each child sits one level in, with its own scope, model, and budget. Grandchildren, when the parent spawns workers that spawn workers, sit one level deeper.

Each row carries three pieces of information: what the subagent is doing, which model it's running on, and how much of its budget remains. The user should be able to cancel any subtree — cancel a single child, cancel the parent and all descendants — in one click.

Four subagents, one parent
Each child has its own scope, model, and cap. Promote to keep.
Parent · compose a 3-section memo
  • draft · section 1running
    scope · prosemodel · midcap · $0.02
  • draft · section 2running
    scope · prosemodel · midcap · $0.02
  • fact-check · citationsrunning
    scope · retrieval + modelmodel · procap · $0.05
  • style · final passqueued
    scope · rewrite onlymodel · midcap · $0.01

Each subagent has its own scope, model, and cap. Parent cancels unwind partial state.

The why

Scope is the unit of safety.

An agent's scope is the contract the user reads first. A subagent with the scope "draft section 1 prose only" is a subagent that can't accidentally start filing pull requests. A subagent with the scope "fact-check citations" can't rewrite the body. The scope, visible in the tree, is the primary affordance.

Budgets compose the same way. Each child has a cap. The parent's cap is the sum (or less). A runaway child hits its own wall before it hits the parent's.

Three moves

The dispatch I'd ship.

  • One sentence per subagent. The scope should fit in a line. If it doesn't, the subagent is doing too much and should be split further.
  • Cancel-all cleans partial state. Canceling a parent must also unwind the children's uncommitted work. A subagent that quietly leaves an artifact half-written is a subagent that will confuse the user later.
  • Promotion is conscious. When subagents produce competing results, the user should pick which one to promote. Do not auto-merge.

The trap

Phantom children.

The hardest failure to detect is a subagent that's doing something the parent didn't ask for — because a prompt injection in a retrieved document told it to. A good dispatch surface makes this class of attack visible: if a child's scope doesn't match its parent's request, flag it.

The tree is the audit log. Treat it like one.

Failure modes

What this pattern gets wrong when it gets wrong.

Runaway agent
An agent that loops, spends, or edits past the user's intent with no visible cap.
Phantom tool
A visible tool call that didn't happen, or happened but with different arguments than shown.
Orphaned task
A task that was started, never completed, and is no longer visible in the interface, even though compute may still be running.
Seen in the wild

Three shipping variants worth copying.

  • An indented tree where each child shows scope, model, budget
  • A parent-level 'cancel all children' that also unwinds partial state
  • A merge-results affordance where the user picks which subagent to promote