Task statement 1.3 · Agentic architecture and orchestration

Configure subagent invocation, context passing, and spawning

The research coordinator passes the synthesis subagent one thing: the prompt text of a Task call. If the findings are not in that text, synthesis writes without them, and nothing reports an error.

Why it's tested

The tempting assumption is that a subagent sees what the coordinator has seen. Assuming this, an engineer writes "Synthesise the findings", and the synthesis subagent, which never receives the coordinator's history, writes a fluent report from general knowledge. Nothing fails, so the gap appears only when someone checks the citations.

KnowledgeHow a subagent is defined and spawned

A coordinator spawns a subagent by calling the Task tool. Each subagent type is declared as an AgentDefinition: a description that tells the coordinator when to use it, a prompt that becomes its system prompt, and tools, its tool restriction. Only description and prompt are required, and omitting tools inherits every tool available to subagents. The new subagent loads its own system prompt and tool definitions, plus project CLAUDE.md, a file of shared project instructions. Only the Task call's prompt string crosses from the coordinator. So context must be passed explicitly: a subagent does not inherit the coordinator's history, and invocations share no memory.

  1. You list "Task" in the coordinator's allowedTools and declare each subagent type as an AgentDefinition.
  2. The coordinator calls Task, picking a type by its description and writing a prompt string.
  3. The subagent works in its own context window, where its tool calls stay.
  4. Its final message returns to the coordinator as the Task tool result.

Interactive · what crosses the context boundary

The coordinator's context window on the left and the synthesis subagent's own context window on the right, separated by a context boundary. The subagent loads its system prompt, tool definitions and project CLAUDE.md from your configuration. Only the Task call's prompt string crosses the boundary. The subagent's final message returns as the Task result, and the buttons switch between a prompt without the findings and a prompt that carries them. your code · AgentDefinition, settings loaded at spawn context boundary never crosses coordinator's context window conversation history web search results · 6 findings document analysis outputs · 4 its own system prompt preloaded skills Task call · prompt stringthe only thing you pass prompt subagent's own context window AgentDefinition.prompt tool definitions · Read project CLAUDE.md nothing from the coordinator'shistory arrives here "Synthesise the research findings into a cited report." 6 search + 4 analysis findings {claim, source_url | doc, page} final message Task tool result, back to the coordinator Fluent report from general knowledge · 0 citations · no error raised 10 claims, each cited to a URL or a page · "film: no findings" flagged

The prompt names the findings but does not carry them.

The prompt carries all ten findings with their sources.

The subagent loads its own configuration. The findings stay with the coordinator, so a prompt that only names them leaves nothing to cite. Same subagent, same configuration, same boundary. The findings now travel inside the one thing that crosses, each claim with its source in its own field.
agents={"synthesis": AgentDefinition(
    description="Writes the cited report. Use after analysis.",
    prompt="You write cited reports. Keep every claim's source.",
    tools=["Read"])},       # omit → inherits every tool
allowed_tools=["Task", "Read"]

The payload lists "Task" because that is the exam answer, although, as the box in 1.2 explains, current docs call the tool Agent and allowedTools only pre-approves it.

SkillComplete findings, with metadata kept separate

In the research system, web search returned six findings and document analysis returned four. The coordinator spawned synthesis with "Synthesise the research findings into a cited report", and the report came back fluent, uncited and error-free. All ten findings sat in the coordinator's history, which synthesis never receives. The fix passes both sets in full as structured records, with each claim's metadata (source URL, document name, page number) in its own fields, so attribution survives the handoff.

Before
"prompt": "Synthesise the research
  findings into a cited report."

Result: general knowledge, 0 citations, a successful return.

After
"prompt": "Write a cited report from these.
web_search: [{"claim": "Session musicians
  report fewer bookings", "source_url":
  "https://example.org/m25"}, … 6]
document_analysis: [{"claim": "…",
  "doc_name": "survey-2025.pdf",
  "page": 14}, … 4]
Name any sector with no finding."

Result: ten claims traced to a URL or page, and "film: no findings" named.

SkillSpawning subagents in parallel

For four independent sectors, the coordinator emits four Task calls in a single response. Calls in one response run concurrently, so the searches finish in the time of the slowest rather than the sum. Spread across turns, each call waits until the coordinator has read the last result.

// one coordinator response, four tool_use blocks
[{"name": "Agent", "input": {"subagent_type": "search", "prompt": "Sector: music. …"}},
 {… "film" …}, {… "writing" …}, {… "photography" …}]

More precise than the guide. In current Claude Code, subagents run in the background by default: an Agent call without run_in_background starts a background subagent, and background subagents run concurrently (checked 2026-09-30). Calls from separate turns can therefore overlap. Exam answer: emit multiple Task tool calls in a single coordinator response.

SkillGoals and quality criteria, not procedure

The prompt string also decides how well a subagent adapts. A step-by-step procedure fixes what the search subagent does, so when the top results for film are press releases, it summarises press releases. A coordinator prompt that states the research goal and quality criteria lets the subagent judge what it finds, search again, or report a gap, as Anthropic's own research system does.

Step by step
"1. Search 'AI film'. 2. Open the
top 3 results. 3. Summarise each
in 100 words."
Goals and criteria
"Goal: how generative AI changed film
production since 2023. Quality bar:
primary sources, each claim with URL
and date. If sources are thin, say
what is missing."

KnowledgeFork-based session management

The guide's fork is about sessions, not subagents. Fork-based session management passes resume with a session ID and fork_session=True, which starts a new session from a copy of the old one, so divergent approaches build on one shared analysis baseline. Forking the coordinator's 40-source analysis twice gives a by-sector draft and a by-impact draft, each with its own session ID and neither in the other's history, and 1.7 walks the mechanism in full. A Claude Code fork subagent is a different feature: a subagent that starts with a copy of the parent's conversation and returns one Task result inside that parent session.

Before you spawn, ask: Is everything this subagent needs written into the Task call's prompt string? Yes → it can use it, and cite it if the metadata has its own fields. No → it lacks it, and will still answer without saying so.
Takeaway
  • The Task tool spawns subagents, and the guide requires "Task" in the coordinator's allowedTools.
  • Several Task calls in one coordinator response run in parallel; one per turn runs in sequence.
  • fork_session branches a whole session from a shared baseline, which a fork subagent does not.

check yourself

0 / 3 answered

The document analysis subagent returns each finding as a prose paragraph that mixes the claim with its citation. The coordinator passes those paragraphs to synthesis in full, yet a third of the report's claims reach readers without a page number. Synthesis must stay a single pass that never reopens the source PDFs.Which change most directly keeps page numbers attached to claims?

Select one.

The coordinator researches four sectors. Logs show it issues one Task call per turn and reads each result before issuing the next, so a run takes six minutes. Each search subagent follows a numbered procedure and returns thin summaries on sectors with few sources. The sectors differ in ways the team cannot predict in advance.Which TWO changes best cut the run time and let each search subagent cope with thin sectors?

Select two.

The coordinator's session spent 90 minutes analysing 60 sources on AI in creative industries. The team now wants to pursue two lines from that analysis: legal disputes over training data, and effects on freelance income. Each line must build on the full analysis and be resumable later without containing the other line's work.Which approach best meets both requirements?

Select one.

sources

  1. Claude Code Docs, "Subagents in the SDK": the what-subagents-inherit table, the AgentDefinition fields (only description and prompt required; omitted tools inherits every tool), the Agent tool's prompt string as "the only content you pass from parent to subagent", parallel subagents finishing "in the time of the slowest one", and background execution by default. Checked 2026-09-30.
  2. Claude Code Docs, "Create custom subagents": the Task tool renamed to Agent in 2.1.63 with Task(...) kept as an alias, fork subagents, and foreground versus background subagents. Checked 2026-09-30.
  3. Claude Code Docs, "Work with sessions", "Fork to explore alternatives": resume with fork_session=True creates a new session from a copy of the original's history, and the original stays unchanged. Checked 2026-09-30.
  4. Claude Code Docs, "Configure permissions": allowed_tools auto-approves listed tools, unlisted tools stay available, and Agent runs without asking. Checked 2026-09-30.
  5. Anthropic Engineering, "How we built our multi-agent research system": each subagent needs "an objective, an output format, guidance on the tools and sources to use, and clear task boundaries". Checked 2026-09-30.
  6. The Task tool, allowedTools including "Task", fork-based session management, search results and document analysis outputs passed to synthesis, and goals-and-criteria coordinator prompts: Claude Certified Architect — Foundations Exam Guide v1.0, Domain 1.3. Scenario: the guide's Multi-Agent Research System. Findings, file names and URLs in the examples are illustrative.