Subagent invocation and context passing: CCAR-F task statement 1.3
CCAR-F · Agentic Architecture & Orchestration (27% of the exam)
Task statement 1.3 sits in Agentic Architecture & Orchestration, 27% of the CCAR-F exam. It tests the mechanics under the coordinator pattern: how a subagent is defined and spawned, what it can see when it starts, and how to hand it everything it needs in its prompt.
What the official guide covers
The Claude Certified Architect Foundations exam guide (version 1.0, effective July 2026) lists this under task statement 1.3, "Configure subagent invocation, context passing, and spawning":
| Knowledge of | Skills in |
|---|---|
The Task tool spawns subagents, and a coordinator's allowedTools must include "Task" | Putting the complete findings of earlier agents straight into the next subagent's prompt |
| Subagents do not inherit the parent's context or share memory between calls, so context must be given in the prompt | Using structured formats that keep content apart from metadata (source URL, document name, page number) so attribution survives |
AgentDefinition: a description, a system prompt and tool restrictions for each subagent type | Spawning subagents in parallel with several Task calls in one coordinator response, not across separate turns |
| Forking sessions to explore different approaches from a shared analysis baseline | Writing coordinator prompts that set research goals and quality criteria instead of step-by-step procedures |
The Task tool is now called Agent
The exam guide calls the spawning tool "Task". In the current Claude Agent SDK and Claude Code, the same tool is named Agent. Anthropic's documentation says the old Task name still works as an alias in settings and agent definitions, and the SDK still lists the tool as Task in the session's init message. Treat the two names as the same tool. On the exam, "allowedTools includes Task" means the coordinator is set up to spawn subagents.
In today's SDK examples, the coordinator's allowed_tools lists "Agent" next to the other tools it uses. A subagent whose own tools list leaves Agent out cannot spawn subagents of its own.
Defining a subagent with AgentDefinition
Each subagent type is an AgentDefinition passed in the agents option. Three fields matter most for this task statement:
| Field | What it does | Exam point |
|---|---|---|
description | Tells the coordinator when to use this subagent | Claude picks subagents by reading descriptions, so make them specific |
prompt | The subagent's system prompt: its role and rules | Stays the same on every call; the task details come from the coordinator |
tools | The tools the subagent may use; if omitted, it gets the default set | Give each subagent only what its job needs |
Optional fields include model, disallowedTools, maxTurns and skills. Subagents can also be Markdown files in .claude/agents/.
What a subagent sees when it starts
A subagent starts with a fresh context. It receives its own system prompt (the AgentDefinition.prompt), the task prompt the coordinator writes when it calls the tool, its tool definitions and, if project settings are loaded, the project CLAUDE.md. It does not receive the coordinator's conversation history, the coordinator's system prompt or earlier tool results. A second call to the same subagent type also starts fresh, unless you deliberately resume the earlier subagent.
When the subagent finishes, only its final message goes back to the coordinator. Its own tool calls and intermediate results stay inside it.
So the coordinator's task prompt is the whole hand-over. If the synthesis subagent needs the search results and the document analysis, both must be in its prompt in full. "Combine the findings so far" gives it nothing to work with.
What a subagent inherits and what it does not
Exam options often hinge on one of these rows:
| Item | Does a subagent get it? | What to do about it |
|---|---|---|
| Coordinator's conversation history and tool results | No | Put what it needs in the task prompt |
| Coordinator's system prompt | No | Put standing rules in AgentDefinition.prompt |
| Tool definitions | Yes, unless you restrict them | Omit tools to inherit the full set; list tools to narrow it |
| Project CLAUDE.md | Yes, when project settings are loaded | In Claude Code, the built-in Explore and Plan subagents skip CLAUDE.md to stay fast, so project rules do not reach them |
| Skill content | No, unless listed in skills | List the skills the subagent must have from the start; others can still be invoked through the Skill tool |
| Permission mode | Sometimes | When the main session runs in acceptEdits, bypassPermissions or auto mode, the subagent runs in that same mode |
A useful task prompt reads like a hand-over note to a colleague who has seen nothing: the objective, the scope and what is out of bounds, the complete inputs, the tools or sources to use, the format of the answer, and what counts as done.
Passing context that keeps attribution
Pass findings as structured data, with the claim kept apart from where it came from. The synthesis subagent can then cite every claim, and a later reviewer can trace it.
{
"question": "How has remote work changed office leasing since 2020?",
"findings": [
{
"claim": "Several large firms cut their leased floor space after adopting hybrid work.",
"evidence": "Quoted passage from the source...",
"source": {"type": "web", "url": "https://example.com/report", "published": "2024-03-11"}
},
{
"claim": "Average sublease listings in the city rose over two years.",
"evidence": "Table 4, row 'Sublease availability'",
"source": {"type": "document", "name": "leasing-review.pdf", "page": 12}
}
],
"quality_criteria": "Cite every claim. Show conflicting figures side by side with both sources."
}
The coordinator puts this whole block into the synthesis subagent's task prompt. Content (claim, evidence) and metadata (source) never mix, so nothing loses its citation when findings are merged.
Spawning subagents in parallel
To run subagents at the same time, the coordinator must emit several Agent tool calls in a single response. If it calls one, waits for the result and then calls the next, the work runs in sequence across separate turns. This is the same parallel tool use described in 1.1 Agentic loops, applied to subagents.
You can check what happened by counting Agent tool calls per assistant message:
from claude_agent_sdk import query, AssistantMessage, ToolUseBlock
async def count_parallel_spawns(prompt, options):
async for message in query(prompt=prompt, options=options):
if isinstance(message, AssistantMessage) and getattr(message, "parent_tool_use_id", None) is None:
spawns = [b for b in message.content
if isinstance(b, ToolUseBlock) and b.name in ("Agent", "Task")]
if spawns:
types = [b.input.get("subagent_type") for b in spawns]
print(f"{len(spawns)} subagent(s) in one response: {types}")
Messages from inside a subagent carry a parent_tool_use_id, so filtering on None counts only the coordinator's calls. If independent tasks show one spawn per response, tell the coordinator to launch independent subagents together.
Goals, not procedures
Write the coordinator's instructions as research goals and quality criteria: the question, what counts as enough evidence, how to handle conflicts, what format to return. Do not script every step ("first search X, then open the third result"). Subagents that know the goal can adapt when a source is missing.
Be just as specific about what comes back. Only the subagent's final message reaches the coordinator, so ask for a fixed shape (for example, a list of findings with claim, evidence and source fields). The coordinator can then merge results from several subagents without losing citations, and can spot a result that is empty or malformed.
When several subagents do the same kind of work in parallel, such as scoring five suppliers, put the same criteria and the same answer shape in every task prompt. Each subagent sees only its own prompt, so without that shared yardstick each one invents its own and the scores cannot be compared.
| Situation | Do this | Why |
|---|---|---|
| Synthesis needs earlier findings | Put the complete findings in its task prompt | It cannot see the coordinator's history |
| Findings come from many sources | Pass structured records with separate source metadata | Citations survive merging |
| Three independent searches | Emit three Agent calls in one response | They run in parallel |
| Parallel subagents score items against a standard | Repeat the criteria and answer shape in every task prompt | Results stay comparable |
| Subagent should only read | Restrict tools to read-only tools | Least privilege per role |
| Compare two approaches from one analysis | Fork the session | Both branches start from the same baseline; see 1.7 |
Rules that decide exam answers
- Context goes in the prompt. Subagents do not inherit the parent's history or share memory. The answer that passes complete findings in the prompt beats any answer that assumes shared state.
- Parallel means one response. Several Agent (Task) calls in one coordinator response run together. Calls across separate turns run in sequence.
- Keep metadata next to content, not inside it. Structured records with URL, document name, page and date preserve attribution through synthesis.
- The coordinator needs the spawning tool. The guide expects Task (now Agent) in the coordinator's allowed tools. If nothing is delegated, check that the tool is available to the coordinator and that each subagent's
descriptionmatches the work. - Goals beat scripts. Coordinator prompts that state goals and quality criteria let subagents adapt. Step-by-step procedures make them brittle.
- Listed, not inherited. A subagent that must follow a skill or project rule from its first step needs it in its own definition (
skills, itsprompt, or a subagent type that loads CLAUDE.md). Do not assume it carries over from the coordinator.
Where it appears in the exam
Domain 1 is a primary domain in three of the six exam scenarios: Customer Support Resolution Agent, Multi-Agent Research System and Developer Productivity with Claude. Context passing and parallel spawning fit the Multi-Agent Research System scenario most closely. The guide's preparation exercise "Design and Debug a Multi-Agent Research Pipeline" reinforces this domain.
Two sample questions
These are original Timo practice questions. They are not official exam questions.
Build exercise
- Define three subagents with
AgentDefinition: two read-only researchers and a synthesis agent. Give the coordinator"Agent"inallowed_tools. - Ask a question with two independent parts. Run the counting script above and confirm both researchers start from one response. If not, add an instruction to launch independent subagents together.
- Have the coordinator pass findings to synthesis first as a merged paragraph, then as JSON records with source fields. Compare the citations in the two reports.
- Ask the synthesis subagent about something only the coordinator saw. Confirm it cannot answer, which shows it did not inherit the coordinator's history.
Practise this topic
- Claude Certified Architect practice exam: free, 20 questions, no sign-up
- Claude Certified Architect hub
- CCAR-F study guide: all topics
- Same topic in another exam: CCDV-F Agent Construction with Claude
- Previous topic: 1.2 Coordinator and subagent patterns
- Next topic: 1.4 Workflow enforcement and handoff
Sources
- Claude Certified Architect Foundations Exam Guide, version 1.0, effective July 2026 (Anthropic), task statement 1.3
- Claude Agent SDK documentation: Subagents in the SDK
- Claude Code documentation: Create custom subagents
- Claude Agent SDK documentation: Agent SDK reference: Python
- Anthropic documentation: Parallel tool use
By Amotion AI