By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
The review deck looks excellent. A coordinator agent planned the work, seven subagents gathered filings, policy text and calculations, and a synthesis step produced a forty-page briefing. The finance lead finds one wrong figure on page 12.
Nobody can say where it came from. The synthesis step summarised the subagent outputs and dropped the source ids. The coordinator logged that each subagent returned ok. The retry history shows one subagent ran three times after a timeout, and the third run's numbers were merged with the second's.
Every failure here lives at a boundary between agents, not inside one. In this lesson you will decompose a task, write the result contract, and find the boundary that breaks under error.
Orchestration means deciding what runs, in what order, with what budget, and when to stop. A subagent is a bounded unit of work with a contract. Synthesis assembles the results into an answer.
The separation sounds obvious and is frequently broken. When the coordinator also writes the final content, it becomes both judge and author. It can cover a failed subagent with fluent prose, and nobody sees the gap until a customer does.
Decompositions fail at boundaries. Name the boundary, the symptom and the fix before the design review, because each one is a predictable question from an engineer or an auditor.
| Boundary | Symptom | Fix |
|---|---|---|
| Task boundary cuts a dependency | A subagent guesses because it lacks the source it needed | Put the source set in its input contract; do not let it infer |
| Control flow has no bound | The loop runs until a token or time limit trips | Budget per run and per subagent, plus a stop rule with a number |
| Synthesis loses provenance | A claim reaches the answer with no source id | Synthesis may restate only claims with ids; drop or escalate the rest |
| Recovery has no owner | Three retries, duplicate side effects, unclear escalation | Name an owner per failure class and make each side effect idempotent |
Every subagent returns the same envelope. When a subagent cannot fill it, the coordinator learns at the boundary rather than at synthesis, which is the difference between a repair and a rewrite.
{
"task": "extract_claim_figures",
"status": "partial",
"claims": [
{
"field": "billed_total",
"value": 4820.0,
"source_id": "claim-8841-page-2",
"confidence": "high"
}
],
"budget_used": {"tool_calls": 4, "tokens": 3120},
"notes": "One line item was illegible and is omitted."
}Here is a four-stage design: research, extract, draft, verify. The verifier checks the draft against the research, but the extraction step drops page numbers to keep the payload small. Evaluation shows the verifier approves 98% of drafts, including drafts with a wrong figure.
Write three lines: the boundary that fails, the one contract you would rewrite, and what the gate should return when verification cannot confirm a figure. A verifier that approves almost everything is measuring the wrong thing or reading a lossy input.
Key takeaways
The coordinator owns control flow and should not author the final answer.
Every subagent returns a typed result with a status and source ids.
Decompositions fail at boundaries: missing context, unbounded loops, lost provenance, unowned recovery.
A retry repeats a side effect unless the action is idempotent and the count is capped.
A partial answer with a named gap beats a fluent answer with a silent one.
A verifier that approves nearly everything is measuring the wrong thing or reading a lossy input.
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.
Don't lose this lesson
Create a free account to save your progress, keep your streak, and work toward a shareable certificate.