Whetstone.
DelegationDelegation, and why it is a context lever
Module 4, Lesson 117 min

Delegation, and why it is a context lever

Delegation looks like an organisational feature and is mostly a context feature. Getting that round the right way is the lesson.

The two halves

task is in the default tool set. subagents is one of the six deep agent additions. SubAgentMiddleware sits third in the fixed stack, after Skills and Filesystem.

The parameter declares who exists. The tool is how the parent reaches them. Neither is useful alone, which is the same two-part shape as the MCP wiring from module 1, and it fails the same quiet way: a deep agent has task registered by default, so nothing errors when there is nobody to delegate to.

The real argument

Two things it is worth killing explicitly, because both are common assumptions and both are wrong.

A subagent does not have a bigger context window. The window is a property of the model. A child on the same model has the same window as its parent. What it has is a fresh one, uncontaminated by whatever the parent has been doing for the last two hours.

Delegation is not free structure. You are buying window space with visibility, and the price is real.

The isolation is a default, not a law

The Tatl mapping

You already run this pattern, so the fastest way to hold it is to name the parts in a system you built.

When you dispatch a Tatl, you write a brief and you get back a report. You do not get the Tatl’s forty tool calls, its wrong turns, or the file it read and discarded. Your own context stays clean, which is exactly why the pattern works for you at all.

And you already know both failure modes from the same system, which is more than the docs will tell you.

A brief that omits something the child needed produces confident wrong work. The subagent cannot ask a clarifying question mid-flight and it does not have your context, so anything you left out is simply absent for it. Your own dispatch discipline exists because of this, and it transfers directly: the subagent’s prompt is the entire world you are handing it.

A report that omits something you needed is unrecoverable without a re-run. The transcript is gone. That is the isolation working as designed, and it is why a subagent’s output contract matters more than its instructions.

When not to delegate

Delegation withholds intermediate work on purpose. So the wrong candidate is a task where the parent needs the intermediates in order to reason about the next step.

Bulk reading, broad search, anything where only the conclusion travels: delegate. Tightly coupled reasoning where each step informs the next: keep it in one head, and reach for offloading or summarization instead, which shrink what the parent carries without blinding it.

Practice

Try it yourself

Recall

The tool and the parameter

Two halves of one mechanism, and neither does anything without the other, which is the same shape as the MCP requirement from module 1.

What are the two pieces that make delegation work in a deep agent, and what does each one contribute?

Reveal answer

The task tool, which ships in the default tool set and is how the parent hands work off, and the subagents parameter, which is one of the six deep agent additions and declares the children that task can hand work to. The tool is the mechanism and the parameter is the roster. A deep agent has task registered by default, but with no subagents declared there is nobody to delegate to. SubAgentMiddleware is the handler, sitting third in the fixed middleware stack.

Quiz

What comes back

A subagent runs for forty turns and calls fifteen tools. What does the parent's context contain afterwards?

  1. AThe subagent's result, without its intermediate messages
  2. BThe subagent's full message history, merged into the parent's messages
  3. CNothing, because subagents run in a separate process
  4. DA summary of the subagent's history, generated by SummarizationMiddleware
Show answer

Correct answer: A — The subagent's result, without its intermediate messages

The parent gets the outcome, not the transcript, which is precisely what makes delegation a context lever rather than only an organisational one. The last option is the interesting distractor because summarization is a real mechanism in this same library and compressing the child's history sounds like exactly what it would do. Isolation and compression are different tools: one prevents the content from arriving, the other shrinks it after it has.

Quiz

The strongest argument

You could hand a large research task to one agent with a long run. Why split it across subagents instead?

  1. ASubagents run in parallel, so the same work finishes in less wall time
  2. BSubagents are given larger context windows than the parent that spawned them
  3. CIntermediate work stays out of the parent's window, so its context stays clean
  4. DSubagents can use tools the parent is not itself permitted to call
Show answer

Correct answer: C — Intermediate work stays out of the parent's window, so its context stays clean

Context isolation is the load-bearing argument: the parent's window carries results rather than forty turns of somebody else's reasoning. The second option is worth ruling out explicitly because it is a common assumption and it is simply false. A window is a property of the model, and a subagent on the same model has the same one. Treat the isolation argument as the architectural reading of how delegation works rather than as a published number.

Quiz

When delegation is the wrong move

One of these tasks is a bad candidate for a subagent. Which, and why does it matter?

  1. AReading and summarising forty long documents where only conclusions matter
  2. BInvestigating an intermittent production failure across a large unfamiliar codebase
  3. CA two-step task where the parent needs every intermediate detail for its next step
  4. DProducing a report from a large and noisy search result set
Show answer

Correct answer: C — A two-step task where the parent needs every intermediate detail for its next step

Delegation deliberately withholds the intermediate work from the parent, so a parent that needs those details has been robbed by the mechanism that was supposed to help it. The first and fourth options are the classic good cases: bulk reading where only conclusions matter. The trap is treating delegation as free structure, when what it actually is is a deliberate loss of visibility bought in exchange for window space.

Quiz

The one that gives up the lever

deepagents ships an experimental mode="fork" alongside the default isolated. When is fork the arguable choice, and what does it cost?

  1. AA child sent deep into an investigation that should not re-derive the parent's context, at the cost of the isolation the lesson relies on
  2. BAny subagent, because inheriting the parent's full history always makes the child's answers better at no meaningful cost
  3. CA subagent that must run in parallel with several others, because forking is what lets a team share one context window
  4. DA subagent placed on a smaller model, because forking is how a child borrows the parent's larger context window at runtime
Show answer

Correct answer: A — A child sent deep into an investigation that should not re-derive the parent's context, at the cost of the isolation the lesson relies on

This is beyond the exam guide and the docs, so it will not be tested: the exam answer stays that a subagent is isolated and sees only its brief. But the mode is real. Fork inherits the parent's conversation and rebuilds its prompt, which is worth it only when re-deriving context would cost more than the isolation is worth, and it is flagged experimental. The second option is the trap, because inheritance is not free: it means cache misses and a dirtier window, which is the whole reason isolation is the default. The parallel and window-size options invent mechanics fork does not have, the same false-window assumption this lesson already retired.

Check

Map it onto something you run

Write four lines in a scratch file connecting this mechanism to a dispatch system you already operate.

You should see

You identified what plays the role of task, what plays the role of the subagents roster, what the parent actually receives back, and one case where the missing transcript cost you something real.

Sign in to track your progress →