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.
Detailed answer & concept explanation~4 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
9 min: the four-slot brief, the function-call mental model, output-schema first, scope-drift versus cost-only framings, selective enrichment versus scratchpad dump, trace-id propagation, when shared context is the design goal.
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.
- CrewAI delegations pass a task description and expected output but not the delegating agent's full memory.
- Cursor's agent mode spins off scoped tasks (file analysis, refactor) with narrow briefs rather than passing the whole IDE conversation.
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?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes 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.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.