Agentic AI Masterclass Curated by Arunabh Bhattacharjee
Part VIII - Multi-Agent & Production · Chapter 28
28

Multi-Agent Coordination

Topologies, contracts and protocols — the measured case for multi-agent, the 15× token bill, and the tasks where one agent still wins.

27 min read · Part VIII - Multi-Agent & Production · Updated 9 November 2026

Two illustrative Reference Agent projects used multi-agent designs with different results.

The success was research. “Find every system that reads from the settlement connector, who owns it, and what its change process is” — a task requiring the exploration of forty repositories, three wikis and a service catalogue. Split across six sub-agents, each searching one territory and returning findings, it went from a forty-minute single-agent run that ran out of context to an eight-minute parallel run that did not.

The reversion was reconciliation. Someone split it into a fetcher agent, a comparator agent and a reporter agent. It cost four times as much, took longer, and produced worse answers — because every stage needed context the previous stage had, and passing it between agents lost detail that a single context had held for free.

28.1The honest case, with numbers#

Multi-agent architectures are over-adopted, and the reason is that the argument for them is usually made qualitatively (“specialisation!”) when good quantitative evidence exists on both sides.

Anthropic’s 2025 engineering report described a lead-and-worker research system outperforming its single-agent Claude Opus 4 baseline by a reported 90.2% on an internal research evaluation. It also reported roughly 4× the tokens of chat for agents and 15× for multi-agent systems.1 These are measurements of that system and comparison, not a universal multiplier or a 90.2-percentage-point gain.

The report emphasised broad, parallel research and cautioned about tightly coupled work needing shared context. It did not hold every model choice and token budget constant, so the result does not isolate architecture as the sole cause. The two Reference Agent examples illustrate the same trade-off; your measured baseline decides.

Design Rule

Budget the complete task: lead calls, all workers, verification, synthesis, retries and cancelled work. Measure quality, elapsed time and dollars against a single-agent baseline on identical cases. The published 15×-versus-chat comparison is context, not your capacity plan.

28.2Context isolation is a useful reason to delegate#

The stated justification for multi-agent is usually specialisation — a researcher agent, a writer agent, a reviewer agent, each with its own expertise. Roles alone do not establish a benefit. Different tool permissions, expertise, verification or model choices can justify separate workers, but the boundary must earn its coordination cost.

A single model with a good prompt can be a researcher on one turn and a writer on the next. It does not need a separate identity to change register. Splitting by role creates a context boundary; test whether that improves the work.

One benefit of multi-agent execution is context isolation (Chapter 9). A sub-agent can read ninety files and return three findings. Only those findings enter the parent’s context. A single-agent harness can also externalise documents and retrieve summaries. Delegation adds independently managed contexts and may allow useful work to proceed concurrently.

Goose documents separate subrecipe sessions without shared conversation history, memory or state.3 Hermes starts subagents with a fresh conversation. The parent must pass the goal and context.4 Cline gives each subagent its own instructions and context window. Its tool access depends on mode.6 These documented context boundaries are useful, but do not by themselves prove filesystem, credential or memory isolation.

So the test for whether a task should be multi-agent is not “are there distinct roles” but: would the sub-task pollute the parent’s context with material the parent does not need? Then ask whether the resulting benefit exceeds dispatch, verification and synthesis cost.

28.3Topologies#

1 · ORCHESTRATOR-WORKER — the default lead Lead decomposes, workers explore in parallel, lead synthesises. Clean context per worker. FAILS WHEN: the lead cannot verify what workers return. 2 · PIPELINE — stages with explicit contracts Fixed sequence, each stage an agent. FAILS WHEN: stages need each other's context — the handoffs omit evidence needed by the next stage. 3 · HIERARCHICAL — depth is where it goes wrong Workers that spawn workers. RISK: unbounded depth. Cost can grow multiplicatively; summaries can obscure leaf failures. 4 · BLACKBOARD — shared state, no orchestrator shared state Agents read and write a shared store, no central control. RISK: conflicting writes or stale reads require explicit ownership, concurrency control and conflict resolution. 5 · DEBATE — multiple attempts, then judge Independent attempts, adversarial critique, then a decision. RISK: correlated errors, judge bias and added cost. Measure gain and judge bias; budget all rounds.
Figure 28.1 - Five topologies. Orchestrator-worker is a useful starting pattern; hierarchical depth needs limits; blackboard requires explicit shared-state coordination.

Orchestrator-worker is a useful starting pattern for independent assignments. A lead agent decomposes, workers explore independently with clean contexts, the lead synthesises. It maps directly onto Chapter 6’s delegation preconditions, and its failure mode is the one that matters: if the lead cannot cheaply verify what a worker returns, it has added an unverifiable dependency and lost visibility into it.

Pipeline assigns stages to separate contexts or agents. This helps when stages have different policies, tools or evidence needs, but the handoff must preserve what the next stage requires. Use Chapter 7’s simpler chain when separate identities or contexts add no value.

Hierarchical — workers spawning workers — adds coordination depth that must be justified. Branching can multiply cost, while summaries can obscure failures deep in the tree.

Products apply different depth controls. Hermes supports configurable spawn depth, and goose prohibits nested subrecipes.43 Cline allows children to create further subagents.6 Default to depth one, and make deeper an explicit, argued decision.

Blackboard — agents coordinating through shared state with no orchestrator — is elegant on a whiteboard and produces write conflicts in production. You have built a distributed system whose participants are non-deterministic and whose consistency model is implicit. If you find yourself needing this, you probably need a work queue with leases instead.

Debate — several attempts plus a judge — can improve selected tasks, but correlated errors, judge bias and communication cost can erase the gain. High stakes require independent evidence, not merely agreement. It is Chapter 7’s voting pattern with critique added.

28.4Contracts, not conversations#

A common design error is relying on unbounded free-text conversation as the entire coordination protocol.

Free-text messaging between agents produces four problems at once: unbounded context growth as the conversation accumulates; ambiguity about who is responsible for what; no way to validate what came back; and — the security one from Chapter 21 — an unlabelled channel through which an injected instruction from a poisoned page travels into the parent as a trusted finding.

Use contracts: a typed request and a typed, schema-validated response.

python
@dataclass(frozen=True)
class SubtaskRequest:
    subtask_id: str
    goal: str                       # complete and standalone
    context: str                    # what the parent explicitly passes
    must_return: dict               # JSON Schema for the response
    budget: Budget                  # its OWN, much smaller ceilings
    tools_allowed: tuple[str, ...]  # narrower than the parent's
    autonomy: int = 0               # read-only unless argued otherwise


@dataclass
class SubtaskResult:
    subtask_id: str
    status: Literal["completed", "partial", "failed", "escalated"]
    findings: list[dict]            # schema-validated, not prose
    evidence: list[str]             # citations the parent can check
    trust: str = "untrusted"        # it read the world; propagate that
    usage: Usage = field(default_factory=Usage)

The goal is standalone. Workers start with fresh conversations, so the parent must pass every fact and constraint the assignment requires.

Bound each worker and the whole task. An unattended delegated run needs an explicit limit matched to its assignment. Hermes’ documented default of 500 iterations for a main loop against 50 for a subagent is one documented configuration, not an evidence-based universal ratio.5

Tools are narrower. A sub-agent doing research needs read tools. Giving it the parent’s full capability multiplies your blast radius by the number of sub-agents (Chapter 15).

Autonomy defaults to read-only. Enforce this default through the worker’s tools and execution boundary.

Cline illustrates why a mode label alone is insufficient. Act-mode children can edit files and run commands. Plan mode restricts editing tools and some commands, but commands such as python -c can still write files. Children receive no MCP tools, and approval of spawning covers their subsequent actions.6 A worker limited to reads can still disclose sensitive data or return untrusted material.

The response has a validated structure. This makes structural validation possible. A string inside valid JSON can still carry a malicious instruction; verify claims separately and preserve source trust.

Trust is propagated. A sub-agent that read a web page returns untrusted content. If the parent treats it as its own trusted finding, you have the agent-to-agent injection chain from Chapter 21.

28.5Protocols#

MCP and A2A cross different boundaries:

MCP connects an agent to tools and data — a client-server protocol where servers expose tools, resources and prompts (Chapter 14).

A2A connects an agent to another agent — discovery, task delegation and status across organisational or vendor boundaries, where participants need not expose their internal implementations.7

The distinction is the boundary each crosses. MCP is for capability; A2A is for delegation between systems you do not own or cannot see inside.

The practical guidance for most teams: you probably do not need an inter-agent protocol yet. Within one process, a function call with a contract may suffice. An interoperable protocol can still be useful inside one organisation when runtimes or services differ. The protocol earns its cost when agents cross a trust boundary — a partner’s agent, a vendor’s agent, another business unit’s agent with its own identity and authorisation. At that point you need discovery, capability declaration, and authenticated delegation, and reinventing them is worse than adopting them.

And when you do cross that boundary, Chapter 15’s questions all return, harder: what authority does the remote agent act with, whose identity is it using, what can it reach, and how is its output labelled when it comes back? A remote agent’s response is untrusted content produced by a system you do not control.

28.6Failure modes specific to multi-agent#

The MAST taxonomy was built from a dataset of over 1,600 annotated traces across seven popular multi-agent frameworks, identifying 14 unique failure modes clustered into three categories — system design issues, inter-agent misalignment, and task verification — validated with high inter-annotator agreement (kappa 0.88) on 150 expert-annotated traces.2

System design issues: wrong topology, unclear responsibility or missing termination.

Inter-agent misalignment is the coordination category: agents working from different understandings, dropping information at handoffs, duplicating work, or contradicting each other. Reduced by clear contracts, shared task state and evidence checks; a schema alone does not establish semantic agreement.

Task verification: failing to check the work. A parent reviewing only a worker’s report may accept plausible claims without verifying their underlying evidence.

Three concrete failures worth designing against explicitly.

Error compounding. A worker’s slightly-wrong finding becomes the lead’s confidently-wrong synthesis. The parent had no way to check, so the error gained authority as it moved up. Evidence citations in the result contract are the defence.

Duplicated work. Two workers with overlapping remits both read the same forty files. Pure cost, and invisible without per-worker cost attribution (Chapter 23).

Coordination deadlock. Worker A waits for something worker B is waiting on. A simple defence is to keep worker assignments independent and let the orchestrator sequence dependencies. More general graphs need cycle detection, deadlines and cancellation.

28.7The coverage hole that passed review#

In an illustrative Reference Agent research fan-out, the run looked successful in every trace the team normally inspected. Six workers completed, all six returned valid JSON, none exceeded its time budget, and the lead produced a concise answer with citations. The answer named forty-two services. Two engineers reviewed it and found no fabricated sources.

Three weeks later an owner asked why their settlement relay was absent. The service had not failed retrieval. It had never been assigned.

The original lead had divided the estate by repository group: payments, identity, fulfilment, data, shared infrastructure and archived systems. The workers reported that they had inspected 8, 8, 7, 8, 7 and 8 repositories respectively — 46 repository visits. The service catalogue contained 47 active service identifiers, but repositories were not the same population. Deduplicating the reported repository URLs left 44 distinct repositories. Mapping their findings back to the catalogue accounted for only 42 of the 47 active services. Five services had no disposition at all.

The team had mistaken three different counts for one another:

Quantity Count What it actually proved
Worker-reported repository visits 46 Six workers did work
Distinct repository URLs 44 Two territories overlapped
Catalogue service IDs with findings 42 Evidence existed for 42 services
Active service IDs in the required universe 47 The denominator for an exhaustive answer

All six responses passed schema validation, but their schema described findings rather than coverage. Validating returned rows cannot reveal missing rows without a declared universe of required items.

The fix was not a longer prompt. It was a coordination ledger owned by the lead. Before dispatch, the lead materialised all 47 service IDs and assigned each exactly once. A worker had to return one disposition for every assigned ID: evidence_found, no_evidence, or escalated, plus the artefact identifiers it inspected. The release gate checked the union of dispositions against the original manifest rather than summing worker claims.

On the next run, 45 IDs reached an evidence-backed disposition and two escalated because the catalogue pointed at retired repositories. The lead reported “45 resolved, 2 requiring owner confirmation” rather than “complete”. That answer was less polished and more correct. It also gave the operator a finite queue to close.

This mechanism generalises beyond research. In a migration, the ledger holds accounts. In a codebase sweep, it holds packages or ownership units. In an incident, it holds hypotheses and the evidence required to close each one. The decomposition is not complete until every item in the required universe has exactly one assignment and one terminal disposition. Reconciling only the assignments that were created hides required items that were never assigned. If no stable required universe exists, the lead must state that it sampled or explored; it must not claim exhaustiveness.

The reference harness does not create sub-agents or implement this ledger. AgentLoop._invoke_all parallelises vetted read-only tool calls and executes mutations serially. Worker contracts, coordination records and verification gates are production extensions.

Design Rule

Define the required work universe before you fan out. Every required item needs exactly one assignment and one terminal disposition, and the parent must reconcile the ledger against the original manifest. Six completed workers do not prove that the task is complete.

28.8The cost multiplication#

Source Effect
Each sub-agent has its own system prompt and tool definitions N × the fixed prefix cost
The parent’s context holds the task plus N results Parent context grows with fan-out
Context passed to each worker is duplicated across them Shared background paid N times
Synthesis re-reads all results One expensive final turn
Failed or unhelpful sub-agents still consumed their budget Waste that a single agent would not have incurred

Fan out only where there is genuine parallelism. The first and largest lever. Six workers exploring six disjoint territories is parallelism; three workers doing sequential stages is not.

Use cheaper models for workers. The Anthropic configuration is instructive: a stronger lead with cheaper subagents outperformed a single strong agent.1 Workers doing bounded search do not need the frontier model; the lead synthesising does.

Keep results small, and enforce it. The result contract’s schema is a size limit as well as a shape. A worker returning forty thousand tokens has moved the context problem rather than solved it.

Reuse cacheable prefixes when supported. Eligible reuse depends on provider, model, cache scope, timing and exact prefix identity. Simultaneously dispatched workers may all pay a cold write; do not assume a cache hit merely because the text matches (Chapter 8). This is a substantial and frequently-missed saving on a fan-out.

ANTHROPIC 2025 REPORT — TOKENS RELATIVE TO CHAT chat 1× agent ~4× multi-agent ~15× WHERE THE MULTIPLE COMES FROM N × the fixed prefix — each worker has its own contract and tools The parent’s context holds the task plus N returned results Shared background passed to each worker is paid N times Synthesis re-reads every result in one expensive final turn Unhelpful workers still consumed their full budget WHAT REDUCES IT Fan out only where there is GENUINE parallelism — the largest lever Cheaper models for workers; a strong lead with cheap subagents has been measured beating a single strong agent Enforce small results — the response schema is a size limit too Reuse eligible prefixes; concurrent cold starts may miss the cache. The measurement that settles it Compare verified outcomes, total cost and elapsed time on the same cases. Recheck after model or workload changes.
Figure 28.2 - Where the multiple comes from, and what reduces it. The bottom row is the measurement that settles the architecture argument.
Bounded multi-agent fan-out controlled by a coordination ledger A lead admits a declared universe of work into six independent worker slots. Every required item receives exactly one assignment and one terminal disposition in a central ledger. A verification gate checks coverage, evidence, budget and trust before synthesis. ADMIT Lead agent prove independence reserve cost + time DISPATCH — DEPTH ONE W1 W2 W3 W4 W5 W6 RECORD Coordination ledger assignment · owner · state budget · evidence · trust VERIFY Gate complete? supported? failed gate → ledger THE LEDGER MAKES FOUR INVARIANTS COMPUTABLE Universe coverage every required item has one assignment + disposition unassigned ≠ complete Evidence each claim points to an artefact the lead can check report ≠ proof Resource bounds per-worker and aggregate tokens · time · tool calls reserved ≠ optional Trust untrusted content keeps its label through every hand-off worker ≠ authority Synthesise only after the gate passes
Figure 28.3 - A bounded fan-out. The lead admits independent work, the ledger makes coverage and resource use explicit, and synthesis cannot begin until the verification gate accepts the returned evidence. This is a proposed production extension; the reference Reference Agent remains single-agent.

28.9Price the fan-out before you build it#

“Fifteen times” is a useful warning and an insufficient budget. A production decision needs the actual model mix, the input and output split, and the quality delta on your task. Token counts alone can mislead because a cheap worker token and a lead-model output token do not have the same price.

Take an illustrative Reference Agent research run. The single-agent baseline uses 78,000 input tokens and 6,000 output tokens. The multi-agent design uses a lead planning turn, six workers and a lead synthesis turn:

Stage Instances Input tokens each Output tokens each Total tokens
Lead plans and writes contracts 1 18,000 2,000 20,000
Worker explores one territory 6 26,000 2,000 168,000
Lead verifies and synthesises 1 20,000 4,000 24,000
Multi-agent total 212,000
Single-agent baseline 1 78,000 6,000 84,000

The fan-out uses 212,000 ÷ 84,000 = 2.52 times the tokens of this single-agent baseline. That is not a contradiction of the reported 15× comparison with chat interactions; it is a different denominator. Architecture reviews must name the denominator every time they state a multiple.

Now price the same run. Assume, purely for the worked example, that the strong model costs $5 per million input tokens and $25 per million output tokens. The single-agent run costs (78,000 × $5 + 6,000 × $25) ÷ 1,000,000 = $0.54. The all-strong-model fan-out costs:

Stage Input cost Output cost Stage cost
Lead planning $0.09 $0.05 $0.14
Six workers $0.78 $0.30 $1.08
Lead synthesis $0.10 $0.10 $0.20
Total $0.97 $0.45 $1.42

The incremental cost is $1.42 − $0.54 = $0.88 per task. At 50,000 tasks a month, that architectural choice adds $44,000 before retries, abandoned workers or cache discounts. The multiplication belongs in capacity planning, not in a footnote on a model experiment.

Measure duplicated context separately because it has a direct architectural owner. Suppose 8,000 of each worker’s 26,000 input tokens are the common operating contract, task background and tool definitions. Across six workers, that prefix consumes 6 × 8,000 = 48,000 input tokens — 30.8% of the workers’ 156,000 input tokens. One copy is necessary; the other five add 40,000 tokens. At the illustrative strong-model input price, those extra copies cost $5 × 40,000 ÷ 1,000,000 = $0.20 per run before any cache discount. If each territory truly needs the whole packet, cache it. If it does not, shrink the worker contract. Context isolation does not justify sending every worker the same irrelevant context.

Cheaper workers change the dollar result without changing the token result. If worker input costs $1 per million and output costs $5 per million, each worker costs (26,000 × $1 + 2,000 × $5) ÷ 1,000,000 = $0.036; six cost $0.216. Keeping the strong lead for planning and synthesis brings the run to $0.14 + $0.216 + $0.20 = $0.556 — only 3.0% above the $0.54 baseline, even though the architecture still consumes 2.52 times the tokens. Evaluate the mixed configuration separately; its quality cannot be assumed from its price.

The final test is value. Suppose the all-strong fan-out raises measured task success from 78% to 88% on the same held-out cases. Let V be the value of a successful result and ignore downstream differences for the moment. The fan-out earns its extra cost when:

text
0.88V - $1.42 > 0.78V - $0.54
0.10V > $0.88
V > $8.80

At 50,000 monthly tasks, the ten-point improvement produces 5,000 additional successes for $44,000 — again $8.80 per additional success. For a high-value investigation that prevents hours of engineering work, that can be an easy yes. For a $5 classification task, it is a no even before you price operational complexity. Replace V with avoided loss, labour saved or revenue protected, but write the unit down. A quality percentage without a value model cannot authorise a more expensive architecture.

Reserve the worst case as well as forecasting the mean. If six workers each receive a 30,000-token ceiling, the lead needs capacity for 180,000 worker tokens even if historical use averages 22,000. Admission control must reject or queue a fan-out whose reserved tokens, concurrent tool slots or deadline budget do not fit. Otherwise a burst of individually valid delegations becomes the tenant-wide budget failure Chapter 20 warned about.

28.10Evaluating a multi-agent system#

Evaluate coordination in addition to individual outcomes and trajectories:

Attribute failures to a participant. Which agent’s output was wrong? Without this, a multi-agent failure is a single opaque event and you cannot tell whether to fix the lead’s decomposition or a worker’s search.

Score the decomposition separately. Was the split sensible? A good worker cannot rescue a bad decomposition, and this is the lead’s distinct job.

Score synthesis separately. Given the results the workers returned, was the final answer the right one? This isolates the last step, which is where error compounding surfaces.

Compare against the single-agent baseline, always. This is the one that gets skipped, and it is the only measurement that answers whether the architecture earns its measured overhead. Run the same eval suite with a single agent and with the multi-agent configuration, and compare quality and cost. If quality is equal, you have a cost regression wearing an architecture diagram.

Failure Mode

The most expensive multi-agent failure is architectural drift: a system that became multi-agent one delegation at a time, where nobody ever compared it against a single agent. It costs several times more, is harder to debug, has more failure modes, and may be no better. The single-agent baseline is not a formality — run it quarterly, because the frontier model that could not hold the whole task last year may be able to hold it now.

28.11Measure coordination as its own subsystem#

A multi-agent trace is not one run with extra names attached. It is a causal tree with resource reservations, assignments, deadlines and evidence moving across trust boundaries. If your dashboard collapses that tree into total latency and total cost, it hides the exact questions the architecture introduced.

Start with a trace from an illustrative six-worker Reference Agent fan-out:

Worker Active time Input tokens Output tokens Disposition
W1 3.2 s 20,000 2,000 completed
W2 3.5 s 22,000 2,000 completed
W3 4.1 s 25,000 2,000 completed
W4 4.4 s 26,000 2,000 completed
W5 4.7 s 27,000 2,000 completed
W6 11.8 s 46,000 3,000 completed after budget breach

The worker stage lasted 11.8 seconds because the critical path ends with W6, not when the average worker finishes. The median duration is (4.1 + 4.4) ÷ 2 = 4.25 seconds; W6 adds 7.55 seconds of straggler excess above that median. If lead planning took 1.4 seconds and synthesis took 2.6, the user experienced 1.4 + 11.8 + 2.6 = 15.8 seconds. Summing worker time gives 31.7 seconds, a useful capacity number and a false latency number. Chapter 23’s critical-path rule matters more, not less, when branches run in parallel.

The same trace shows why aggregate budgets are insufficient. Worker input totals 166,000 tokens, and output totals 13,000, so the worker stage consumed 179,000 tokens. That happens to fit an aggregate 180,000-token reservation. W6 still consumed 49,000 total tokens and exceeded its 30,000-total-token ceiling by 19,000. A parent that checks only the aggregate will call the run compliant while one child ignored its contract. Enforce the local ceiling where the worker spends, and let it return partial with the evidence collected so far. The lead can then reassign the remainder, narrow the question or escalate; it cannot silently reinterpret a breached budget as success.

Instrument at least these coordination measures:

Measure Exact calculation Bad value means First response
Required-universe coverage required items with exactly one assignment and one terminal disposition ÷ all items in the declared required universe Missing, duplicated or orphaned work reconcile the manifest, ledger IDs and worker exits
Evidence verification rate claims used in synthesis whose cited artefact the lead checked ÷ all claims used in synthesis The parent is trusting reports narrow the result or add programmatic checks
Overlap rate artefacts inspected by more than one worker ÷ distinct artefacts inspected Decomposition duplicated work redraw territory boundaries; preserve intentional replicas separately
Straggler excess slowest required worker duration − median required worker duration One branch owns user latency split it, cap it or make it non-blocking
Budget conformance workers within every local ceiling ÷ workers started Limits exist only on paper enforce at the spending boundary
Useful fan-out workers whose results affected the verified answer ÷ workers completed Speculative branches consumed cost without value tighten admission or stop losing branches early

Do not optimise these numbers independently. Zero overlap can be wrong when two independent attempts are the point of a debate topology. A short straggler tail can mean workers were stopped before evidence arrived. A 100% useful-fan-out score can be manufactured by citing every worker once. Pair the measures with outcome quality and inspect representative traces, exactly as Chapter 24 requires.

Set gates on invariants and targets on economics. Required-universe coverage should be 100% before an exhaustive claim, with exactly one assignment and one terminal disposition per required item. Every claim used in a high-risk decision should have verifiable evidence. A local budget breach should be impossible, not merely rare. By contrast, overlap and useful fan-out have no universal threshold; baseline them by task family and compare changes against quality. The difference is whether the measure protects correctness or describes an optimisation trade-off.

Tracing must preserve causality across the thread boundary. The reference Reference Agent demonstrates the smaller version: _invoke_all copies the active context into each read-only worker thread so tool spans remain children of the tools.parallel span. A production sub-agent runtime needs the same invariant across a larger boundary: lead run ID, subtask ID, assignment ID and parent span context on every request and result. Without those identities, the trace becomes several plausible stories rather than one causal record.

Cancellation is a protocol, not a signal#

The straggler branch creates one more coordination problem: what happens when the lead stops waiting? A timeout in the parent does not prove that the worker stopped. It proves only that the parent stopped listening. The worker may still be reading tools, consuming tokens and preparing a result that will arrive after the lead has reassigned its territory.

Return to W6. At six seconds the lead decides that the branch has exceeded its latency allowance and dispatches W7 over the same assignment. W6 finally returns at 11.8 seconds; W7 returns at 12.4. If the ledger accepts both, the synthesis contains duplicate or contradictory findings. If it accepts whichever arrived first, timing has become the conflict-resolution policy. If W6 used mutating tools, “ignore the late result” would be worse: the effect would remain even when the message did not.

Give every assignment a lease generation. The first dispatch is (assignment=service-map, generation=1). Reassignment increments the generation to 2. A result must carry both values, and the ledger accepts it into the active slot only when they match the current lease. W6’s generation-1 result remains in the trace as late; it cannot silently overwrite W7. Preserve it because it still explains resource use and may contain evidence worth inspecting. Do not let it change the synthesised state automatically.

Cancellation itself needs three separate events:

  1. cancellation_requested records the lead’s decision and reason.
  2. cancellation_acknowledged proves the worker received the request.
  3. worker_stopped proves the worker reached a terminal boundary and records its final usage.

Collapsing those into cancelled invents certainty. A missing acknowledgement means the worker may be unreachable; an acknowledgement without a stop means it may be inside a tool call that cannot be interrupted. Track cancellation drain time from request to stop, and include work consumed after the request in orphan spend. Those two measures tell you whether timeouts actually release capacity.

Design worker tools around that reality. Read-only exploration can check a cancellation token between calls and safely return partial. A mutation already submitted to an external system cannot be cancelled by changing a ledger row. It needs the recovery and reconciliation protocol from Chapter 22, plus the stable action identity from Chapter 5. This is another reason read-only workers are the right default: cancellation can bound computation, but it cannot reverse an effect.

Deadlines also need slack for the parent. If the user-facing deadline is 20 seconds and verification plus synthesis has measured p95 latency of 3.5 seconds, workers do not own 20 seconds; their latest acceptable completion is 16.5 seconds. Reserve that 3.5-second tail at admission. Otherwise every worker can meet its individual deadline and the system can still miss the user’s.

The operational invariant is simple: one live lease per assignment, one accepted terminal result per lease, and no claim that work stopped without a stop event. With those fields, reassignment is deterministic, late results are auditable and the budget report includes work the user never saw. Without them, a timeout merely moves uncertainty from the critical path into the background.

Finally, record why a worker stopped. completed, partial, failed and escalated are different evidence states. A deadline that returns a fluent partial report must not be counted as completion because the text looks finished. The coordination ledger in Figure 28.3 exists to keep that distinction durable through synthesis.

28.12When one agent wins#

Prefer a single agent in six situations:

The task fits in one context and has no measured decomposition benefit. A single context avoids handoff overhead; parallel speedup or independently checked expertise can still justify delegation.

Stages need each other’s context. The reconciliation reversion. Sequential dependency is the anti-pattern the published guidance names explicitly.

Latency matters more than breadth. Spawning and synthesising adds turns. Chapter 18’s voice budget cannot absorb it.

The task is cheap. 15× a small number is still a small number, but so is the benefit, and you have added failure modes for nothing.

You cannot verify worker output. Without cheap verification you have added unverifiable dependencies — the orchestrator-worker failure mode.

Observability is incomplete. Establish per-agent traces, costs and failure attribution before adding workers.

The delegation decision

Five questions to answer. Require a concrete benefit from parallelism, context isolation or independent verification, plus bounded cost and checkable results.

  1. Is there genuine parallelism? Disjoint sub-tasks that do not need each other’s intermediate state.
  2. Does context isolation help? Even work that fits may benefit, but measure it.
  3. Are worker results compact? A schema-bounded response, not a transcript.
  4. Can the parent verify results cheaply? Evidence citations it can check, or a programmatic check.
  5. Is the task valuable enough to justify the multiple? The published principle, stated plainly: the value has to cover the cost.

And three defaults to adopt with it: depth one unless argued otherwise, read-only workers unless argued otherwise, and worker budgets reserved within the parent’s total. Choose each ceiling from task risk and measured need, including the lead’s verification and synthesis costs.

Definition

Context isolation — the property that a sub-agent’s exploration does not enter the parent’s context, one reason to use multi-agent architectures.

Contract — a typed request and schema-validated response between agents, replacing free-text conversation.

Error compounding — a worker’s small error becoming the orchestrator’s confident conclusion, because the orchestrator verified a report rather than the work.

Key Takeaways

  • Multi-agent systems have been measured at roughly 15× the tokens of a chat interaction, against a reported 90.2% improvement on a research eval for the right task shape. Both describe that historical system; neither predicts your deployment without evaluation.
  • The published guidance is specific and reliable: multi-agent for heavy parallelisation, information exceeding one context window, and many complex tools — not for tasks needing shared context or with many inter-agent dependencies.
  • Context isolation, parallel work and independently checked expertise can justify delegation. A single-agent harness can also externalise documents; compare the full designs.
  • Orchestrator-worker is the default that works. Pipeline is usually a chain in disguise. Bound hierarchical depth — start at one unless evidence justifies more. Blackboard is distributed consensus with a probabilistic proposer.
  • Replace conversations with contracts: standalone goals, own smaller budgets, narrower tools, read-only by default, schema-validated responses with evidence citations, and propagated trust labels.
  • MCP connects an agent to tools; A2A connects an agent to another agent across a trust boundary. Inside one process, a function contract may suffice; cross-service interoperability can justify a protocol.
  • MAST gives 14 failure modes in three categories from 1,600+ traces across seven frameworks. Clear contracts reduce inter-agent misalignment; task verification is the category that recurs everywhere and is worse here, because the parent verifies a report rather than the work.
  • Always run the single-agent baseline, and re-run it quarterly. Equal quality at several times the cost is a regression wearing an architecture diagram.
  • Reconcile assignments against a declared work universe. Completed workers prove that workers stopped, not that every required item received a disposition.
  • Price the measured model mix, not token counts alone. In the worked example, cheaper workers reduced a 2.52× token architecture to only 3.0% more dollars, but that mixed configuration still needs its own quality evaluation.
  • Treat coordination as an observable subsystem: preserve parent-child trace identity, enforce budgets per worker, and gate exhaustive claims on complete required-universe coverage and verified evidence.

Hands-on

Justify your fan-out 1. For every delegation in your system, answer the five decision questions. Any that fails on parallelism or context pressure is a candidate for collapsing back into one agent. 2. Run your eval suite single-agent and multi-agent on the same cases and compare quality and cost. If you have never done this, it is the most valuable measurement in this chapter. 3. Replace one free-text sub-agent interface with a typed contract — standalone goal, response schema, evidence citations, own budget. Measure whether result quality changes; usually it improves, because the parent was forced to state what it wanted. 4. Check your worker budgets and tool sets against the parent’s. If they match, compute your worst case with maximum fan-out. 5. Check whether a sub-agent’s report is labelled untrusted when it read external content. If it is not, trace the path an injected instruction would take into the parent — it is shorter than you expect. 6. Build a coordination ledger for one fan-out. Declare the work universe, assign each item once, and require a terminal disposition before the parent may claim completeness. 7. Price one real run by stage and model tier, then calculate the minimum value per additional success. If you cannot name the unit of value, the architecture has not been justified. 8. From one trace, calculate required-universe coverage, evidence verification, overlap, straggler excess and budget conformance. Inspect the branch that controls the critical path rather than averaging it away.


  1. How we built our multi-agent research system. Anthropic Engineering. https://www.anthropic.com/engineering/multi-agent-research-system ↩↩

  2. Cemri, M. et al. Why Do Multi-Agent LLM Systems Fail? arXiv:2503.13657. https://arxiv.org/abs/2503.13657 ↩

  3. Subrecipes — goose. Agentic AI Foundation. https://goose-docs.ai/docs/guides/recipes/subrecipes ↩↩

  4. Delegation — Hermes Agent user guide. Nous Research. https://hermes-agent.nousresearch.com/docs/user-guide/features/delegation ↩↩

  5. Agent loop — Hermes Agent developer guide. https://hermes-agent.nousresearch.com/docs/developer-guide/agent-loop ↩

  6. Subagents — Cline. Mode-dependent tools, nested delegation and approval scope. Documentation checked 2026-11-09. https://docs.cline.bot/features/subagents ↩↩↩

  7. A2A Protocol specification. Agent discovery, task states, cancellation and authorisation; reviewed 2026-09-08. Pin the protocol version supported by both endpoints. https://a2a-protocol.org/latest/specification/ ↩