TimoBy Amotion AI

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 ofSkills 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 promptUsing 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 typeSpawning 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 baselineWriting 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:

FieldWhat it doesExam point
descriptionTells the coordinator when to use this subagentClaude picks subagents by reading descriptions, so make them specific
promptThe subagent's system prompt: its role and rulesStays the same on every call; the task details come from the coordinator
toolsThe tools the subagent may use; if omitted, it gets the default setGive 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:

ItemDoes a subagent get it?What to do about it
Coordinator's conversation history and tool resultsNoPut what it needs in the task prompt
Coordinator's system promptNoPut standing rules in AgentDefinition.prompt
Tool definitionsYes, unless you restrict themOmit tools to inherit the full set; list tools to narrow it
Project CLAUDE.mdYes, when project settings are loadedIn Claude Code, the built-in Explore and Plan subagents skip CLAUDE.md to stay fast, so project rules do not reach them
Skill contentNo, unless listed in skillsList the skills the subagent must have from the start; others can still be invoked through the Skill tool
Permission modeSometimesWhen 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.

SituationDo thisWhy
Synthesis needs earlier findingsPut the complete findings in its task promptIt cannot see the coordinator's history
Findings come from many sourcesPass structured records with separate source metadataCitations survive merging
Three independent searchesEmit three Agent calls in one responseThey run in parallel
Parallel subagents score items against a standardRepeat the criteria and answer shape in every task promptResults stay comparable
Subagent should only readRestrict tools to read-only toolsLeast privilege per role
Compare two approaches from one analysisFork the sessionBoth 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 description matches 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, its prompt, 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.

Question 1

A legal research system's synthesis subagent produces reports with correct facts but almost no citations. The coordinator passes it a prompt that says "Write the report from the research gathered so far" plus a merged paragraph of all findings. What should the team change?

Answer: D. The citations were lost when findings were merged into one paragraph. Structured records keep source metadata apart from content so synthesis can cite each claim. A repeats work and may find different sources. B asks for citations the subagent was never given. C gives more turns but no more information.

Question 2

A coordinator must check four unrelated suppliers. Logs show it calls the search subagent for the first supplier, waits for the result, then calls it for the second, and so on. Each search takes about a minute. How should the architect cut the total time?

Answer: B. Several Agent calls in one response run in parallel, so the total is close to the slowest single search. A puts all four searches in one context and still runs them one after another. C helps a little but keeps the sequence. D breaks hub-and-spoke and stays sequential.

Build exercise

  1. Define three subagents with AgentDefinition: two read-only researchers and a synthesis agent. Give the coordinator "Agent" in allowed_tools.
  2. 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.
  3. 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.
  4. 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

Sources