Skip to content
Claude Certified Architect – Professional (CCAR-P) Exam Prep

Lesson 1 of 31 · 6 min

x
1/31

Subagents

Video lesson: CCAR-P 01/31: Subagents

Mechanics (context isolation, what a subagent receives, tool restriction) are in subagent invocation and context passing. This note is the design decision.

Decision criteria (design guidance, built on verified mechanics)

Split into subagents when at least one holds:

ReasonWhy it justifies a subagent
Context isolationExploration would fill the main context; only the final message returns (verified)
ParallelismIndependent subtasks finish in the time of the slowest (verified)
Specialised instructionsA tailored system prompt would be noise in the main prompt (verified)
Permission or tool isolationA reviewer limited to Read, Grep, Glob cannot modify files (verified)
Independence of judgementA fresh reviewer is not anchored on the author's reasoning

Do not split when the task fits one context, steps depend tightly on each other, or a direct grep answers the question. Anthropic's prompting guide warns that newer models can over-delegate and that Opus 5 delegates more readily than earlier models (verified).

Architecture patterns

  • Orchestrator and workers: a coordinator plans and merges; workers are narrow and stateless between tasks.
  • Parallel specialists: security, style, tests, performance reviewers run concurrently.
  • Pipeline: output of one stage feeds the next (extract, validate, enrich); each stage can be a subagent with its own model tier.
  • Explorer and executor: a cheap, read-only explorer feeds a stronger model that edits.

Controls an architect must set

  • Depth (default 3 layers), concurrency (default 20), spend (maxBudgetUsd); environment variables for the first two. Each subagent makes its own requests, all counted in spend.
  • maxTurns per subagent; partial output is marked and can be resumed.
  • Tool and model per subagent (tools, model), for least privilege and cost tiering.

Design questions to answer in a review

  1. What does each subagent receive, and is that enough? (Only the prompt string crosses over.)
  2. What must it return, in what shape, with sources? (See provenance in information provenance.)
  3. What happens when one fails? (See error propagation, error propagation.)
  4. What is the cost ceiling and the observability plan? (D3.4)

Exam traps

  • Subagents for everything because the model likes to delegate.
  • No spend, depth or concurrency caps.
  • Subagent prompts that assume shared memory.
  • Same tools and model for every subagent.

References

  1. Subagents in the SDK — checked Oct 16, 2026
  2. Prompting best practices — checked Oct 16, 2026

Check your understanding

  • Three independent review checks on one change: architecture?Show answer

    Answer

    Parallel specialist subagents, merged by a coordinator.
  • What stops a runaway delegation tree?Show answer

    Answer

    Depth, concurrency and spend caps.
  • When is a subagent unjustified?Show answer

    Answer

    When one context suffices or a direct tool call answers it.

Progress is saved in this browser.

Next Lesson