# 27.4 What a subagent gets, and what it hands back (/building-ai-workers/agent-architecture/what-a-subagent-gets)

---
type: Document
title: "27.4 What a subagent gets, and what it hands back"
description: "The brief, the tools and the limits a subagent receives, what comes back to the parent, and what is lost at each handoff."
status: stable
order: 327.04
ksor:
  owner: team:panaversity
  audience:
    - public
  approval:
    by: process:panaversity
    at: 2026-11-30T08:16:33Z
chapter: '27'
part: III
expert_status: manager
concepts: [ "27.4" ]
last_verified: '2026-11-30'

sources:
  - id: anthropic-multi-agent-research
    title: How we built our multi-agent research system, Anthropic (verified 2026-11-30)
    resource: https://www.anthropic.com/engineering/multi-agent-research-system
  - id: claude-agent-sdk-subagents
    title: Subagents in the SDK (Claude Agent SDK, verified 2026-11-30)
    resource: https://code.claude.com/docs/en/agent-sdk/subagents
  - id: anthropic-multi-agent-when
    title: 'Building multi-agent systems: when and how to use them (Claude, January 23, 2026, verified 2026-11-30)'
    resource: https://claude.com/blog/building-multi-agent-systems-when-and-how-to-use-them
  - id: anthropic-managed-agents-multiagent
    title: Multiagent orchestration (Claude Managed Agents, beta, verified 2026-11-30)
    resource: https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration
  - id: anthropic-managed-agents-budgets
    title: Budgets (Claude Managed Agents, beta, verified 2026-11-30)
    resource: https://platform.claude.com/docs/en/managed-agents/budgets
  - id: anthropic-managed-agents-create-session
    title: Create Session, API reference (Claude Managed Agents, beta, verified 2026-11-30)
    resource: https://platform.claude.com/docs/en/api/beta/sessions/create
generated:
  at: 2026-11-30T08:16:33Z
  by: esl-rewrite/1.2.0+ksor.1
trust_tier: unverified
build_id: sha256:d6ce3f28a2cf8e492a60bae1b426b7cc6466e35e83d70c3b9763db2c55009f4b
dirty: true
ksor_version: 0.0.60
---

**In everyday life.** A tailor sends an apprentice to the cloth market with a written note. It says three meters of blue cotton, from one of two stalls, under a set price, and bring the receipt. The apprentice comes back and says one line: "Bought, three meters." The tailor does not ask about the walk. The shop's owner compares that line with the receipt. Then a second tailor measures the cloth with his own tape. He does not ask the apprentice how long it is. In this section, the note is the brief, and the one line is the subagent's answer. The receipt is the subagent's tool results, and the second tailor is an independent checker.

**What you will learn.** You practice this in Lab 27, Task 1.

- What goes in, and who writes each part?
- What comes back, and how can code check it?
- When is a separate checker independent?
- May a subagent start subagents of its own?

**Why it matters.** The parent never sees a subagent's work, only its answer. So a wrong answer and a right one look the same to the parent. Your code can check in two places: on the way in, and on the way back.

**At work.** Before the orchestrator's first run on Wednesday, May 5, 2027, you look at `vendor-lookup` again. You wrote its definition, and that part is fixed. But the sentence the orchestrator sends it for V001, Midwest Packaging Co., will be written by the model during the run. And when one line of terms comes back, the orchestrator will take it as true. So you ask two things now: what may go in, and how code will know that the line is what `find_vendor` returned.

### What goes in, and who writes each part?

**Two things go in. Your code writes the subagent's definition before the run, and the model writes the brief during it.** What a subagent receives, and what it never receives, is [26.5](../context-engineering/isolation-with-subagents.md)'s table.

The **agent definition** is the object in your code that describes one subagent. On the Claude Agent SDK it has two required fields, `description` and `prompt`.[^claude-agent-sdk-subagents] The rest are optional. Four matter for this chapter's table:

| Field | What it sets |
| --- | --- |
| `description` | What the subagent is for. The orchestrator reads it to decide when to use the subagent ([27.3](an-orchestrator-and-its-subagents.md)) |
| `prompt` | The subagent's own system prompt, with every rule it must follow |
| `tools` | The tools it may ask for: "listing one doesn't pre-approve it. If omitted, inherits every tool available to subagents" |
| `maxTurns` | Its own turn limit. At the limit, its output comes back "marked as partial" |

So always write the `tools` list. A subagent gets only the tools its step needs, which is why `vendor-lookup` has `find_vendor` and no other. A subagent that cannot call a tool cannot be tricked into misusing it. The list says what a subagent may ask for. It does not approve a call. Permission rules and hooks do that ([22.5](../agent-sdks/who-may-run-a-tool.md)). A hook is your code, run at a set moment such as before every tool call. How both reach a subagent is Chapter 28's subject.

`maxTurns` is the stop that column 6 of `docs/architecture.md` asks for. An output marked as partial is not a finished answer, and your check must not treat it as one.

*The brief* is the prompt string the parent passes for this one job. In an orchestrator the model writes it. Anthropic lists what a good one holds: "Each subagent needs an objective, an output format, guidance on the tools and sources to use, and clear task boundaries."[^anthropic-multi-agent-research] Without them, subagents "duplicate work, leave gaps, or fail to find necessary information."[^anthropic-multi-agent-research]

Your code cannot write the model's brief. It can put the parts that never change into the definition's `prompt`, where they apply whatever the brief says. `vendor-lookup` already has its output format and its boundaries there: one line, word for word, and "Never pay, approve or change anything." And the trace records each brief, as the input of the call that started the subagent, so you can read what the model really sent.

### What comes back, and how can code check it?

**One final message comes back. Code checks it against the subagent's own tool results, which your trace holds.** On the Claude Agent SDK, a subagent's tool calls and results "stay inside the subagent", and "only its final message returns to the parent."[^claude-agent-sdk-subagents] The documentation adds: "The parent receives the subagent's final report, but may summarize it in its own response."[^claude-agent-sdk-subagents]

So a value can change in two places: between the tool result and the subagent's answer, and between that answer and the parent's review. The parent cannot catch the first change, because it never saw the tool result. Your code can. The trace holds the subagent's calls as well as the parent's, and [27.6](diagnosing-a-misbehaving-agent.md) shows how it marks them.

This is why the form of the answer matters. Lab 26's check by code fails a review if a policy line "was not returned by `search_policy` in that run". Suppose the orchestrator hands the policy search to a subagent. The search results are now in the subagent's part of the trace, and the check must read them there. It can do so only if the answer gives the line as `(file.md:N)`. Code can compare that with a tool result. It cannot compare a sentence in the subagent's own words.

<!-- FIGURE 27.3: Left to right. A box "The parent (the orchestrator)". An arrow pointing right from it, labeled "the brief", to a box "The subagent". Inside the subagent's box, a small loop of its own tool calls, labeled "its own tool calls and results". An arrow pointing left from the subagent back to the parent, labeled "one short answer". Under the subagent's box, a second arrow pointing down to a box "The builder's trace", labeled "its tool results". From the trace, an arrow pointing right to a box "The check by code". No arrow runs from the subagent's tool results to the parent. A note under the parent: "sees the answer, never the results". The alt text must name each box and each arrow's label and direction, and say that no arrow runs from the subagent's tool results to the parent. -->

*Figure 27.3. The brief goes in and one short answer comes back. The subagent's tool results go to your trace, where the check by code compares them with the answer. They never reach the parent.*

The price is what the helper cannot say. A subagent limited to one line cannot tell the parent about something else it found. When the parent needs the details to decide, that part of the job should stay in one window (26.5).

### When is a separate checker independent?

**When it has three things: its own context, its own access to the source, and a check it can run, not a transcript it reads.** A subagent whose only job is to test another agent's work is a *checker*. Anthropic calls it a "verification subagent". The main agent starts one "with the artifact to verify, clear success criteria, and tools to perform verification."[^anthropic-multi-agent-when] The artifact is the piece of work to be tested.

Each of the three can be missing:

- *Its own context.* A checker that starts with the worker's conversation starts with the worker's mistakes. Anthropic notes that a verifier can test a result "without needing the full history of how it was built."[^anthropic-multi-agent-when]
- *Its own access to the source.* A checker of Brightline's review needs `list_open_invoices` and `search_policy` itself. If it gets only the worker's summary of what those tools returned, it checks the worker's story against the worker's story.
- *A check it can run.* "Does this review look complete?" asks for an opinion. "Call `list_open_invoices` and name every invoice with no entry" is a test.

A checker is still a model. It judges, and it can be wrong, so a check by code stays the final test ([23.16](../hosted-agents/loops-check-feedback-and-stop.md)). Where code can run the test, as it can for a missing invoice, use code. A checker is worth its tokens only on a question that code cannot answer.

### May a subagent start subagents of its own?

**Only as deep as your code allows.** On the Claude Agent SDK the depth is one of the five limits of 27.3. On Claude Managed Agents, in beta when this page was checked, "Delegation is one level deep".[^anthropic-managed-agents-multiagent] Least privilege has the same form on that platform: "To limit an agent's access, declare only the servers it needs in its agent definition."[^anthropic-managed-agents-multiagent] A subagent's thread there has no turn limit of its own. The API reference for creating a session lists none.[^anthropic-managed-agents-create-session] Its stop is the session's budget, which every thread shares: "there are no per-thread caps".[^anthropic-managed-agents-budgets] Section [27.7](how-todays-tools-realize-it.md) lists these settings with their dates.

Every level adds one more brief and one more answer, so it adds two more places for a value to change.

**The operating rule:** fix what you can in the definition, and read the brief in the trace. Ask for an answer in a form that code can test against the subagent's own tool results.

**Do this now.** Ask your coding agent to show both ends of one subagent. Copy this line:

> Show me one subagent this project defines: its description, its prompt, its tools and its turn limit, and say which of these is not set. Then write the brief a parent should send it for one vendor, with an objective, an output format, the tools to use and what it must not do. Mark which of those four the definition's prompt already fixes. Last, say which tool result a check by code would compare its answer with. Change no file.

[^claude-agent-sdk-subagents]: Subagents in the SDK, Claude Agent SDK, Anthropic.
[^anthropic-multi-agent-research]: How we built our multi-agent research system, Anthropic.
[^anthropic-multi-agent-when]: Building multi-agent systems: when and how to use them, Anthropic.
[^anthropic-managed-agents-multiagent]: Multiagent orchestration, Claude Managed Agents, Anthropic.
[^anthropic-managed-agents-budgets]: Budgets, Claude Managed Agents, Anthropic.
[^anthropic-managed-agents-create-session]: Create Session, API reference, Claude Managed Agents, Anthropic.
