What is the agentic loop lifecycle, and what signal drives it?
Space to flipSend request → read stop_reason → if "tool_use", execute tools and append results, then repeat; if "end_turn", terminate. stop_reason is the only authoritative control signal — not prose.
What must happen between agentic loop iterations, and why?
Space to flipTool results must be appended to the conversation context so the model can incorporate the new information into its reasoning for the next action.
← → navigateModel-driven decision-making vs pre-configured decision trees — what's the difference?
Space to flipModel-driven: Claude reasons from conversation context to pick the next tool. Pre-configured: a fixed sequence or decision tree picks for it, regardless of what was just learned.
← → navigateName the three illegal loop termination methods — and the one rule that replaces all of them.
Space to flipThree anti-patterns the exam guide names verbatim:
All three are replaced by one rule: terminate when and only when stop_reason == "end_turn".
What is hub-and-spoke multi-agent architecture?
Space to flipOne coordinator owns all inter-subagent communication, routing, and error handling. Subagents never talk to each other directly — all traffic passes through the coordinator, giving full observability and consistent error handling.
← → navigateDo subagents inherit the coordinator's conversation history or share memory with each other?
Space to flipNo on both. Each subagent starts with isolated context — no inherited history, no shared memory. Pack every fact a subagent needs directly into its prompt.
← → navigateWhat are the coordinator's responsibilities — and what's wrong with always running the full pipeline?
Space to flipFive things the coordinator owns:
Always running the full pipeline ignores query complexity and wastes capacity.
← → navigateSynthesis output has coverage gaps. What does the coordinator do next?
Space to flipIterative refinement: identify the gaps → re-delegate targeted queries to search and analysis subagents → re-invoke synthesis. Repeat until coverage is sufficient.
← → navigateWhat tool spawns subagents, and what must appear in the coordinator's configuration?
Space to flipThe Task tool. The coordinator's allowedTools list must include "Task" — without it, the coordinator cannot invoke any subagents regardless of its prompt.
What does an AgentDefinition specify, and what do subagents inherit from the coordinator?
AgentDefinition sets the subagent's description, system prompt, and tool restrictions. Subagents inherit nothing — they begin each invocation with no prior context unless explicitly provided in the prompt.
How do you spawn three subagents to run in parallel — not sequentially?
Space to flipEmit all three Task tool calls in a single coordinator response — not spread across separate turns. Multiple calls in one response trigger concurrent execution; separate turns make them sequential.
← → navigateWhat must go in a subagent's prompt, and how should coordinator prompts be framed?
Space to flipInclude complete findings from prior agents with structured metadata (URLs, document names, page numbers) for attribution. Frame as research goals + quality criteria — not step-by-step procedure — to preserve subagent adaptability.
← → navigateProgrammatic gates vs prompt-based guidance — what's the fundamental difference, and when do gates become required?
Space to flipGates block tool calls deterministically — they cannot be bypassed. Prompt instructions (and few-shot examples) describe desired order but have a non-zero failure rate. Gates are required when deterministic compliance is non-negotiable (e.g., identity verification before financial operations).
← → navigateHow do you enforce that process_refund can never fire before identity is verified?
A programmatic prerequisite gate that blocks process_refund until get_customer has returned a verified customer ID. This is a code-level check — not a system-prompt instruction, which could be bypassed.
A customer raises three independent issues in one message. What is the correct approach?
Space to flipDecompose into distinct items → investigate each in parallel using shared context → synthesize a unified resolution. Never investigate independent issues serially when they can run concurrently.
← → navigateWhat goes in a structured handoff when escalating to a human who lacks the transcript?
Space to flipCustomer ID, root cause of the issue, refund amount (or relevant financial figures), and recommended action — everything the human needs to act without reading the conversation transcript.
← → navigateWhat does a PostToolUse hook do, and what is its primary use case?
It intercepts a tool's result before the model sees it, used to normalize heterogeneous data formats — e.g., converting Unix timestamps, ISO 8601, and numeric status codes from different MCP tools into one consistent format.
← → navigateWhat does a tool-call interception hook do? Give a concrete example.
Space to flipIt blocks the model's outgoing tool call when it would violate a hard policy — e.g., blocking process_refund when amount > 500 and redirecting to escalate_to_human. The tool call never executes.
Hooks vs prompts: when do you choose hooks? And can a PostToolUse hook prevent a call?
Use hooks when business rules require guaranteed (deterministic) compliance — prompts are probabilistic. PostToolUse runs after execution, so it cannot prevent a call. Use a PreToolUse / interception hook to block before the call runs.
Prompt chaining vs dynamic decomposition — when do you use each, and what is the wrong-fit trap for each?
Space to flipChaining: predictable multi-aspect work with known steps (e.g., code review). Wrong fit: open-ended investigation where next steps are unknown. Dynamic: open-ended work where subtasks emerge from discoveries. Wrong fit: routine reviews — adds variance with no gain.
← → navigateWhat is attention dilution, and how do you prevent it in a large code review?
Space to flipAttention dilution: quality loss when a single pass must reason about too much at once. Prevention: split into per-file local analysis passes (bugs, logic) followed by a separate cross-file integration pass (data flow, interfaces).
← → navigateTask: "Add comprehensive tests to a legacy codebase." How do you decompose it?
Space to flipDynamic decomposition: map the codebase structure → identify high-impact areas → create a prioritized plan → adapt the plan as dependencies and gaps are discovered. Do not force a fixed sequence upfront.
← → navigateName the three session management options and when to use each.
Space to flip--resume <name> — continue when prior context is mostly valid (inform the session of any file changes).fork_session — parallel divergent exploration from a shared baseline (e.g., compare two refactoring strategies).Files changed since you paused a session. You want to resume. What is required?
Space to flipInform the resumed session about which specific files changed so it can do targeted re-analysis of only those areas — not a full re-exploration of the entire codebase.
← → navigatePrior tool results no longer reflect current file state. Resume or start fresh?
Space to flipStart fresh with a structured injected summary. Stale tool results mislead the model — cached outputs that no longer match current system state cause incorrect reasoning. A fresh, accurate summary is always more reliable.
← → navigateKeyboard: ← → navigate · Space flip · S shuffle · R restart · G got it · V review again