CONCEPT Merging is the coordinator's final act
After specialists return their outputs (whether from a fan-out or a pipeline), someone has to turn several partial answers into one coherent result. That's the coordinator's merge job: it aggregates the specialist outputs, synthesizes them into a single answer, and resolves conflicts when specialists disagree. Because sub-agents are context-isolated (4.4), only the coordinator sees all the results — so merging can only happen there.
| Sub-step | What the coordinator does |
|---|---|
| Aggregate | Collect every specialist's output into one place |
| Synthesize | Weave them into a unified, coherent answer (not a concatenation) |
| Resolve conflicts | When specialists disagree, decide which to trust / how to reconcile |
CONCEPT Conflict resolution strategies
- Authority / role: trust the specialist whose domain owns the fact.
- Evidence: prefer the output backed by stronger sources or tool results.
- Consensus: where multiple specialists agree, weight that higher.
- Escalate: if unresolved and stakes are high, surface to a human (see 3.6).
DIAGRAM Aggregate → synthesize → resolve
(coordinator)"] S2["🔵 Specialist B output"] --> AGG S3["🔵 Specialist C output"] --> AGG AGG --> CONF{"Conflicts?"} CONF -->|no| SYN["🟣 Synthesize
one coherent answer"] CONF -->|yes| RES["⚖️ Resolve
authority · evidence · consensus"] RES --> SYN SYN --> OUT(["✔ Final merged answer"]) classDef b fill:#d1ecf1,stroke:#17a2b8,color:#0c5460; classDef p fill:#e2d4f0,stroke:#764ba2,color:#3d1a5b; classDef g fill:#d4edda,stroke:#28a745,color:#155724; class S1 b; class S2 b; class S3 b; class SYN p; class OUT g;
CODE Merge specialist results with an LLM synthesis pass
Aggregate the isolated outputs, then give the coordinator model an explicit synthesis + conflict-resolution instruction.
# `results` = outputs collected from the (parallel or sequential) specialists. results = { "market": market_agent_output, "technical": tech_agent_output, "financial": finance_agent_output, } import json merge_prompt = ( "You are the coordinator. Synthesize the specialist outputs below into ONE " "coherent recommendation. Where they disagree, resolve the conflict and state " "which specialist you trusted and why. Do not just concatenate.\n\n" f"{json.dumps(results, indent=2)}" ) merged = client.messages.create( model="claude-opus-4-8", max_tokens=2048, # the strong model does the synthesis system="Aggregate, synthesize, and resolve conflicts across specialist outputs.", messages=[{"role": "user", "content": merge_prompt}], ) final = "".join(b.text for b in merged.content if b.type == "text")
claude-opus-4-8) for the merge is a common choice: synthesis
and conflict resolution are exactly the hard reasoning the coordinator exists for, even if specialists ran on
cheaper models.EXAM TRAPS
PRACTICE
Q1 · Why can't the specialists merge their own results?
They're context-isolated (4.4) and never see each other's outputs. Only the coordinator aggregates all results, so synthesis and conflict resolution happen there.
Q2 · The market and financial specialists give opposite go/no-go calls. What should the coordinator do?
Resolve the conflict explicitly — weigh authority (whose domain owns the call), evidence, and consensus — and state which it trusted and why. If stakes are high and it's unresolved, escalate to a human (3.6).
Q3 · Why often run the merge on the strong model even when specialists used cheaper ones?
Synthesis and conflict resolution are the hardest reasoning in the workflow. Specialists can be cheap/fast on sub-tasks, but the coordinator's merge benefits from the strongest model.