Domain 1 — Agentic Architecture & Orchestration
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_reasonvalues:"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. - An iteration cap is a safety net only — never the primary stopping mechanism.
- Tool results are appended to the conversation so the model can reason about the next step.
1.2 — Multi-Agent Orchestration · Core
- Hub-and-spoke: one coordinator manages all inter-subagent communication, routing, and error handling.
- Parallel subagents: emit multiple
Taskcalls in one response (not across separate turns). - Zero context inheritance — subagents do not inherit the coordinator's history. Pass everything explicitly in the subagent prompt.
1.5 — Hooks: Pre vs Post ToolUse · Core
PreToolUse= block/gate BEFORE execution (e.g. verify identity before a refund; block refunds over a threshold).PostToolUse= normalise/enrich results after execution, before the model sees them.- Deterministic over probabilistic for financial / compliance / security — use hooks, not prompt instructions.
⚠ Often-missed — PostToolUse for Multi-Tool Normalisation · Gap
When multiple tools return different currencies / units / formats, a PostToolUse hook normalises ALL of them to a common format before Claude sees the results — so the model reasons over consistent data.
1.7 — Session Management · Core
--resume— continue a session when prior context is still valid.fork_session— branch from a shared baseline to explore divergent approaches.- Stale context → start fresh and inject a summary rather than resuming with stale tool results.
- Be aware of
/compactrisks (it can drop exact values — protect critical facts; see Domain 5).
⚠ 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.
Exam reflexes for Domain 1
- "CI pipeline hangs" → not here, but remember
-pflag (Domain 3). - "Narrow results from multi-agent" → fix the coordinator's decomposition, not the subagents.
- "Parallel agents" → multiple
Taskcalls in ONE response. - "Must guarantee a step happens" (refund/identity) → programmatic gate (PreToolUse), not a prompt.
- "Agent crash recovery" → periodic JSON manifest + inject on resume.