← Back

16 Agentic Architecture & Orchestration Practice Questions & Answers

Every Agentic Architecture & Orchestration practice question from the Claude Certified Architect – Foundations Practice Test, with the correct answer and a short explanation.

Start practice test
  1. 1. You are building a developer productivity agent with the Claude Agent SDK that autonomously fixes lint errors across a repository. Your custom agentic loop must decide, after each API response, whether to keep executing tools or to finish. Which control-flow design is correct?

    • A.Run a fixed maximum of 10 iterations as the primary stopping mechanism, since most tasks complete within that limit.
    • B.Terminate whenever the assistant message contains a phrase such as "done" or "task complete", since Claude announces when it has finished.
    • C.Terminate whenever a response contains any text content, since text output indicates Claude is answering rather than still working.
    • D.Continue the loop while stop_reason is "tool_use", executing the requested tools and returning their results in the next request; terminate when stop_reason is "end_turn".Answer

    The stop_reason field is the structured lifecycle signal of the agentic loop: "tool_use" means the model is requesting tool execution and expects the results back in the next iteration, while "end_turn" means the model has finished its work. Parsing natural-language phrases, using an iteration cap as the primary stopping mechanism, or treating text content as a completion indicator are documented anti-patterns, because responses can legitimately mix text with tool calls and free-form wording is not a reliable signal.

    Source: CCA-F Exam Guide, Domain 1, Task Statement 1.1 (agentic loop lifecycle: stop_reason "tool_use" vs "end_turn"; termination anti-patterns); Claude Agent SDK docs, agentic loopReport a problem with this question

  2. 2. A customer support resolution agent calls lookup_order and receives valid data, but on the next iteration it calls lookup_order again with identical arguments, and eventually stalls without answering. Your loop code forwards each tool's output to a logging service and then immediately issues the next API request. What is the most likely bug?

    • A.The tool's JSON input schema is missing a required field, so the model cannot construct a valid second call.
    • B.The system prompt lacks an explicit instruction telling the model to remember the outputs of previous tool calls.
    • C.max_tokens is set too low, causing the model to truncate its reasoning before it can make use of the tool result.
    • D.The tool_result block is never appended to the conversation history, so the model never sees the tool's output and cannot incorporate it into its next reasoning step.Answer

    In the agentic loop, tool results must be appended to the conversation history as tool_result blocks so the model can reason about them in the next iteration; the model has no memory outside that history. Sending the output only to a logging service means each new request looks to the model as if the tool never ran, so it repeats the same call. The model does not need prompt instructions to "remember" results — it simply needs them present in context — and neither max_tokens nor the input schema would cause identical repeated calls after a successful result.

    Source: CCA-F Exam Guide, Domain 1, Task Statement 1.1 (adding tool results to conversation context between iterations); Claude Agent SDK docs, tool use loopReport a problem with this question

  3. 3. In a multi-agent research pipeline, your web-search subagent currently passes raw results directly to the document-analysis subagent, which passes its output directly to the synthesis subagent. Mid-chain failures are hard to trace, and each agent handles errors differently. Which architectural change best addresses these problems?

    • A.Add a shared message queue that all subagents publish to and consume from, removing the coordinator from the data path entirely.
    • B.Add retry logic with exponential backoff inside each subagent and keep passing results peer-to-peer along the chain.
    • C.Adopt a hub-and-spoke design: route all inter-subagent communication through the coordinator, which handles delegation, error handling, and information flow between subagents.Answer
    • D.Merge the three subagents into a single agent so that no inter-agent communication is needed at all.

    In the hub-and-spoke pattern, the coordinator manages all inter-subagent communication, which gives a single point of observability, consistent error handling, and controlled information flow — exactly the properties missing in a peer-to-peer chain. A shared queue removes the central point of control and makes routing decisions implicit; per-agent retries treat a symptom without making failures traceable; and merging everything into one agent sacrifices context isolation and specialization, which are the reasons for using subagents in the first place.

    Source: CCA-F Exam Guide, Domain 1, Task Statement 1.2 (hub-and-spoke architecture; routing all subagent communication through the coordinator for observability and consistent error handling)Report a problem with this question

  4. 4. Your research system has five subagents: news search, academic search, document analysis, fact-checking, and synthesis. The coordinator always runs the full five-agent pipeline, so a simple single-fact question costs nearly as much time and tokens as a deep research report. What is the best change to the coordinator's design?

    • A.Reduce every subagent's max_tokens budget so the full five-agent pipeline becomes cheaper on all queries.
    • B.Cache complete pipeline outputs so that repeated identical queries can be served without rerunning any subagents.
    • C.Have the coordinator analyze each query's complexity and requirements, then dynamically select and invoke only the subagents that query actually needs.Answer
    • D.Add a keyword-matching router in application code that maps query strings to one of several fixed, pre-defined pipelines.

    A well-designed coordinator performs model-driven task decomposition: it evaluates the query's complexity and invokes only the subagents needed, so a simple lookup might use one search agent while a deep report uses all five. This preserves quality on complex queries while eliminating waste on simple ones. A keyword router is brittle and bypasses the model's reasoning about what the query needs; shrinking max_tokens degrades every query's quality without fixing the structural over-invocation; and caching only helps for exact repeats, not for the general cost problem.

    Source: CCA-F Exam Guide, Domain 1, Task Statement 1.2 (coordinator dynamically selects which subagents to invoke based on query complexity rather than always routing through the full pipeline)Report a problem with this question

  5. 5. You configure a coordinator agent with AgentDefinition entries for a "researcher" and a "summarizer" subagent, and its system prompt instructs it to delegate research work. In production the coordinator never spawns a subagent and attempts every task itself. Its allowedTools list is ["WebSearch", "Read"]. What is the most likely fix?

    • A.Add "researcher" and "summarizer" to allowedTools, because each configured subagent must be listed by name as its own tool.
    • B.Strengthen the system prompt with few-shot examples that demonstrate delegating to subagents.
    • C.Increase the coordinator's max turn limit so it has enough turns left to perform the delegation.
    • D.Add "Task" to the coordinator's allowedTools, because subagents are spawned via the Task tool and the coordinator currently has no access to it.Answer

    The Task tool is the mechanism by which a coordinator spawns subagents, so the coordinator's allowedTools must include "Task" for any delegation to occur; without it, the model literally cannot issue a spawn call no matter how it is prompted. Subagents are selected via the Task tool's parameters, not listed individually as tools, so option B misdescribes the mechanism, and prompt strengthening or turn limits cannot compensate for a capability the agent does not have.

    Source: CCA-F Exam Guide, Domain 1, Task Statement 1.3 (the Task tool as the mechanism for spawning subagents; allowedTools must include "Task"); Claude Agent SDK docs, subagentsReport a problem with this question

  6. 6. A developer productivity coordinator spawns a "test-writer" subagent that should only read source code and create test files. Logs show it occasionally edits production source files as well. What is the most reliable way to prevent this?

    • A.Add a PostToolUse hook that logs every file edit the subagent makes so a human can review them the next day.
    • B.Add a rule to the subagent's system prompt: "Never modify production source files under any circumstances."
    • C.Have the coordinator review the subagent's diff after each session and revert any unwanted edits it finds.
    • D.Restrict the tools in the test-writer's AgentDefinition so it only has read capabilities plus a purpose-built tool that can create files exclusively under test directories.Answer

    AgentDefinition tool restrictions define a hard capability boundary: if the subagent's toolset contains no tool capable of editing production source, the violating action is structurally impossible rather than merely discouraged. A system prompt rule is probabilistic guidance with a non-zero failure rate; logging via PostToolUse observes edits but does not prevent them; and coordinator-side diff review is reactive cleanup after the damage has already been written.

    Source: CCA-F Exam Guide, Domain 1, Task Statements 1.3 (AgentDefinition tool restrictions per subagent type) and 1.5 (hooks/programmatic guarantees vs probabilistic prompt compliance)Report a problem with this question

  7. 7. In your research pipeline, the coordinator first runs a web-search subagent, then spawns a synthesis subagent with the prompt: "Synthesize the research findings into a report." The synthesis output is generic and references none of the search results. What is the root cause?

    • A.Context sharing between agents is disabled by default and must be turned on with a shared-memory flag in the AgentDefinition.
    • B.Subagents run with isolated context and do not inherit the coordinator's conversation history, so the search findings must be included directly in the synthesis subagent's prompt.Answer
    • C.The coordinator should have called fork_session so the synthesis agent would branch from the coordinator's history.
    • D.The synthesis subagent lacks the WebSearch tool, so the fix is to grant it search access and let it re-run the queries itself.

    Subagent context isolation is a core property of the architecture: a spawned subagent sees only what is placed in its own prompt, never the parent's conversation history, so the coordinator must pass the complete findings from prior agents directly in the synthesis subagent's prompt. There is no shared-memory flag that changes this, re-running searches duplicates work and would still miss the analysis outputs, and fork_session is a session-management feature for branching a conversation, not a mechanism for feeding context into subagents.

    Source: CCA-F Exam Guide, Domain 1, Task Statement 1.3 (subagent context must be explicitly provided in the prompt; subagents do not automatically inherit parent context)Report a problem with this question

  8. 8. Your search and analysis subagents return their findings as free-form paragraphs that mix claims together with source URLs and page numbers. By the time the synthesis subagent produces the final report, most citations are missing or attached to the wrong claims. What is the best fix?

    • A.Add a system prompt instruction telling the synthesis subagent to "always preserve every citation exactly as received."
    • B.Have subagents return structured output that separates content from metadata: each finding carries its claim, evidence excerpt, and source URL/document name/page number as distinct fields.Answer
    • C.Have the coordinator re-run the searches after synthesis and reattach URLs to the report's claims itself.
    • D.Increase the synthesis subagent's output token limit so it has enough room to include all of the citations.

    When context is passed between agents, structured formats that separate content from metadata preserve attribution because each claim travels with its own source fields instead of relying on the synthesis model to disentangle prose. A "preserve citations" instruction cannot fix the problem that the associations were already ambiguous in the free-form input; re-running searches after the fact is expensive guesswork that cannot reliably match sources to rewritten claims; and token limits are unrelated to citations being mismatched rather than truncated.

    Source: CCA-F Exam Guide, Domain 1, Task Statement 1.3 (using structured data formats to separate content from metadata when passing context between agents to preserve attribution)Report a problem with this question

  9. 9. A support coordinator investigates three independent aspects of a customer complaint: billing history, shipment tracking, and product defect reports. Today it spawns one subagent, waits for it to finish, then spawns the next, so total latency is roughly three times a single investigation. Using the Agent SDK's intended mechanism, how should you parallelize this?

    • A.Have the coordinator emit all three Task tool calls in a single response, so the three subagents execute in parallel within one turn.Answer
    • B.Set a parallel=true flag on each Task tool call so the runtime schedules them concurrently across turns.
    • C.Launch three separate coordinator sessions from application code, one per aspect, and merge their outputs manually afterward.
    • D.Combine the three investigations into one subagent's prompt so a single agent covers all aspects in one pass.

    Parallel subagent execution is achieved by the coordinator emitting multiple Task tool calls in a single response rather than spreading them across separate turns; the runtime can then run those spawned subagents concurrently, cutting latency to roughly that of the slowest investigation. There is no parallel=true flag on the Task tool, running separate coordinator sessions discards the hub-and-spoke benefits of centralized aggregation, and merging everything into one subagent keeps the work serial inside a single context.

    Source: CCA-F Exam Guide, Domain 1, Task Statement 1.3 (spawning parallel subagents by emitting multiple Task tool calls in a single coordinator response rather than across separate turns)Report a problem with this question

  10. 10. A customer support agent integrates three MCP servers: one returns dates as Unix timestamps, another as ISO 8601 strings, and a third as locale-formatted text; order status is a numeric code in one system and a string in another. The agent intermittently misreads dates and statuses when comparing data across systems. What is the most reliable fix?

    • A.Ask each MCP server's owning team to change their APIs to return a common date and status format.
    • B.Add few-shot examples to the system prompt demonstrating correct conversions between each pair of formats.
    • C.Document all of the formats in the system prompt and instruct the model to convert values before comparing them.
    • D.Implement a PostToolUse hook that normalizes every tool result — converting all dates to a single format and all status codes to canonical strings — before the model processes them.Answer

    PostToolUse hooks intercept tool results and transform them deterministically before the model ever sees them, which is exactly the pattern for normalizing heterogeneous data formats from different MCP tools: the conversion happens in code, so it succeeds 100% of the time. Prompt documentation and few-shot examples rely on the model performing arithmetic-like conversions correctly on every turn, which remains probabilistic, and changing third-party APIs is outside your control and does not fix the agent in the meantime.

    Source: CCA-F Exam Guide, Domain 1, Task Statement 1.5 (PostToolUse hooks to normalize heterogeneous data formats — Unix timestamps, ISO 8601, numeric status codes — before the agent processes them)Report a problem with this question

  11. 11. Company policy requires that any refund above a fixed policy threshold be approved by a human. Your support agent's system prompt states this rule prominently, yet a compliance audit found several over-threshold refunds processed autonomously. The business requirement is zero violations. What change satisfies the requirement?

    • A.Add a hook that intercepts every outgoing process_refund tool call, blocks any call whose amount exceeds the threshold, and redirects the case to the human escalation workflow.Answer
    • B.Add a PostToolUse hook that flags over-threshold refunds after they execute and queues them for next-day human review.
    • C.Move the rule to the very top of the system prompt and repeat it inside the process_refund tool description for emphasis.
    • D.Add few-shot examples to the system prompt showing the agent correctly escalating over-threshold refund requests.

    Prompt-based guidance has a non-zero failure rate, so when a business rule demands guaranteed compliance, the enforcement must be programmatic: a hook that intercepts the outgoing tool call can deterministically block every over-threshold refund before it executes and redirect to the human workflow. Strengthening or repeating prompt instructions only lowers the violation rate probabilistically, and a PostToolUse hook fires after the tool has run — flagging a refund the next day means the violation already occurred.

    Source: CCA-F Exam Guide, Domain 1, Task Statement 1.5 (tool call interception hooks that block policy-violating actions and redirect to alternative workflows; hooks for deterministic guarantees vs prompt instructions for probabilistic compliance)Report a problem with this question

  12. 12. You are hardening a customer support agent and reviewing four requirements from the product team. Which one justifies implementing a tool-interception hook rather than relying on system prompt guidance?

    • A.The agent should prefer summarizing long policy documents rather than quoting them at length.
    • B.The agent should greet returning customers by name whenever the name is available.
    • C.The agent should maintain a warm, empathetic tone even when customers are frustrated.
    • D.The account-deletion tool must never execute unless the identity-verification tool has already returned a verified match in the current session.Answer

    The dividing line is whether occasional non-compliance is acceptable: blocking account deletion until identity verification succeeds is a critical prerequisite where any failure causes irreversible harm, so it requires programmatic enforcement — a hook that inspects session state and blocks the call deterministically. Tone, summarization style, and greeting behavior are stylistic preferences where a rare deviation is harmless, making probabilistic prompt guidance the proportionate mechanism; wrapping them in hooks would add engineering complexity with no compliance payoff.

    Source: CCA-F Exam Guide, Domain 1, Task Statements 1.4 and 1.5 (programmatic prerequisites for critical operations; choosing hooks over prompt-based enforcement when business rules require guaranteed compliance)Report a problem with this question

  13. 13. A developer productivity agent reviews every pull request nightly using the same well-understood steps: examine each changed file for local issues, then run one cross-file pass for integration problems, then produce a summary. The steps never vary between PRs. Which task decomposition pattern fits this workflow best?

    • A.Dynamic decomposition: let the agent invent a fresh investigation plan for each PR based on what it discovers along the way.
    • B.A single comprehensive prompt that asks the model to analyze all files, integration issues, and the summary in one pass.
    • C.Prompt chaining: a fixed sequential pipeline of per-file analysis, then a cross-file integration pass, then summary generation.Answer
    • D.A subagent per possible defect category, all spawned on every PR regardless of what the diff contains.

    Prompt chaining is the right pattern when a workflow's steps are predictable and stable: each stage gets a focused context (one file at a time, then the cross-file view), which avoids the attention dilution of analyzing everything in a single giant prompt. Dynamic decomposition adds planning overhead and nondeterminism that buys nothing when the steps never change, and unconditionally spawning a subagent per defect category wastes cost on PRs where most categories are irrelevant.

    Source: CCA-F Exam Guide, Domain 1, Task Statement 1.6 (prompt chaining for predictable multi-aspect reviews; per-file analysis plus separate cross-file integration pass to avoid attention dilution)Report a problem with this question

  14. 14. You ask an agent to "add comprehensive tests to a legacy codebase" whose structure and hidden dependencies are unknown. A teammate proposes a fixed four-step pipeline: list all files, write one test per file, run the suite, report. In trials, the agent keeps discovering modules that cannot be tested until other components' dependencies are untangled first. Which approach is better suited?

    • A.Spawn one subagent per source file in parallel so every file's test is attempted simultaneously.
    • B.Refine the prompt chain into more granular fixed steps so that each dependency case has its own predefined stage.
    • C.Keep the fixed four-step pipeline but grant a much larger iteration budget so the agent can push through the blocked modules.
    • D.Dynamic decomposition: first map the codebase structure, identify high-impact areas, build a prioritized plan, and adapt the subtasks as dependencies are discovered.Answer

    Open-ended tasks over unknown territory call for dynamic decomposition, where the plan itself is generated and revised based on intermediate findings: mapping structure first reveals the dependency order that no fixed pipeline could have anticipated. A larger iteration budget does not change a plan that is structurally wrong, parallel per-file subagents collide with exactly the cross-module dependencies causing the failures, and pre-defining a stage for every dependency case is impossible when the cases are unknown before exploration.

    Source: CCA-F Exam Guide, Domain 1, Task Statement 1.6 (dynamic decomposition for open-ended tasks: map structure, identify high-impact areas, prioritized plan that adapts as dependencies are discovered)Report a problem with this question

  15. 15. An agent spent a long session building a thorough analysis of your service's architecture. You now want to explore two mutually exclusive refactoring strategies — event-driven versus modular monolith — each developed in depth from that same analysis, without either exploration contaminating the other. Which session-management mechanism fits best?

    • A.Resume the same session ID from two application processes at the same time, one per strategy.
    • B.Start two brand-new sessions and let each one redo the architecture analysis from scratch before exploring its strategy.
    • C.Use fork_session to create two independent branches from the shared analysis baseline, exploring one strategy in each branch.Answer
    • D.Continue in the same session: explore the event-driven strategy fully, then instruct the agent to disregard it and explore the monolith strategy.

    fork_session exists precisely for this pattern: it branches independent sessions off a shared baseline, so both explorations start from the identical, already-paid-for analysis while their subsequent contexts remain fully isolated. Exploring sequentially in one session leaves the first strategy's reasoning in context, biasing the second; two fresh sessions duplicate the expensive analysis and risk divergent baselines; and concurrently resuming one session ID gives interleaved, mutually contaminating history rather than isolation.

    Source: CCA-F Exam Guide, Domain 1, Task Statements 1.3 and 1.7 (fork_session for creating independent branches from a shared analysis baseline to explore divergent approaches)Report a problem with this question

  16. 16. You use --resume to continue a week-old code-investigation session. Since that session, a large refactor changed most of the files the agent had read and analyzed. The resumed agent now gives recommendations that reference functions which no longer exist. What is the recommended practice?

    • A.Resume the session and append the instruction "disregard everything you previously read about this codebase."
    • B.Start a new session seeded with a structured summary of the prior session's conclusions, letting the agent re-read the current files, because the old tool results are stale.Answer
    • C.Use fork_session on the old session so the stale context is isolated inside a separate branch.
    • D.Keep working in the resumed session; the agent will notice the discrepancies on its own the next time it reads the files.

    When most previously analyzed files have changed, the session's tool results are stale, and starting fresh with a structured summary of prior conclusions is more reliable than resuming: the summary preserves the valuable reasoning while forcing the agent to ground itself in the current code. Resuming and hoping the agent notices leaves stale content authoritative in context; forking copies the same stale history into every branch; and an instruction to "disregard" prior reads is probabilistic — the outdated file contents remain in context and continue to influence the model.

    Source: CCA-F Exam Guide, Domain 1, Task Statement 1.7 (starting a new session with a structured summary is more reliable than resuming with stale tool results)Report a problem with this question

Practice questions based on the official Claude Certified Architect – Foundations (CCAR-F) exam guide and Anthropic's public documentation. This is an independent study tool, not affiliated with or endorsed by Anthropic, and does not grant certification. The real exam is 60 questions, 120 minutes, passing at a scaled 720/1000, delivered via Pearson VUE ($125). Official certification page →