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.
share
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.
- You list
"Task"in the coordinator'sallowedToolsand declare each subagent type as anAgentDefinition. - The coordinator calls Task, picking a type by its
descriptionand writing a prompt string. - The subagent works in its own context window, where its tool calls stay.
- Its final message returns to the coordinator as the Task tool result.
Interactive · what crosses the context boundary
The prompt names the findings but does not carry them.
The prompt carries all ten findings with their sources.
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.
"prompt": "Synthesise the research
findings into a cited report."Result: general knowledge, 0 citations, a successful return.
"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.
"1. Search 'AI film'. 2. Open the top 3 results. 3. Summarise each in 100 words."
"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.
- The Task tool spawns subagents, and the guide requires
"Task"in the coordinator'sallowedTools. - Several Task calls in one coordinator response run in parallel; one per turn runs in sequence.
fork_sessionbranches a whole session from a shared baseline, which a fork subagent does not.