CCA·F prep
Unofficial prep course · content current as of Aug 2026

Claude Certified Architect — Foundations

Anthropic's architect exam doesn't test trivia — it tests whether you make the right tradeoff calls when building production systems with the Claude API, Claude Code, the Agent SDK, and MCP. This course teaches every domain, then drills you with scenario questions built the way the exam asks them.

Exam spec
Format60 scenario-based questions · multiple-choice & multiple-response
Time120 minutes · ~2 min per question
DeliveryOnline, live-proctored, closed book
Scoring100–1000 scaled · pass at 720 · per-domain % on score report
Fee$125 · waivers have been offered via the Claude Partner Network
TestsClaude API · Claude Code · Claude Agent SDK · MCP
AudiencePractitioners with ~6+ months hands-on Claude experience
Domain weights — study in this proportion
Your progress
0/20
lessons read
avg best quiz score
best mock exam
0/8
hands-on exercises
How this course works
  • Read the lessons in each domain module — they compress the official courses and docs into what the exam actually probes, with an Exam lens callout wherever a concept maps to a known question pattern.
  • Take each module quiz — instant feedback with the reasoning for every answer, because on this exam the why is the content.
  • Drill the 7 anti-patterns — a large share of questions are "spot the wrong design." If you know these cold, you can eliminate distractors on sight.
  • Sit the full 60-question mock under the real 120-minute clock, then review the per-domain report and re-study your weakest domain.
The 6 scenario families the exam draws from

Each exam form pulls several multi-question scenarios from a pool built on these situations. Every one appears in this course's quizzes.

S1

Customer support agent

Returns, disputes, account issues — deciding what the agent resolves autonomously vs escalates to a human.

S2

Team code generation

Configuring Claude Code for a team: CLAUDE.md, slash commands, when plan mode earns its keep.

S3

Multi-agent research

A coordinator delegating to search / analysis / synthesis subagents, handling partial failures.

S4

Developer productivity

Navigating unfamiliar codebases and automating chores with built-in tools and MCP servers.

S5

Claude Code in CI/CD

Automated review, test generation, PR feedback — output formats and false-positive control.

S6

Structured extraction

Pulling clean JSON from messy documents — schemas, nullable fields, validation loops.

Before you book This is an independent study aid, not affiliated with Anthropic. Always confirm the current format, fee, and policies on the official Anthropic Academy exam page, and read the official Exam Guide PDF there. The free Academy courses (Claude 101, Building with the Claude API, Claude Code in Action, Intro to MCP, MCP Advanced Topics) are the canonical syllabus — this course is the condensed, drill-focused companion.
D1 · 27% — the heaviest domain

Agentic architecture & orchestration

Roughly 16 of your 60 questions live here. The domain covers the agentic loop, when to split work across subagents, how coordinators and subagents share state, and how tasks get decomposed without falling apart.

1.1

The agentic loop and stop_reason mechanics

Every agent — whether you hand-roll it on the Messages API or use the Agent SDK — runs the same cycle: gather context → take action → verify the result → repeat. In API terms, one iteration looks like this:

send request
+ tools
check
stop_reason
execute the
requested tool
return tool_result
(same tool_use_id)
repeat until
end_turn

The loop the exam expects you to know cold: request → stop_reason → execute → result → repeat.

stop_reason is the loop's steering wheel. The values you must be able to route on:

stop_reasonMeaningYour code should…
tool_useClaude paused to call one or more toolsExecute each tool, append a user message containing a tool_result block per call (matching each tool_use_id), send the conversation back
end_turnClaude finished its answerExit the loop; the task's model-side work is done
max_tokensResponse was cut off at the token limitTreat as incomplete — retry with a higher max_tokens or continue; never parse a truncated answer as final
stop_sequenceA custom stop string you configured was hitHandle per your protocol

Two details that show up as distractors: Claude can emit several tool_use blocks in one response (parallel tool calls) — you must return all the matching tool_result blocks in a single following user message. And a failed tool execution is still returned as a tool_result, just with "is_error": true — you don't abort the conversation, you let the model see the failure and adapt.

The third loop step — verify — is the one weak agents skip. Verification means a programmatic check: run the tests, validate the JSON against the schema, re-query the record you just wrote. An agent that "checks its own work" by asking the model whether it did a good job is not verifying anything.

Exam lensGiven a transcript snippet ending in stop_reason: "tool_use", the correct next step is always: execute the tool, send back a tool_result with the matching tool_use_id, and continue the loop. Answers that "start a new conversation," "retry the request," or "return the partial text to the user" are the planted distractors.
1.2

Single agent vs multi-agent — and why hub-and-spoke wins

The exam's favorite architectural decision: when do you add subagents? The honest default is a single agent — simpler, cheaper, no coordination overhead. Subagents earn their cost in three situations:

  • Context isolation. A subtask would flood the main context with material the parent doesn't need afterwards (a 50-file search, a long document read). The subagent burns its own context and returns only a distilled result.
  • Parallelism. Independent workstreams — research four vendors, review five services — can run concurrently.
  • Specialization. A focused system prompt and a narrow toolset make a subagent measurably better at one job (a reviewer with read-only tools, a test-runner with Bash only).

When you do go multi-agent, topology is the question that matters. The pattern Anthropic teaches — and the exam rewards — is hub-and-spoke (coordinator–subagent):

coordinator
owns plan + state
search subagent analysis subagent synthesis subagent

Spokes never talk to each other. Results flow back through the hub, which reconciles and decides what happens next.

The coordinator decomposes the task, spawns subagents with self-contained instructions, merges their results, and owns every routing decision. A flat topology — peer agents messaging each other directly — is anti-pattern #7: no single place holds the full picture, errors vanish between peers, conversations diverge, and debugging becomes archaeology.

Corollary the exam loves: because a subagent starts with a fresh, empty context, its prompt must carry everything it needs — the goal, the constraints, the format of the answer it should return. "The subagent will see the conversation" is never true.

Exam lensScenario: a research system's subagents "coordinate among themselves" or "share a group chat." Whatever the other options say, the fix is a coordinator that delegates and synthesizes — hub-and-spoke. Also watch for the reverse trap: adding subagents to a small sequential task, where the correct answer is "keep it a single agent."
1.3

Task decomposition and session state

Decompose along independence lines. Good split: "audit these 8 services for the deprecated API" → 8 parallel subagents, one per service, results merged by the coordinator. Bad split: slicing one tightly-coupled refactor into steps that each depend on the previous agent's in-context knowledge — every handoff loses information. If step B needs most of what step A learned, they belong in one agent.

State lives in three places, and the exam tests whether you know which:

LayerWhat it holdsLifetime
Conversation contextWorking memory: recent messages, tool resultsOne session; finite and consumable
Session persistenceResumable transcripts — --continue / --resume in Claude Code, session ids in the Agent SDKAcross process restarts, same machine
External stateDurable facts: order status, checkpoints, artifacts, progress logs — in a DB, file, or ticket systemSurvives everything; shared across agents

The architectural rule: anything that must survive the conversation cannot live only in the conversation. A long-running migration agent should write a checkpoint after each batch (e.g. progress.json, a DB row) so a crash means resuming from batch 47, not starting over. Multi-session workflows (support tickets, week-long projects) key durable state by user or ticket id, and each session loads it as context at start.

Idempotency rides along: if a step can be retried after a crash, executing it twice must be safe — "check then write" beats "append blindly."

Exam lens"The agent lost track of the migration after a restart" → the answer involving external checkpoints beats anything involving "a larger context window" or "better prompting." Durability is an architecture property, not a prompt property.
1.4

Failure handling and verification in agent systems

Distributed-systems rules apply, with one twist: the consumer of your error messages is a model, and models can only act on what they can read. Hence anti-pattern #5: a subagent that fails must never return an empty result. It returns a structured error the coordinator can reason about:

{
  "status": "failed",
  "category": "rate_limit",        // vs "auth", "not_found", "invalid_input"…
  "retryable": true,
  "attempted": "queried vendor API for Q3 invoices",
  "context": "429 after 3 attempts with backoff; endpoint healthy per status page"
}

With that, the coordinator can choose: retry with backoff (transient), reroute to another approach (terminal), continue with partial results and say so, or escalate. With an empty result it can only guess — and a guess propagated through a synthesis step becomes a confident wrong answer.

Partial failure policy belongs in the design. If 3 of 4 research subagents succeed, does the report ship with a stated gap, or block? Either can be right; deciding at 2 a.m. in production is wrong. The exam expects you to name the policy explicitly.

Verification is programmatic. The reliable pattern for "did the agent's code change work" is: run the test suite. For "is the extraction right": validate against the schema, spot-check against source. Retries are bounded (2–3 with backoff), and what you retry is the operation, not the same failing prompt verbatim — feed the error back so the next attempt differs.

Exam lensAny option where a failing subagent "returns an empty list so the pipeline continues smoothly" is the planted anti-pattern. So is "the coordinator asks the model whether the results look right" as the sole verification step — the exam wants tests, schema validation, or an independent check.

Module quiz — D1

24 questions

Scenario-style, one best answer. After each pick you get the full reasoning — including why each wrong option fails. Every answer is saved (and syncs across browsers): leave anytime and you'll resume where you stopped, and the dots above the card let you revisit any answered question.

D2 · 20%

Claude Code configuration & workflows

This domain tests whether you can set up Claude Code for a team and for automation: the CLAUDE.md hierarchy, path-scoped rules, slash commands and skills, plan mode, hooks, subagents, and headless CI/CD runs.

2.1

CLAUDE.md hierarchy and path-scoped rules

CLAUDE.md is persistent context loaded automatically at session start. Files layer — broader scopes first, more specific scopes override:

LevelLocationUse for
Enterprise policyManaged system path (IT-deployed)Org-wide mandates that individuals can't remove
User~/.claude/CLAUDE.mdPersonal preferences across all your projects
Project./CLAUDE.md, checked into gitTeam-shared: architecture, commands, conventions
Subdirectorypackages/api/CLAUDE.mdArea-specific rules, pulled in when working there

Team conventions belong in the project file — it rides along in git so every teammate and every CI run gets it. A good project CLAUDE.md is lean: build/test commands, architectural map, hard conventions. It's loaded into every session, so every line taxes every request; move long reference material into separate docs the agent can read on demand, or into path-scoped rules: files under .claude/rules/ with glob frontmatter (e.g. paths: ["src/api/**"]) that activate only when matching files are touched.

Imports let the root file pull in others with @path/to/file.md. Personal-only scratch config can live in git-ignored local variants, but the exam's framing is: shared → project file; personal → user file; org mandate → enterprise policy.

Exam lensMonorepo scenario: frontend and backend teams have conflicting conventions. Correct: subdirectory CLAUDE.md files or path-scoped rules — not one giant root file, and not asking each dev to maintain a personal copy (that drifts instantly).
2.2

Slash commands, skills, and subagents

Three extension mechanisms, distinguished by who triggers them and where they run:

  • Slash commands — markdown files in .claude/commands/ (project) or ~/.claude/commands/ (personal). User-invoked (/review-pr 123), with $ARGUMENTS (or $1, $2) interpolation and frontmatter for description, allowed-tools, and model. Best for repeatable prompts a human fires deliberately.
  • Skills — a folder with SKILL.md (name + description frontmatter, instructions, optional scripts/resources). Loaded via progressive disclosure: only the one-line description sits in context until the task matches, then the full skill loads. Best for procedural know-how Claude should apply on its own when relevant — and for anything too long to keep permanently in CLAUDE.md.
  • Subagents — markdown definitions in .claude/agents/ with frontmatter name, description, optional tools and model. Run in an isolated context with only the tools you grant. Best for delegated roles: a code-reviewer that can read but never edit, a test-runner with Bash only.
# .claude/agents/code-reviewer.md
---
name: code-reviewer
description: Reviews diffs for correctness and convention violations
tools: Read, Grep, Glob        # read-only — least privilege
---
You are a strict reviewer. Report findings as file:line with severity…

Decision shorthand: always-on fact → CLAUDE.md · human-triggered workflow → slash command · model-triggered know-how → skill · isolated role with restricted tools → subagent.

Exam lens"The team repeats the same release-notes prompt weekly" → slash command. "Claude should know the deploy runbook when deployment comes up, but it's 3 pages" → skill (progressive disclosure keeps it out of context until needed). "Review must never modify files" → subagent with read-only tools, because that's enforced, not requested.
2.3

Plan mode, permissions, and hooks — enforcement vs suggestion

Plan mode makes Claude research and propose before touching anything: read-only exploration, then a plan you approve, then execution. It earns its keep on multi-file refactors, unfamiliar codebases, and anything risky; it's overhead for a one-line fix. Permission modes set the floor: default (ask per action), acceptEdits (auto-approve file edits), plan (read-only), bypassPermissions (no prompts — only in disposable sandboxes).

Hooks are shell commands the harness itself runs at lifecycle events — PreToolUse, PostToolUse, UserPromptSubmit, Stop, and friends, configured in settings. Two properties make them exam-critical:

  • They are deterministic — they run every time, whether or not the model "remembers."
  • They can block: a PreToolUse hook exiting with code 2 stops the tool call and feeds its stderr back to Claude as instruction.
// settings: run the formatter after every file edit — guaranteed
"hooks": {
  "PostToolUse": [{
    "matcher": "Edit|Write",
    "hooks": [{ "type": "command", "command": "npx prettier --write \"$FILE\"" }]
  }]
}

This is anti-pattern #1's other half: a CLAUDE.md line saying "always run prettier" is a request the model usually honors; a PostToolUse hook is a guarantee. Compliance rules, secret-scanning, protected-path guards, mandatory formatting — anything with "must" in it — belong in hooks (or CI), never in prompt text alone.

Exam lensSpot the verb. "Claude should prefer our logging wrapper" → CLAUDE.md. "Claude must never touch infra/prod/" → PreToolUse hook (or permission deny rules) — an option that puts a must-rule in prompt text is the planted wrong answer.
2.4

Headless mode and CI/CD patterns

Headless mode is Claude Code without the interactive session: claude -p "<prompt>" runs one task and exits — the building block for CI jobs, pre-commit tooling, and scheduled automation.

claude -p "Review this diff for security issues. Output JSON: \
{findings:[{file,line,severity,issue}]}" \
  --output-format json \
  --allowedTools "Read,Grep,Glob" \
  --max-turns 15

The flags that matter architecturally:

  • --output-format json (or stream-json) — machine-parseable results for the pipeline step that consumes them.
  • --allowedTools — an explicit allowlist. CI runs unattended, so nobody is there to approve prompts; you pre-authorize the minimum (read-only for review jobs) instead of bypassing permissions wholesale.
  • --max-turns — a runaway bound, because unattended loops need ceilings.

The PR-review pattern (GitHub Action or equivalent): trigger on PR → run claude -p with the diff and explicit review criteria → post findings as comments. False-positive control is a design task, and the exam knows the levers: state concrete criteria and severity definitions in the prompt, require file:line evidence for each finding, set a severity threshold below which the job stays silent, and keep review jobs read-only so a bad day can't push code. A noisy reviewer gets ignored within a month — precision beats recall in automated review.

Exam lensCI scenarios test the allowlist instinct: the correct option pairs -p + --output-format json + a minimal --allowedTools. Options featuring bypassPermissions in CI, interactive mode in a pipeline, or prose output parsed with regex are the distractors.

Module quiz — D2

21 questions
D3 · 20%

Prompt engineering & structured output

Not "clever prompts" — production prompts: explicit criteria, few-shot for the ambiguous cases, JSON that survives a parser, review loops that catch defects, and knowing when the Batch API and prompt caching change the economics.

3.1

Explicit criteria beat vague instructions; few-shot covers ambiguity

The exam's model of a good prompt is an engineering spec, not a wish. Three moves cover most questions:

  • Convert adjectives into criteria. "Be concise" → "3 sentences max." "Flag risky clauses" → "Flag clauses matching any of: uncapped liability, auto-renewal > 12 months, unilateral termination." If a human reviewer couldn't apply your instruction consistently, neither can the model.
  • Few-shot the ambiguity, not the obvious. Examples are for the cases where the rule bends: the sarcastic complaint that's actually churn risk, the "question" that's really a refund demand. 3–5 well-chosen edge cases beat 20 easy ones — and include a counter-example ("this one looks like X but is Y, because…").
  • Structure with XML tags. Delimit inputs (<document>, <transcript>) so instructions can't blur into data; put the role and non-negotiables in the system prompt; put per-request content in user messages.

One more production reality: instructions in the system prompt set policy; content arriving at runtime (user text, scraped pages, tool output) is data. A prompt that lets fetched content override policy is an injection hole — the exam frames this as "why did the agent follow instructions found in the document?"

Exam lensA classifier "inconsistent on edge cases" → the answer is few-shot examples of those edge cases, not "raise temperature," not "ask it to be more careful," and usually not fine-tuning-flavored options. Measurable criteria > politeness > magic words.
3.2

Structured output that survives production

"Please respond with JSON" is a request. The production pattern is a contract with three parts:

  1. Schema-constrained generation. Define a tool whose input_schema is your output schema, and force it with tool_choice: {"type": "tool", "name": "record_extraction"}. Claude's "tool call" is your structured output — no prose preamble, no markdown fences to strip.
  2. Validation. Parse and validate against the schema (types, enums, required fields, ranges) before anything downstream sees it.
  3. Bounded retry with the error. On failure, retry (2–3 attempts max) and include the validator's message: "Your last response failed: amount must be a number, got '1,240.50 EUR'." The error in the loop is what makes retries converge instead of coin-flipping.

Hallucination-proofing extraction is its own tested idea: every field a document might legitimately lack must be nullable, with the instruction "return null when absent — never infer." A required "invoice_date" on a document with no date doesn't produce an error; it produces a plausible fabricated date, which is worse. Nullable fields give the model a legal way to say "not there."

"input_schema": {
  "type": "object",
  "properties": {
    "invoice_number": { "type": "string" },
    "due_date":  { "type": ["string","null"], "description": "ISO date; null if absent" },
    "total":     { "type": ["number","null"] }
  },
  "required": ["invoice_number","due_date","total"]   // required ≠ non-null
}

For extraction and classification, drop temperature to 0 — variability is a cost there, not a feature.

Exam lens"Downstream parser breaks once a day" → forced tool_choice + validation + retry-with-error. "Model invents values for missing fields" → nullable fields + explicit null instruction. Options that just re-word the request ("emphasize that JSON must be valid") are distractors.
3.3

Multi-pass review architectures

One generation pass produces a draft; production quality comes from separating generate and critique:

pass 1
generate
pass 2 · critique
fresh context + rubric
pass 3
revise w/ findings
validate /
ship

The critique pass sees the draft as new input — it inherits none of the generator's momentum.

The details that make it work (and that questions probe):

  • Fresh context for the reviewer. A model asked "check your work" inside the same conversation anchors on its own reasoning. A separate call — reviewing the draft as input it has never seen — catches what the generator can't.
  • A rubric, not vibes. The critique prompt lists concrete checks ("every claim cites a source section," "all amounts match the table") and returns structured findings.
  • Convergence bounds. Fix-and-recheck loops are capped; after N passes, remaining findings escalate rather than looping forever.
  • Cost honesty. Three passes ≈ 3× the calls. Reserve multi-pass for high-stakes output (published reports, generated code, legal summaries); a chat reply doesn't need a review pipeline.
Exam lensThe wrong options bundle critique into the same conversation ("then ask it to double-check") or run unlimited fix loops. Right answers: independent pass, explicit rubric, bounded iterations, escalation on non-convergence.
3.4

The economics: Batch API, prompt caching, model tiering

Three levers, each with a tradeoff the exam makes you weigh:

LeverWhat you getThe catch
Message Batches API50% off input and output tokens; submit up to ~100k requests per batchAsynchronous — most batches finish well under an hour, but only a 24-hour window is promised. No real-time SLA → never in a user-facing request path (anti-pattern #3)
Prompt cachingCached prefix reads cost ~90% less and return fasterCache writes cost ~25% extra; entries expire after ~5 idle minutes (1-hour option costs more); only an identical, stable prefix hits
Model tieringHaiku-class models for routing, triage, simple extraction at a fraction of the costRoute by measured task difficulty, not by hope; keep the strong model where reasoning depth pays

Caching mechanics worth knowing cold: the prefix is built in order — tools → system → messages — and you place cache_control breakpoints after the stable parts. Anything volatile (timestamps, user ids, request-specific data) must come after the cached prefix; one changed byte upstream of the breakpoint invalidates the hit. In agent loops, caching the system prompt + tool definitions is the difference between linear and quadratic cost growth as turns accumulate.

The composite pattern for bulk offline work — nightly classification of 100k tickets: shared instruction prefix cached, per-ticket content varying, submitted as a batch. The discounts stack.

Exam lensGiven a workload, pick the lever: overnight bulk → Batch. Repeated identical prefix, latency-sensitive → caching. Simple high-volume routing → smaller model. And any option that puts a user-facing chat on the Batch API is auto-wrong — no SLA.

Module quiz — D3

21 questions
D4 · 18%

Tool design & MCP integration

Tools are the contract between your system and the model. This domain covers writing tool definitions Claude uses correctly, returning errors it can recover from, and wiring external capability in through the Model Context Protocol.

4.1

Tool definitions Claude actually uses correctly

Claude chooses tools by reading their descriptions — nothing else. Tool selection bugs are almost always documentation bugs:

  • Description = what it does + when to use it + what it returns. "Search the product catalog by keyword; use for availability and price questions; returns up to 20 items with SKU, price, stock" beats "Product search."
  • Disambiguate overlapping tools explicitly. If search_orders and get_order coexist, each description says when the other is the right choice ("if you already have an order id, use get_order").
  • Tight input schemas. Enums for closed sets, formats spelled out ("ISO 8601 date"), required vs optional made honest, and per-parameter descriptions. Every loose parameter is an invitation to improvise.
  • Fewer, better tools. Each definition costs context and adds a selection error mode. Ten sharp tools outperform forty vague ones; consolidate near-duplicates into one tool with a mode parameter when the interface stays clear.

Return values are design too: include the fields the agent needs to continue reasoning (ids for follow-up calls, human-readable status), not a raw DB row dump that floods context.

Exam lens"The agent keeps calling the wrong tool" → rewrite descriptions to state when-to-use and when-not; consolidate overlap. Distractors say "add more examples to the system prompt" or "lower temperature" — treating a contract problem as a prompting problem.
4.2

Error responses the model can act on

When a tool fails, the model is the error handler — so the error must be written for a reasoning consumer. The exam's canonical shape:

// returned as a tool_result with "is_error": true
{
  "category": "rate_limit",     // a closed set: rate_limit | auth | not_found | invalid_input | timeout…
  "retryable": true,
  "message": "Inventory API throttled (429). Safe to retry after ~30s.",
  "hint": "If this is the 3rd failure, report inventory as unavailable instead."
}
  • Category from a closed set lets behavior branch predictably — and lets your monitoring count failure classes.
  • retryable is the load-bearing bit: transient (rate_limit, timeout) → try again with backoff; terminal (not_found, invalid_input) → change the input or the plan, never blind-retry.
  • Message and hint tell the model what happened and what a sensible next move is — recovery guidance, not a stack trace.

Two failure modes the exam plants as distractors: raising an exception that kills the whole conversation (a tool failure is information, not a crash), and returning {"error": "something went wrong"} — which gives the model nothing to branch on, so it guesses.

Exam lensPick the option where the error is a structured tool_result with category + retryable flag, and the agent's retry policy is bounded. "Return an empty result so the flow continues" is anti-pattern #5 wearing a tool-shaped hat.
4.3

MCP: three primitives, transports, and scopes

The Model Context Protocol standardizes how external capability plugs into Claude (and any MCP client). A server exposes up to three primitives, distinguished by who controls invocation — the exam's favorite MCP question:

PrimitiveControlled byUse when
ToolsThe model decides to call themActions and lookups the agent should take autonomously: query a DB, create a ticket
ResourcesThe application attaches themContext data the app supplies: file contents, schemas, records — read, not executed
PromptsThe user invokes themReusable templates surfaced as commands a human deliberately fires

Transports: stdio for a server running as a local child process (dev tools, local scripts — no network hop), HTTP for remote shared services (a team's ticketing bridge, hosted connectors — with real auth). Scopes in Claude Code decide who gets the config:

  • local — just you, just this project (default; experiments, personal credentials).
  • project — written to .mcp.json, checked into git, shared with the whole team. Secrets stay out — use env-var expansion.
  • user — you, across all projects (your personal utilities).
claude mcp add --scope project ticketing -- npx @acme/ticketing-mcp
# → .mcp.json committed; teammates get the server on next session
Exam lensMap the phrase to the primitive: "the agent should be able to…" → tool. "the app should provide the schema as context" → resource. "users run a standard triage template" → prompt. And "the whole team needs this server" → project scope / .mcp.json, not everyone running local add commands.
4.4

Scoping tools per role — least privilege for agents

Anti-pattern #6 is giving every agent the full toolset "for flexibility." It fails on three axes at once:

  • Safety: a research subagent with write access to production is an incident with a timestamp not yet filled in. Tool grants are the agent's blast radius.
  • Accuracy: tool selection error grows with the option count; an agent choosing among 8 relevant tools outperforms one choosing among 40.
  • Cost: every definition rides in every request's context, for every agent, whether used or not.

The discipline mirrors IAM: grant per role, deny by default. The reviewer gets Read, Grep, Glob. The test-runner gets Bash scoped to test commands. The deployer alone holds deploy tools — and its irreversible actions sit behind an approval gate. In Claude Code this is the subagent tools frontmatter plus permission rules; in the Agent SDK, per-agent allowed-tool lists; with MCP, per-agent server selection — same principle, three mechanisms.

Governance rounds it out: log which agent called which tool with which arguments (audit trail), and route high-consequence tools through human confirmation. If reading the log can't tell you which agent broke something, the scoping is too loose.

Exam lensAny option granting all agents everything — or fixing misuse by adding prompt text like "please don't use the deploy tool" — is wrong on sight. Restriction is enforced in configuration, not requested in prose. (That's #1 and #6 shaking hands.)

Module quiz — D4

21 questions
D5 · 15%

Context management & reliability

The smallest domain by weight, but its ideas — attention isn't uniform, handoffs must be structured, escalation must be deterministic — are the tiebreakers hiding inside questions from every other domain.

5.1

Long context is a budget, not a solution

Anti-pattern #4: assuming a bigger window fixes retrieval. A 200k-token window means the model can hold 200k tokens — not that it attends to all of them equally. Effective use is about placement, structure, and selection:

  • Placement: non-negotiable policy lives in the system prompt. In very long contexts, material buried mid-stream is recalled worst — anchor critical constraints where they're privileged, and restate the question after a long document rather than only before it.
  • Structure: wrap each source in labeled XML (<contract id="7">…) and have the model quote or cite the relevant section before answering — grounding beats hoping.
  • Selection: if the task needs 5 of 400 pages, retrieve those 5 (search/RAG) instead of shipping the filing cabinet. Less irrelevant context is an accuracy win, not just a cost win.
  • Agent-loop hygiene: long sessions accumulate stale tool results. Compaction — summarize-and-clear — keeps the working set relevant; old bulky outputs are the first thing to drop.
Exam lens"Accuracy dropped when we concatenated all 40 documents; should we buy a bigger window?" — no. Right answers restructure: retrieve what's relevant, label sources, require citations, put rules in the system prompt. "Upgrade to the larger context model" alone is the planted distractor.
5.2

Handoffs and information preservation

Context ends — sessions close, windows fill, work moves between agents and humans. What survives is what you deliberately package. The tested pattern is the structured handoff:

## Handoff — payment-service refactor
Goal:        extract billing logic into billing/ module
Decisions:   keep Stripe adapter interface; do NOT touch webhooks (on-call freeze)
State:       7/12 call sites migrated (list in migration.md); tests green as of run #482
Blocked on:  finance sign-off for invoice rounding change
Next steps:  migrate remaining 5 sites, then delete legacy shim

Principles behind it:

  • Decisions and constraints outrank narrative. The successor needs what was decided and why, plus what must not be done — not a replay of the whole transcript. A raw dump buries the two lines that matter.
  • Externalize, don't rely on memory. The handoff is written to a durable place (file, ticket, DB) and the next session loads it as context — the same external-state rule from D1, applied to knowledge.
  • Compaction is a handoff to yourself. When a long session's context is summarized, the same priorities apply: keep goals, decisions, open items, current state; drop verbose tool output and dead-end exploration.
Exam lensBetween "pass the full transcript," "start fresh," and "pass a structured summary of goal / decisions / state / next steps," the structured summary wins. Full transcripts waste and bury; fresh starts repeat mistakes already paid for.
5.3

Escalation that actually triggers

Anti-pattern #2 is routing on the model's self-reported confidence ("escalate when you're unsure"). Self-assessment isn't calibrated — a model can be fluently wrong at 9/10 confidence — and it makes escalation unauditable. The exam wants deterministic triggers, checked in code:

Trigger classExample
Attempt bounds3 failed resolution attempts → human queue
Policy boundariesrefund > $200, legal-threat keywords, account flagged → escalate regardless of the model's plan
Validation failuresoutput fails schema/business checks after retries → never ship it anyway
Explicit requestuser asks for a human → immediate, unconditional
Irreversibility gatesdestructive or high-value actions require human approval before execution

Design the handoff, not just the trigger: the human receives a package — conversation summary, what was attempted, why this escalated, customer state — so escalation is a warm transfer, not a cold restart. And the boundaries themselves live in code or config where they're testable; the prompt merely tells the agent they exist.

Exam lensIn every support-agent scenario, scan options for "the agent decides based on its confidence" — wrong. The right option names a hard threshold, a bounded retry count, or an approval gate. When policy and the model's judgment conflict, policy wins.
5.4

Reliability across a multi-agent system

D5 closes the loop that D1 opened: errors must propagate with context, and the system must degrade on purpose rather than by accident.

  • Propagation: a subagent failure travels up as structured data (category, retryable, what was attempted) and the coordinator — the only component with the full picture — decides: retry, reroute, degrade, or escalate. Handling failures silently at the edge hides them from the one component that could respond well.
  • Timeouts and budgets everywhere: per tool call, per subagent, per task (--max-turns in headless runs). An agent that can hang forever eventually will.
  • Bounded, differentiated retries: with backoff, only for retryable categories, and each retry varies something — otherwise it's the same failure at higher cost.
  • Graceful degradation is declared: "3 of 4 sources analyzed; vendor-API data unavailable" — partial results ship labeled, or the policy says block. Silent gaps become confident wrong reports downstream.
  • Observability: log every tool call, hand-off, and decision with ids. When the answer is wrong, you replay the reasoning chain instead of interrogating a black box.
Exam lensReliability questions reward the option where the coordinator makes the call on structured error data, retries are bounded and category-aware, and partial results are labeled. Distractors: infinite patience, silent catch-and-continue, or "the subagent handles it internally so the coordinator stays simple."

Module quiz — D5

18 questions
High-yield · distractor radar

The 7 anti-patterns

A large share of exam questions are "which design is wrong" in disguise. These seven are the wrongness the exam plants over and over. Learn them as reflexes — each one names the failure, why it fails, and the design that replaces it.

Anti-pattern 01

Prompt-based rules where enforcement is required

"Never commit secrets" written in CLAUDE.md is a request the model usually honors. Usually is not a guarantee, and compliance needs guarantees.

Instead: hooks (PreToolUse gate, PostToolUse formatter), permission rules, CI checks. Prompts express preferences; mechanisms enforce rules.

Anti-pattern 02

Routing escalation on model self-reported confidence

"Escalate when you're unsure" assumes calibrated self-assessment. Models are fluently wrong; the riskiest cases are precisely the ones it won't flag.

Instead: deterministic triggers checked in code — attempt counts, value thresholds, policy boundaries, validation failures, explicit user request.

Anti-pattern 03

Batch API in a user-facing path

The 50% discount is for asynchronous workloads. Batches promise completion within 24 hours — there is no real-time SLA to build a chat experience on.

Instead: Batch for offline bulk (nightly classification, backfills); standard API + prompt caching + model tiering for anything a user is waiting on.

Anti-pattern 04

Assuming a bigger context window fixes attention

A window is capacity, not comprehension. Dumping 40 documents in and hoping scales the cost linearly and the accuracy problem not at all.

Instead: retrieve what's relevant, structure sources with labeled tags, require citations, anchor rules in the system prompt, compact stale context in long loops.

Anti-pattern 05

Subagent failures returning empty results

An empty list "keeps the pipeline smooth" — and turns a visible failure into an invisible gap that a synthesis step will paper over with confidence.

Instead: structured error results — category, retryable flag, what was attempted — so the coordinator can retry, reroute, degrade labeled, or escalate.

Anti-pattern 06

Every agent gets the full toolset

"Flexibility" that buys three failure modes: bigger blast radius, worse tool selection, and context spent on definitions the agent never uses.

Instead: least privilege per role — reviewer reads, tester runs tests, deployer deploys behind an approval gate. Grants in config, not requests in prose.

Anti-pattern 07

Flat multi-agent topology

Peers coordinating peer-to-peer means no component holds the full picture: divergent state, lost errors, undebuggable flows.

Instead: hub-and-spoke — a coordinator owns the plan and state, delegates self-contained subtasks, reconciles results, makes every routing decision.

Reflex drill

21 rounds

One design statement at a time — call it sound or anti-pattern before the reasoning unlocks. On the real exam you'll be doing exactly this inside every distractor list.

Exam simulation

Mock exam

The full 60-question form, weighted like the real exam (16·D1, 12·D2, 12·D3, 11·D4, 9·D5) under the real 120-minute clock. Flag anything you want to revisit, jump around with the grid, submit when ready — then study the per-domain report and the per-option reasoning for every question. Your run is saved continuously (and syncs), so you can close the tab and resume on any browser — the clock keeps running, like the real thing.

Getting to exam day

Study plan & hands-on exercises

Reading gets you to ~60%; the last stretch is built with your hands. Six weeks at a few hours per week if you're newer to Claude — compress to 2–3 weeks if you already build with it daily.

Six-week track
Week 1

API foundations

Anthropic Academy: Claude 101 + Building with the Claude API. Hand-roll one agentic loop on the raw Messages API — no framework — until stop_reason routing is muscle memory. Then read this course's D1.

Week 2

Claude Code, daily

Claude Code in Action course, but the real study is using it on a real repo: write the project CLAUDE.md, add two slash commands, one subagent, one hook. Read D2 here and take the quiz.

Week 3

MCP & tools

Intro to MCP + MCP Advanced Topics. Build one MCP server exposing a tool, a resource, and a prompt; wire it into Claude Code at project scope. Read D4; drill the tool-error shape.

Week 4

Prompting & structured output

Build an extraction pipeline: forced tool_choice, nullable fields, validation-retry. Add a batch variant and a cached-prefix variant, and compare costs. Read D3.

Week 5

Multi-agent week

Build a small hub-and-spoke research system (coordinator + 2–3 subagents) with structured failure results and one deterministic escalation rule. Read D5 and the anti-patterns until the drill is trivial.

Week 6

Simulate & close gaps

Anthropic's official practice questions + this course's mock under the timer. Score a domain below ~75%? Re-read that module and rebuild the matching exercise. Book the exam while it's fresh.

The 8 hands-on exercises · tracked

These mirror the official prep guidance. Checking all eight off means every exam domain has passed through your keyboard at least once.

End-to-end agentic loopRaw Messages API: tools, stop_reason routing, tool_result returns, is_error handling, bounded retries.
Architectural CLAUDE.mdFor a real project: commands, structure map, conventions — lean enough that every line earns its context cost.
MCP server with all three primitivesA tool, a resource, and a prompt; connect via stdio locally, share at project scope.
Extraction pipeline with schema + retryForced tool_choice, nullable fields, validator feeding errors back, temperature 0.
Hub-and-spoke multi-agent systemCoordinator decomposes, subagents return structured results/errors, coordinator synthesizes.
Claude Code in CIHeadless -p job with --output-format json and a minimal --allowedTools allowlist; post findings to a PR.
Prompt-caching cost cutStable prefix (tools → system), cache_control breakpoint, measure cached vs uncached cost on 50 calls.
Deterministic escalation designSupport-style agent with hard thresholds, attempt bounds, and a human-readable handoff package.
Exam-day notes
  • Pace: 2 min/question. First pass: answer everything answerable, flag the rest; second pass: flagged only. Never camp on one scenario.
  • Read the last line first. Stems are long; the question ("which approach BEST…", "what should the architect do FIRST…") tells you what to scan the scenario for.
  • Eliminate by anti-pattern. Most questions contain 1–2 options that are straight anti-patterns — clear them instantly, then choose between the survivors on fit to the scenario's constraints (latency? cost? irreversibility?).
  • "Best" beats "works." Several options often function; the credited one respects the stated constraint. Re-read the stem's qualifier before locking in.
  • Multiple-response questions state the count. "Choose TWO" means exactly two — no partial credit for creative interpretations.
Official resources