Pass a self-contained brief: sub-task statement, inputs, output shape, constraints. Withhold parent scratchpad and unrelated history to avoid drift and cost.
Imagine a head chef asking a line cook to plate the dessert. The head chef does not hand over the entire night's order ticket, the wine list, and every conversation with every table. They hand over one ticket: dessert for table 9, no nuts, plate it like the photo, send it out in five minutes. The line cook does that one job well because the ticket is small and clear. If the head chef dumped the whole night onto the line cook, the cook would either freeze, do the wrong thing, or try to redo the head chef's job. Sub-agents are line cooks. Hand them a ticket, not the night.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Multi-agent systems are no longer a research idea. By 2026 every serious LLM application has at least one parent to sub agent handoff: a router delegating to a specialist, a planner spawning a researcher, a code agent calling out to a reviewer. The handoff is a context-engineering decision dressed up as a control-flow decision.
Get the handoff wrong and the sub-agent inherits all the noise of the parent without the structure that made the parent work. The standard failure mode is invisible: the sub-agent looks like it is doing its job, but it is subtly answering the wrong question because the parent's framing leaked through.
The function-call mental model
Treat the handoff as a function call. The brief is the argument list. The structured result is the return value. The integration logic lives in the parent and is invisible to the sub-agent.
The argument list has four slots: task (one or two sentences naming what the sub-agent must do), inputs (the specific data it will operate on, quoted in full), output_schema (the shape of the structured result the parent expects), and constraints (latency budget, tone, refusal rules, format requirements). That is the entire contract.
The value of this framing is that everything outside those four slots is recognizable as leakage. If you find yourself attaching the parent's full conversation or the running scratchpad to the brief, the function-call model immediately flags it as wrong: you would not hand a callee a copy of the caller's stack frame.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- Claude's sub-agent system (Anthropic) emphasizes minimal task descriptions and explicit return schemas; sub-agents start with a clean context window.
- LangGraph subgraphs accept an explicit state slice rather than the full parent state, by design.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow would you instrument cost attribution across a parent and three concurrent sub-agents?
Discuss span hierarchy, propagating the parent trace id, and aggregating input or output tokens per sub-agent span.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Treating the sub-agent as a fork of the parent and passing the entire parent context, which inflates cost and lets the sub-agent answer the wrong question.
60 second bullets to scan on the way to the call.
Name the four fields of a clean handoff brief
Explain why a sub-agent's narrower job demands narrower context
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.