Part II · The methodsChapter 7

Sub-agents and isolation

The question When does splitting work across sub-agents help, when does it destroy the task, and how can you tell in advance?

8 min read Deep dive Step 7 of 20 5/6 in this part

In 30 seconds

  • Two credible teams published opposite conclusions. Both are right, on different kinds of work.
  • Sub-agents are safe when their outputs combine without negotiation, and dangerous when they do not.
  • For coding, the default is one linear thread with disposable read-only scouts.

You will be able to

  • Apply the four-question composability test before delegating
  • Choose a topology for a given task
  • Write a sub-agent contract that limits contract loss
  • Rank context boundaries by how much control you have over what crosses them

The disagreement, stated fairly#

In June 2025 two credible teams published opposite conclusions, one day apart. Most writing since has picked a side instead of finding the axis that separates them.

Position A: Cognition, "Don't Build Multi-Agents" Position B: Anthropic, multi-agent research system
Claim Share full context and full traces, not messages. Actions carry implicit decisions, and conflicting decisions produce bad results P. A lead agent plans and spawns 3–5 parallel sub-agents, then synthesises. Delegation is essential for scaling this kind of task P.
Evidence A Flappy Bird clone split across sub-agents. One produced a Super Mario–style background; another produced a bird that neither looked nor moved like the target P. Beat single-agent Claude Opus 4 by 90.2% on an internal research evaluation P.
Prescription Single-threaded linear agents with continuous context Orchestrator with parallel workers

Both are correct, and treating this as a matter of taste is the mistake.

Research is additive: two agents finding two facts gives you two facts, and "union" is the way to combine them. Implementation is interlocking: two agents building two components must agree on a hundred unstated conventions, such as error shapes, naming, null handling, logging and what a return value means. Each is an implicit decision, made independently, and independent decisions do not compose.

This is a property of the work, not of the architecture. That is why the argument cannot be settled in general and is easy to settle for a given task.

Delegation depends on the shape of the work

Read-mostly additive work such as search, surveys and triage is safe to delegate. Work that writes interlocking artifacts, such as shared interfaces, is not. READ-MOSTLY · ADDITIVE Safe to delegate ✓ find all callers of a symbol ✓ survey how a pattern is used ✓ triage 40 failing tests into buckets ✓ audit dependencies for a CVE ✓ extract the error pattern from a huge log combine by: union, concatenate, max WRITES INTERLOCKING ARTIFACTS Keep in one thread ✗ two endpoints sharing an error format ✗ a schema and the code that uses it ✗ "build the feature", split three ways ✗ debugging (the ruled-out ideas die) ~ tests for a stable module: cautiously combine by: negotiation (impossible) You can apply this rule in ten seconds, before spending a single token.
Figure 1. Everything on the left reads and adds up. Everything on the right writes pieces that must fit together. That one distinction resolves the public disagreement.

The composability test#

Apply it before delegating. Four questions; a "no" to any one means do not parallelise. See composability.

  1. Is the way to combine the outputs trivial? Can you say in one sentence how they merge: "concatenate the findings", "union the file lists", "take the most severe result"? If combining needs judgment, you have not delegated work. You have deferred an integration problem and made it harder, because the reasoning behind each part is gone.
  2. Can you write the output schema in under 20 lines? If the result needs prose to explain itself, the sub-agent held something the schema cannot carry, and the parent will need it.
  3. Are the implicit decisions already fixed? List what the sub-agent must decide that is not in its brief. For a search task: nothing. For "implement the retry logic": backoff strategy, jitter, maximum attempts, which errors are retryable, logging, metric names, where config lives. That is seven decisions another agent might make differently. Fix them in the brief or do not delegate. A brief that fixes all seven is dictation, and you have done the thinking anyway. That is not failure. It is recognising that the thinking was the work.
  4. Can the parent verify the result without redoing it? "Return the file and line where X is defined" takes one read to check. "Return a refactored module" takes a review as careful as writing it. Unverifiable delegation moves work; it does not remove it.
Work Q1 Q2 Q3 Q4 Delegate?
Find callers, surveys, test triage, CVE audit, log extraction — the figure's safe panel Yes
Review a diff against a checklist ~ Yes, with spot checks
Apply one fully specified mechanical change to 30 files Yes
Write tests for a stable module ~ ~ ~ Cautiously
Implement two endpoints that share an error format No
Design a schema and the code that uses it No
"Build the feature", split three ways No: the documented failure P

What isolation buys, and what it costs#

The benefit is real and specific#

Isolation turns a large intermediate context into a small result. A survey that reads 45K tokens and concludes in 350 tokens returns under 1% of its context to the parent — chapter 3's M-9 numbers: about 9K total tokens isolated versus 15K accumulating P.

The parent's context stays clean and dense. It never sees the 40 files that turned out to be irrelevant, so they never become distractors for the rest of the session. The benefit is the dilution avoided, not only the tokens saved.

The cost is larger than usually reported#

Cost Size Note
Prefix tax per sub-agent 10K–40K each Segments 1–4 are paid again for every agent
Total token multiplier About 15× a chat for full multi-agent; about 4× for single agents P The cost side of the 90.2% internal-eval gain; usually quoted alone
How much raw spend explains Token usage alone explained about 80% of performance variance P Read this carefully: the gain it explains is the 90.2% research-eval result
Contract loss Unbounded The sub-agent knew things it did not report
Latency Sometimes better (parallel), often worse (round trips)
Debuggability Much worse Failures spread across transcripts you must correlate

The 80% figure deserves a moment. If spend explains most of the gain, the architecture is largely a way of spending more tokens productively. The real question becomes whether the same spend used differently (more attempts, a better model, longer single-agent runs) would buy as much. For research tasks, apparently not: parallel exploration genuinely helps. For coding, which is more sequential and interlocking, there is no comparable published result. Do not import the research finding into your coding agent without testing it.

Contract loss#

Contract loss is the failure the parent cannot fix on its own. The sub-agent read a file that revealed the real cause and returned only what was asked. The parent cannot know what it was not told, and when the sub-agent ends, its context is gone.

Mitigations, most effective last:

  1. The "notable observations outside scope" field from chapter 3's M-9. Cheap, and it recovers a surprising amount.
  2. Return file:line pointers instead of conclusions, so the parent can re-derive cheaply.
  3. Save the sub-agent's transcript to a file and give the parent the path. This turns contract loss into offload: the parent can read it if the summary is not enough. It is the best available answer and rarely done.

Five topologies#

Ordered from least to most isolation.

Topologies for coding agents

Five topologies: single linear agent, linear agent with disposable scouts, orchestrator with parallel workers, sequential relay, and persistent specialists. T-1 Single linear interlocking work, debugging T-2 · DEFAULT Linear + scouts most coding work T-3 Orchestrator additive research T-4 Relay clean phases, written handoffs T-5 · AVOID Persistent specialists max interlock, max split more isolation →
Figure 2. For coding, T-2 keeps every decision in one thread (satisfying Position A) while isolating the expensive reading (capturing Position B's benefit). T-5 is listed only because it is proposed so often.
Topology Best for Fails when
T-1 Single linear agent Implementation, debugging, anything with interlocking decisions The task truly exceeds one context and cannot be split in sequence
T-2 Linear agent with disposable scouts (recommended default) Most serious coding work in a large repository Scout contracts are so narrow that the main thread redoes the work
T-3 Orchestrator with parallel workers Additive, exploratory work: research, broad audits, multi-repository surveys Applied to interlocking implementation: the Flappy Bird failure P. Budget explicitly for the synthesis step
T-4 Sequential relay Long tasks with clean phases: investigate → plan → implement → verify The handoff is thin. It depends entirely on the plan file and handoff quality
T-5 Persistent specialists ("frontend agent", "database agent") Very little in coding Always: it maximises interlocking decisions and context separation. Each specialist drifts its own model of the shared interfaces

The boundary problem#

Every isolation boundary is a lossy channel. What crosses it is what survives. The four kinds of boundary differ in how much control you have.

How much control you have over what crosses each boundary

Session reset: full control. Sub-agent return: high. Compaction: low. Eviction: none.0123Session reset with a handoff note3Sub-agent return with a schema2Compaction1Context eviction policy0
Figure 3. You write a handoff note yourself. You specify a sub-agent's schema. You can only hope a summariser follows yours, and its output varies run to run D. An eviction policy firing mid-task gives you no control at all. Illustrative ordinal, not a measured scale D.
View data
BoundaryControl (0 = none, 3 = full)
Session reset with a handoff note3
Sub-agent return with a schema2
Compaction1
Context eviction policy0

This ranking is a strong, under-appreciated reason to prefer resets over compaction that has nothing to do with tokens: with a reset you author what survives.

Five principles for designing boundaries:

  1. Make the boundary explicit. A boundary you did not design, such as an eviction firing mid-task, is one you cannot reason about.
  2. Write the contract before crossing. Before delegating or resetting, write down what must survive. Writing it changes what you do.
  3. Pointers cross better than prose. file:line survives compression, paraphrase and re-reading. A description of what is at that line does not.
  4. Verification claims must carry their method. "Tests pass" cannot be checked later. "pytest tests/checkout -q → 47 passed, at commit a3f9c1" can.
  5. Cross once. Every extra boundary compounds loss. Two compactions, a delegation and a reset put the original task statement through four lossy channels.

The sub-agent contract#

subagent-contract.md
## Task
<one sentence>

## Scope
In:  <paths, modules, the question>
Out: <explicitly out of scope>

## Tools available
<the minimum set; narrow tool sets are the main quality lever>

## Fixed decisions (do not re-decide)
- <any convention the parent has already chosen>

## Output schema
findings:
  - path: <file:line>
    what: <one line>
    confidence: high|medium|low
notable_outside_scope:      # the contract-loss mitigation
  - <anything surprising you saw>
transcript_path: <written on exit, so the parent can recall it>

## Limits
max_result_tokens: 1500
max_turns: 25

Three fields do the heavy lifting. Fixed decisions prevent implicit-decision conflicts. notable_outside_scope recovers contract loss. transcript_path turns contract loss into offload. The version with a pre-check is in the templates appendix.

When not to isolate#

  • The task fits comfortably in one context. All overhead, no benefit.
  • The work interlocks. Question 3 says no.
  • You cannot verify the result cheaply. You have moved work, not removed it.
  • Cost is your binding constraint. Isolation raises total spend by design.
  • You are debugging. Debugging is a chain of dependent inferences. Splitting it breaks the chain, and the sub-agent's dead ends, the most valuable part of a debugging trace, die with it.
  • The task is short. Under about 20 turns, the prefix tax dominates.

The last two are the ones people get wrong most often.

Measuring isolation#

Metric Formula Healthy Detects
Isolation ratio Sub-agent tokens ÷ result tokens returned Over 20:1 Whether isolation earns its keep
Parent growth per delegation Change in parent tokens Under 2K Results that are too verbose
Redo rate Delegations the parent redid ÷ delegations Under 0.1 Contracts that are too narrow
Conflict rate Delegations with incompatible outputs About 0 Non-composable work was delegated
Total-token multiplier Total tokens ÷ single-agent baseline Depends Whether you bought the 15× without the 90.2%-class gain P
Outside-scope yield Notable observations that mattered ÷ delegations Over 0.1 Value of the contract-loss field

The redo rate is the most diagnostic. A high value means you pay the full cost of isolation for a fraction of the benefit, and you can measure it by reading five transcripts.

Key takeaways

  1. Delegate read-mostly, additive work. Never delegate interlocking implementation or debugging.
  2. If you cannot write the output schema in 20 lines, the work is not isolatable.
  3. Isolation shrinks the parent's context and grows total spend.
  4. A reset with a written handoff gives you more control than any compaction.

Terms used in this chapter

  • Sub-agent — A separate agent with its own fresh context, given a bounded task and returning a result to a parent agent.
  • Composability — The property that makes delegation safe: sub-agent outputs combine without negotiation.
  • Isolation — Splitting context across boundaries such as sub-agents or sessions. It shrinks the parent's context at the expense of total spend.
  • Contract loss — A sub-agent knew something relevant but did not report it because its output contract did not ask.