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?
Research contents
- Understand the problem
- The methods
- Measure it
- Decide and avoid
- Act on it
- Reference
Reference
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
The composability test#
Apply it before delegating. Four questions; a "no" to any one means do not parallelise. See composability.
- 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.
- 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.
- 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.
- 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:
- The "notable observations outside scope" field from chapter 3's M-9. Cheap, and it recovers a surprising amount.
- Return
file:linepointers instead of conclusions, so the parent can re-derive cheaply. - 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
| 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
View data
| Boundary | Control (0 = none, 3 = full) |
|---|---|
| Session reset with a handoff note | 3 |
| Sub-agent return with a schema | 2 |
| Compaction | 1 |
| Context eviction policy | 0 |
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:
- Make the boundary explicit. A boundary you did not design, such as an eviction firing mid-task, is one you cannot reason about.
- Write the contract before crossing. Before delegating or resetting, write down what must survive. Writing it changes what you do.
- Pointers cross better than prose.
file:linesurvives compression, paraphrase and re-reading. A description of what is at that line does not. - Verification claims must carry their method. "Tests pass" cannot be checked later. "
pytest tests/checkout -q→ 47 passed, at commita3f9c1" can. - 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#
## 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
- Delegate read-mostly, additive work. Never delegate interlocking implementation or debugging.
- If you cannot write the output schema in 20 lines, the work is not isolatable.
- Isolation shrinks the parent's context and grows total spend.
- 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.