Skip to content

    Certification

    CCA Domain 1: Agentic Architecture and Orchestration

    Exam-ready notes for Domain 1 (27%) of the Claude Certified Architect — Foundations: the agentic loop, multi-agent orchestration, hooks, and recovery.

    By Published 9 min read

    Share

    This lesson is part of Claude Certified Architect — Foundations. Enroll for free, then sign in, to read it in full.

    CCA Foundations course · Page 2 of 8 · ← Back to all courses · Weight: 27% (the heaviest domain — master this first). Mark this page complete at the bottom to advance your course progress.


    1.1 — The Agentic Loop · Core

    The loop: send request → inspect stop_reason → execute tool → append result → repeat.

    • stop_reason values: "tool_use" (continue — run the tool), "end_turn" (done), "max_tokens" (truncated), "stop_sequence".
    • Control flow is driven ONLY by stop_reason. Never parse the model's text to decide whether to continue — Claude's phrasing varies every run, so a text-matching loop stops mid-task or never stops at all.
    • The API is stateless. Every request carries the full conversation so far; Claude decides its next action from everything currently in messages, so a dropped tool result is a fact the model has permanently forgotten.
    • Tool results append as role: "user", type: "tool_result", matching tool_use_id. A mismatched or missing tool_use_id silently breaks the turn.
    • The model is not following a fixed script. Claude chooses each next action dynamically from context — it can emit text and request a tool in the same turn, so never treat any assistant text alone as "done." That flexibility is the point of an agent, but it means termination must be detected from the structured stop_reason, never the prose.
    • An iteration cap is a safety net only — never the primary stopping mechanism. Swapping the stop_reason check for "stop after N loops" cuts complex tasks short before they finish.
    • Three anti-patterns the exam tests together: parsing text for a magic phrase ("resolution complete"), using an iteration cap as the only stop condition, and treating any assistant text as completion even when a tool_use block sits alongside it in the same turn.

    1.2 — Multi-Agent Orchestration · Core

    • Hub-and-spoke: one coordinator owns routing, error handling, task decomposition, and result aggregation for every subagent (the spokes — web search, document analysis, synthesis, report writing). Routing all communication through the coordinator gives a single place for observability and consistent error handling.
    • Parallel subagents: emit multiple Task calls in one response (not across separate turns) so subagents launch simultaneously and cut total wall-clock time.
    • Zero context inheritance — subagents do not inherit the coordinator's history. Pass everything explicitly in the subagent prompt.
    • The coordinator dynamically selects which subagents a query needs — always invoking the full pipeline regardless of the query is a static anti-pattern.
    • Classic failure — overly narrow decomposition. "Research AI in creative industries" broken into only digital art, graphic design, and photography silently misses music, writing, and film — every subagent succeeds at its assigned task, but the assignment itself was wrong. The bug is in what was delegated, not how it ran.
    • The fix — iterative refinement: decompose → delegate → synthesise → check the synthesis for coverage gaps → re-delegate targeted queries for the gaps → re-synthesise, looping until coverage is sufficient, rather than treating the first synthesis pass as final.
    • Design coordinator prompts around goals and quality criteria ("produce a comprehensive, cited report covering all major sub-areas"), not rigid step-by-step procedures — goal-based prompts let subagents adapt; scripted ones make them brittle.

    ⚠ Often-missed — Direct Subagent-to-Subagent Communication · Gap

    Subagents must never exchange results directly with each other. A design where the web-search subagent hands its findings straight to the synthesis subagent — bypassing the coordinator — looks efficient but breaks observability and error handling: the coordinator can no longer see what was passed, retry a failed step, or reconcile conflicting outputs. Every hop goes coordinator → subagent → coordinator, even when two subagents' work feeds into each other.

    1.3 — Subagent Invocation & Context Passing · Core

    • The Task tool spawns a subagent. The coordinator's allowedTools must include "Task" — without it, no delegation is possible. This is a hard requirement, not a convention.
    • AgentDefinition configures a subagent's identity: name, system prompt, description, and allowed tools. Each subagent type gets its own definition — e.g. a web_search agent whose definition pins allowed_tools to ["web_search"] only, with no Write or Bash — and scoping its tools to its role is what keeps it from misusing capabilities outside its specialisation.
    • Pass findings as structured data with provenance, not a vague summary — include source URLs, document names, page numbers, and publish dates alongside every claim so attribution survives synthesis.
    • fork_session branches an independent copy of the session from a shared baseline — use it to explore two approaches (e.g. two testing strategies) in parallel without either contaminating the other.
    • System prompts define persistent specialisation; dynamic content (changed files, the current PR diff, this turn's findings) is passed per invocation, not baked into the definition.

    ⚠ Often-missed — Task Tool Requires "Task" in allowedTools · Gap

    A coordinator configured with allowedTools = ["Read", "Grep"] cannot spawn any subagent — the list is simply missing "Task". This is a common trap: the orchestration design can be entirely correct on paper and delegation still silently fails because of one missing tool name.

    1.4 — Multi-Step Workflow Enforcement & Handoff · Core

    • A programmatic prerequisite is a code-level gate that blocks a tool until a required earlier step has completed, enforced deterministically by the system, not by the model.
    • Prompt instructions have a non-zero failure rate — always. Production data shows agents skipping a mandated identity-verification step in 12% of cases even when explicitly told not to. When the consequence is financial or safety-critical, deterministic enforcement is the only reliable fix — not a more emphatic prompt, not few-shot examples, and not a routing classifier (that fixes tool availability, which is the wrong problem when the issue is tool ordering).
    • Multi-concern requests ("I have a damaged item AND a billing issue") decompose into distinct items, investigate each in parallel using shared context, then synthesise a single unified response — replying to only the loudest concern and dropping the other is the failure mode this guards against.
    • Escalation handoff goes to a human agent with no access to the conversation transcript — the handoff document is their only context. A complete handoff includes: customer ID, root-cause analysis, refund/transaction amounts, and a recommended next action. An incomplete handoff (raw output with no root cause or recommendation) forces the human to redo the investigation from scratch.
    • Checkpoints save intermediate state to persistent storage; on restart the system resumes from the last completed checkpoint, never from the beginning — re-running a 40-step batch job from step 1 after a crash at step 35 is the anti-pattern the exam flags.

    1.5 — Hooks: Pre vs Post ToolUse · Core

    • PreToolUse (tool-call interception) = block/gate BEFORE execution — e.g. verify identity before a refund, or block any refund over $500 and redirect straight to human escalation, with zero model discretion in the decision.
    • PostToolUse = normalise/enrich results AFTER execution, before the model ever sees them.
    • Deterministic over probabilistic for financial / compliance / security — use hooks, not prompt instructions, whenever a business rule requires guaranteed compliance rather than likely compliance. The distinction the exam draws: a hook runs in code outside the model's control; a system-prompt instruction is a request the model can still fail to follow.

    ⚠ Often-missed — PostToolUse for Multi-Tool Normalisation · Gap

    When multiple tools return different currencies / units / timestamp formats / status codes (one MCP tool returns Unix timestamps, another ISO 8601, another numeric codes), a PostToolUse hook normalises ALL of them to a common shape before Claude sees the results — so the model reasons over consistent data instead of silently misinterpreting one tool's format as another's.

    1.6 — Task Decomposition Strategies · Core

    Two decomposition styles, and the exam tests choosing correctly between them:

    • Fixed sequential pipeline (prompt chaining) — use when the aspects are known in advance and predictable (standardised forms, fixed CI steps, repeatable report formats). For a large code review, the proven shape is per-file local passes + a separate cross-file integration pass.
    • Dynamic / adaptive decomposition — use when the work is open-ended and subtasks depend on what's discovered along the way (multi-dimensional research, variable-structure documents, "add comprehensive tests to a legacy codebase"): map the structure first, identify high-impact areas, then build a plan that adapts as dependencies surface.
    • Hybrid routing: classify the input at intake — e.g. tag an incoming document "standard invoice" (fixed pipeline: extract → validate → file) vs "unstructured contract" (dynamic: map structure, then decide what to extract) — fixed decomposition for standard templates, dynamic decomposition for free-form input.
    • Recognise when no decomposition is needed at all — a single well-defined task handled directly beats an over-engineered multi-agent pipeline; not every request justifies a coordinator and subagents.

    ⚠ Often-missed — Attention Dilution in Single-Pass Review · Gap

    A single pass across 14+ files gives inconsistent depth, misses obvious bugs, and can even contradict itself — flagging a pattern in one file while approving identical code in another. The root cause is attention dilution, not a capability gap, and a bigger context window does not fix it. The fix is splitting into per-file local passes plus one cross-file integration pass (see 1.6).

    1.7 — Session Management · Core

    • --resume <session-name> — continue a specific named session across work sessions when the prior context is still mostly valid; naming the session (claude --resume refactor-auth-module) is what makes it findable later, instead of relying on the most-recent anonymous session.
    • fork_session — branch independent copies from a shared baseline to compare two divergent strategies (e.g. JWT vs OAuth2) without cross-contamination; each branch explores its approach with the same starting context but neither sees the other's findings.
    • Resume vs. start fresh is the key judgment call:
      • Resume when prior context is mostly still valid — after a small code change, tell the resumed session exactly which files changed so it re-analyses only those targets instead of re-exploring everything.
      • Start fresh with an injected summary when prior tool results are stale (e.g. after 35 schema migrations) — a clean, structured summary of what's still valid beats resuming on top of out-of-date tool outputs the model may still trust.
    • Be aware of /compact risk — it can drop exact values during summarisation; protect critical facts with a persistent case-facts block (see Domain 5.1).

    ⚠ Often-missed — Structured State Persistence / Crash Recovery · Gap

    Periodically export a JSON manifest: goal + processed files + remaining files + key entities. On recovery, start a fresh agent and inject the manifest — far more reliable than resuming a long, stale session that's dragging outdated tool results behind it.


    Exam reflexes for Domain 1

    • "Text-matching loop sometimes never stops" → branch on stop_reason, not message text.
    • "Narrow results from multi-agent" → fix the coordinator's decomposition, not the subagents.
    • "Subagents passing results to each other directly" → route through the coordinator — direct hops break observability.
    • "Parallel agents" → multiple Task calls in ONE response.
    • "Subagent can't be spawned" → check allowedTools includes "Task".
    • "Must guarantee a step happens" (refund/identity) → programmatic gate (PreToolUse), not a prompt.
    • "Agent crash recovery" → periodic JSON manifest + inject on resume.
    • "Escalation to a human" → handoff doc needs ID + root cause + amounts + recommended action.
    • "14+ files reviewed inconsistently" → per-file passes + one integration pass, not a bigger context window.
    • "Two approaches to compare in parallel" → fork_session, not sequential --resume.
    • "Large-scale changes since last session" → start fresh + inject a structured summary, don't resume.

    TIP

    Test yourself on this domain. Take the Domain 1 practice quiz — 60 questions, instant scoring, an explanation for every answer.

    Enroll to keep reading

    Lesson 2 of 8 · Claude Certified Architect — Foundations

    Exam-ready notes for Domain 1 (27%) of the Claude Certified Architect — Foundations: the agentic loop, multi-agent orchestration, hooks, and recovery.

    In the rest of this lesson

    • 1.3 — Subagent Invocation & Context Passing · Core
    • ⚠ Often-missed — Task Tool Requires "Task" in allowedTools · Gap
    • 1.4 — Multi-Step Workflow Enforcement & Handoff · Core
    • 1.5 — Hooks: Pre vs Post ToolUse · Core
    • ⚠ Often-missed — PostToolUse for Multi-Tool Normalisation · Gap
    • 1.6 — Task Decomposition Strategies · Core

    Enrolling is free. It unlocks every lesson in Claude Certified Architect — Foundations, tracks your progress across devices and keeps your quiz scores. The newsletter is optional.

    Ask about this article

    Get answers grounded in this post. AI-generated — based on this article, and may be imperfect.

    Free: CCA Foundations cheat-sheet (PDF)

    The domains, the 3 universal rules, core concepts, and exam-day shortcuts — one page. Enter your email and it's yours, plus my weekly AI-architecture notes.

    No spam. Unsubscribe any time.

    Scaled AI Weekly

    Enjoyed this? Get more like it every Monday.

    Real architecture decisions, LLMOps patterns that survive production, and engineering leadership advice — from 12+ years of building at enterprise scale. Free. No spam. Unsubscribe anytime.

    Get new articles by email

    Free. We email a confirmation link first, and you can unsubscribe from any email.

    Join engineers building production AI systems

    Comments