Domain 1 · 27% of the exam
Agentic Architecture & Orchestration
Building the agent loop: reading stop_reason to decide continue-or-stop, decomposing tasks, delegating to subagents, and coordinating multi-agent systems without deadlock or drift.
- 1.1The Agentic Loop and stop_reasonAn agent is Claude in a loop. Your code sends the conversation, reads stop_reason, runs the tools Claude asked for, appends the results and repeats until Claude ends its turn.
- 1.2Coordinator-Subagent OrchestrationIn a hub-and-spoke system the coordinator decomposes the work, decides which subagents a query actually needs, routes every message, and loops back when the synthesis has gaps.
- 1.3Spawning Subagents and Passing ContextSubagents are spawned through the Task tool, start with no memory of the coordinator's conversation, and only know what you put in their prompt, so pass complete findings, keep metadata structured, and spawn in parallel.
- 1.4Workflow Enforcement and Human HandoffWhen a step must happen before another, enforce it in code rather than asking nicely in the prompt; split multi-issue requests into items; and hand off to humans with a structured summary they can act on.
- 1.5Agent SDK Hooks: Interception and NormalizationHooks run your code at fixed points in the agent loop. PreToolUse hooks block or redirect tool calls before they run; PostToolUse hooks reshape tool results before Claude sees them. Use them when a rule must hold every time.
- 1.6Task Decomposition StrategiesUse a fixed chain of steps when the work is predictable and an adaptive plan when each finding changes what to do next; split large reviews into per-file passes plus an integration pass.
- 1.7Sessions: Resume, Fork or Start FreshResume a named session when its context is still true, fork it to try two approaches from the same analysis, and start fresh with a summary when the code has moved on and old tool results are stale.