1.3 · D124 questions · 5 free

Subagent invocation, context passing & spawning

Configure subagent invocation, context passing, and spawning.

This subtopic (1.3) sits in Agentic Architecture & Orchestration (D1) on Anthropic's Claude Certified Architect — Foundations (CCA-F) exam. The bank holds 24 practice questions here — 5 easy, 13 medium, and 6 hard — with 5 free to try, answers and explanations included. 3 of the free questions are below; the rest are in the practice stream.

What the exam tests here

  • subagent context must be explicitly provided — no automatic inheritance
  • AgentDefinition configuration — descriptions, system prompts, tool restrictions
  • Task tool as mechanism for spawning subagents — allowedTools must include Task
  • Agent tool as mechanism for spawning subagents — allowedTools must include Agent (renamed from Task in v2.1.63)
  • spawning parallel subagents — multiple Task tool calls in single coordinator response
Practice this subtopic — 5 freeFree questions with answers ↓

Free practice questions: Subagent invocation, context passing & spawning

Question 1 of 3 · free · medium

You define a billing-dispute subagent using AgentDefinition. It must call process_refund but must never call escalate_to_human. What is the correct way to configure this tool restriction?

Show answer & explanation

Correct answer: B. Set tools=['process_refund'] in the AgentDefinition so the subagent inherits only that tool.

AgentDefinition's tools field is an allowlist — setting it to ['process_refund'] means the subagent can only use that tool, blocking escalate_to_human by omission. 'disallowed_tools on the coordinator...' configures the coordinator's restrictions, not the subagent's. 'System prompt instruction...' relies on model compliance, not enforcement. 'allowed_tools with both...' explicitly grants escalate_to_human, the opposite of the requirement.

Question 2 of 3 · free · easy

The coordinator agent needs to run the web search subagent and the document analysis subagent at the same time. What does the coordinator do to spawn them in parallel?

Show answer & explanation

Correct answer: A. Issue both Agent tool calls in a single coordinator response turn.

Parallel subagent spawning is achieved by issuing multiple Agent tool calls in one coordinator response — the runtime executes them concurrently. 'Set parallel=true...' references a flag that does not exist in ClaudeAgentOptions. 'Write results to a shared file...' is a data-sharing pattern, not a spawning mechanism. 'Call the web search subagent first...' describes sequential execution, not parallel.

Question 3 of 3 · free · medium

The coordinator agent completes a web search and obtains 20 source URLs with relevance scores. It now invokes the synthesis subagent via the Agent tool to consolidate findings. What must the coordinator do to ensure the synthesis subagent can access those URLs?

Show answer & explanation

Correct answer: D. Include the URLs and relevance scores directly in the Agent tool's prompt string.

The only channel from parent to subagent is the Agent tool's prompt string — subagents receive no parent conversation history, tool results, or session variables. 'Shared session variable' does not exist in the Agent SDK. 'Coordinator's system prompt' is not inherited by subagents. 'settingSources' controls which filesystem settings are loaded, not parent session data.

2 more free questions on this subtopic in the practice stream, plus 19 in the full bank. Keep practicing →

Related reading (Anthropic docs)