CertsPoint
See all results for ""
Exams About Us
Sign In Get Started
Exam Overview
Exam Code CCAR-F
Exam Name Claude Certified Architect Foundations
Vendor Anthropic
Total Questions 189
Last Updated 26-Oct, 2026
Why CertsPoint?
  • Latest & Verified Questions
  • Detailed Explanations
  • Regular Updates
  • Full-Length Practice Tests
  • Boost Your Exam Confidence

PDF Study Materials

Downloadable guides and resources

Practice Tests

Full-length tests with real exam experience

Progress Tracking

Monitor your performance and improvement

Study Anywhere

Access on desktop, tablet, and mobile

Excellent
4.6 (398 Up Votes)
Secure Payment Privacy Protected Money Back Guarantee

Free CCAR-F Practice Questions

Explore 21 free practice questions for the Anthropic CCAR-F exam and review the answers and explanations to support your preparation.

  1. Question 1

    Single answer

    The web-search agent has gathered several relevant sources for a research topic. The document-analysis agent now needs to examine those sources. How does information typically flow between these two specialized subagents?

    • Option A:

      The coordinator receives the web-search agent’s output and includes the relevant sources and findings in the prompt used to invoke the document-analysis agent.

      Correct
    • Option B:

      The web-search agent directly invokes the document-analysis agent and passes the discovered sources as parameters.

      Correct
    • Option C:

      The agents communicate through an event-driven message queue, with the document-analysis agent subscribing to web-search completion events.

      Correct
    • Option D:

      Both agents automatically access a shared memory store in which the web-search agent writes its findings.

      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: A

    Explanation

    Option A matches the standard coordinator-managed subagent model. The coordinator invokes the web-search agent, receives its final result, selects the useful URLs or source records, and then supplies them explicitly when invoking the document-analysis agent. This keeps task ownership, provenance, and execution order visible to the coordinator.

    The Claude Agent SDK subagent documentation states that a subagent begins with a fresh context window and does not inherit the parent’s conversation history or previous tool results. The information passed through the Agent tool’s prompt is the primary parent-to-subagent context channel. Consequently, the analysis prompt must include the source URLs, documents, retrieval notes, and any questions the analyzer must answer.

    Option B requires nested delegation that is neither stated nor necessary and reduces centralized observability. Options C and D describe valid custom architectures only if the application has deliberately implemented a queue or shared memory system; neither is automatic Agent SDK behavior. Coordinator-mediated handoff is therefore the expected approach. For reliability, the handoff should use structured source records rather than an informal prose statement, ensuring that the analyzer receives identifiers, provenance, relevant excerpts, and analysis objectives.

  2. Question 2

    Single answer

    You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports.

    The coordinator agent has AgentDefinition objects configured for all four specialized subagents, each with appropriate descriptions, prompts, and tool restrictions. During testing, you notice that the coordinator correctly reasons about when to delegate—it generates messages such as, “I’ll ask the web-search agent to find sources on this topic”—but no subagent execution ever occurs. The coordinator then proceeds as if the delegation happened and continues with incomplete information. Logs show no errors.

    What is the most likely cause?

    • Option A:

      The AgentDefinition objects are configured correctly, but the coordinator’s system prompt does not explicitly list the available subagent types, preventing the model from knowing that they can be invoked.

      Correct
    • Option B:

      Subagent context isolation means task descriptions from the coordinator do not automatically reach subagents; you must configure explicit context forwarding in ClaudeAgentOptions.

      Correct
    • Option C:

      The coordinator’s allowedTools configuration does not include Agent—formerly named Task—so it cannot invoke the tool required to spawn subagents.

      Correct
    • Option D: The coordinator’s max_tokens setting is too low, causing the subagent tool invocation to be truncated before the subagent type can be specified.
      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: C

    Explanation

    Option C matches the distinction between reasoning about delegation and executing it. Defining subagents makes their descriptions available for selection, but the coordinator must still invoke the SDK’s subagent-spawning tool. Current Claude Agent SDK documentation calls this the Agent tool; Task was its earlier name and remains relevant to older SDK configurations. Anthropic’s Subagents in the SDK documentation instructs developers to include Agent in allowedTools so subagent invocations are approved automatically. Without that permission, an invocation can fall through to a permission callback or be denied under a non-interactive permission mode. Option A is unlikely because the configured subagent descriptions already tell Claude when each agent should be selected, although explicit prompting can improve invocation reliability. Option B misstates context isolation: context must be included in the spawning prompt, but that issue occurs after an invocation is attempted and does not explain the absence of all subagent executions. Option D would normally produce truncation evidence or incomplete output rather than consistent verbal promises with no tool call. The configuration should therefore permit Agent, explicitly request delegation where necessary, and log subagent invocation events.

  3. Question 3

    Single answer

    You are integrating Claude Code into your Continuous Integration/Continuous Deployment (CI/CD) pipeline. The system runs automated code reviews, generates test cases, and provides feedback on pull requests. You need to design prompts that provide actionable feedback and minimize false positives.

    Your pipeline reviews every pull request using a single API call with a static prompt containing the diff and the full text of each changed file. Unchanged files are not included. Developers report that reviews consistently miss cross-file bugs—for example, a pull request renames a function’s parameters, but the review does not identify callers in unchanged files that still use the old argument order.

    Evaluation shows that cross-file bugs account for 35% of production incidents originating from reviewed pull requests.

    What is the most effective change to the review design?

    • Option A:

      Build a static dependency graph and include every file located within two dependency hops of a changed file.

      Correct
    • Option B:

      Add instructions asking the model to list external references and reason step by step about how each change could affect unseen callers.Redesign the review as a turn-limited agentic task that can read files and search the repository, following references to verify cross-file findings.

      Correct
    • Option D:

      Run separate review passes for each changed file with its direct dependants, and then aggregate and deduplicate the findings through a final consolidation pass.

      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: C

    Explanation

    Option C gives the reviewer access to the evidence currently missing from its prompt. An agentic review can use Grep, Glob, Read, language-server tools, and test commands to locate callers, follow imports, inspect type definitions, and verify whether a suspected compatibility issue actually exists. A turn limit controls cost while still allowing targeted exploration.

    Anthropic’s context-engineering guidance recommends just-in-time retrieval: agents should retain lightweight references and dynamically load the information needed for the current task instead of preloading a large fixed context. Anthropic has also reported that code-review performance improves when the necessary repositories are available for gathering complete context. Option A may load many irrelevant files while still missing reflection, generated interfaces, dependency injection, or indirect call paths beyond the arbitrary two-hop boundary. Option B cannot reason reliably about code that the model cannot inspect. Option D improves coverage but fragments repository-wide relationships and may duplicate substantial work. An agentic loop can begin with the diff, identify uncertain cross-file effects, search only relevant paths, and report findings only after locating supporting code. Anthropic context-engineering guidance , Claude Code quality report

  4. Question 4

    Single answer

    You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It uses the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers.

    Your agent has spent 25 minutes exploring a game engine’s rendering subsystem—reading shader code, buffer management, and frame synchronization logic. An engineer now asks it to understand how the physics engine integrates with rendering for collision debug overlays. You notice recent responses reference “typical rendering patterns” rather than the specific VulkanPipeline and FrameGraph classes it discovered earlier.

    What’s the most effective approach?

    • Option A:

      Spawn a sub-agent to explore physics independently, then manually synthesize its findings with the rendering knowledge accumulated in the main conversation.

      Correct
    • Option B:

      Use /clear to reset context completely, then start fresh with physics exploration using file paths from the project’s CLAUDE.md.

      Correct
    • Option C:

      Summarize key rendering findings, then spawn a sub-agent for physics exploration with that summary in its initial context.

      Correct
    • Option D:

      Continue in the current context with more targeted prompts referencing the specific classes by name.

      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: C

    Explanation

    The reference to generic rendering patterns indicates that the current context has become saturated or that important earlier details are no longer receiving sufficient attention. Anthropic documents that performance can degrade as a Claude Code context window fills with conversation history, file contents, and command output; symptoms include forgetting earlier instructions and making less precise responses. ( https://code.claude.com/docs/en/best-practices )

    Option C preserves the high-value rendering discoveries while isolating the physics investigation. The summary should identify the relevant rendering classes, synchronization boundaries, debug-overlay interfaces, and unresolved integration questions. A physics-focused subagent can then inspect collision and simulation code in its own context without adding dozens of additional files to the already crowded main conversation.

    This explicit summary matters because an ordinary named subagent starts with a fresh, isolated context and does not automatically receive the parent’s full conversation history or previously read files. Claude constructs a delegation message containing the task context, so the essential rendering findings must be supplied deliberately. ( https://docs.anthropic.com/en/docs/claude-code/sub-agents )

    Option A omits the integration context needed to guide the physics search. Option B destroys useful prior analysis. Option D keeps expanding an already degraded context and treats the symptom rather than controlling context growth.

    Official references/topics: Context-Window Management; Subagent Isolation; Delegation Summaries; Codebase Exploration.

  5. Question 5

    Single answer

    In addition to your CI pipeline, your organization has enabled Claude’s managed Code Review through the Claude GitHub App on this repository, and reviews run automatically on every pull request. Reviews average 18 findings per pull request. Developer feedback reveals three categories of unwanted noise: (1) style and formatting issues already enforced by your CI linter, (2) findings on automatically generated template code under src/gen/*, and (3) rendering-helper patterns that are intentional project conventions but are flagged because they resemble common anti-patterns. Only approximately four findings per pull request are genuine logic bugs. What is the most effective way to reduce this noise while preserving the detection of real issues?

    • Option A:

      Create a REVIEW.md file at the repository root containing skip rules for CI-enforced checks and generated files, together with a verification requirement that rendering-related findings cite a specific line demonstrating incorrect behavior

      Correct
    • Option B:

      Configure separate GitHub Actions workflow files for each code area: one for generated code with findings suppressed, one for rendering code with custom instructions, and one general workflow for everything else.

      Correct
    • Option C:

      Add custom review instructions to a GitHub Actions workflow file, using the action’s prompt parameter to suppress duplicate lint findings, ignore generated template code, and impose stricter evidence requirements on rendering-related issues.

      Correct
    • Option D:

      Add detailed explanations to the project’s CLAUDE.md describing intentional patterns, stating that CI handles linting, and identifying src/gen/ as automatically generated code.

      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: A

    Explanation

    Option A uses the dedicated configuration mechanism for Anthropic’s managed Code Review service. The official Code Review documentation states that a root-level REVIEW.md is injected into every review agent as the highest-priority instruction block. It can redefine severity, suppress categories already enforced by CI, skip generated paths, and require concrete evidence before particular findings are reported.

    The proposed rules map directly to the observed noise. Skipping lint and formatting findings eliminates duplication with deterministic CI checks. Excluding src/gen/* prevents comments on machine-generated code. Requiring a specific source line demonstrating incorrect behavior raises the verification threshold for rendering-helper findings without suppressing genuine defects.

    Options B and C configure self-hosted GitHub Actions workflows, but the scenario concerns managed Code Review running through the Claude GitHub App on Anthropic’s infrastructure. Those workflow prompts do not govern the managed reviewer. Option D supplies useful general project context, but CLAUDE.md applies to all Claude Code tasks and has lower review-specific authority. The documentation states that REVIEW.md is the stronger control for changing what managed Code Review flags and how findings are reported. It therefore provides the most targeted solution with the least unnecessary infrastructure.

  6. Question 6

    Single answer

    You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It uses the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers.

    1.5An engineer asks the agent to understand how the caching layer works before adding a new cache invalidation trigger. After initial Grep searches, the agent has identified that caching logic spans 15 files including decorators, middleware, and service classes (~6,000 lines total).

    What’s the most effective next step for building understanding while managing context constraints?

    • Option A:

      Use Grep to search for “invalidate” and “expire” patterns across all files, then Read only those specific line ranges with minimal surrounding context.

      Correct
    • Option B:

      Use the Read tool to sequentially load all 15 files, building complete understanding across the full caching implementation

      Correct
    • Option C:

      Use Glob to find files matching common caching patterns ( cache*.py , caching/ ), prioritize the largest files by reading them first, then check smaller files for gaps

      Correct
    • Option D:

      Analyze imports and class hierarchies to identify the base cache class. Read that file to understand the interface, then trace specific invalidation implementations.

      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: D

    Explanation

    The correct objective is to construct an architectural map before consuming the full implementation. Identifying the base cache abstraction, its interface, and the classes that implement or invoke it gives the agent a dependency-guided path through the code. It can then inspect only the invalidation implementations and integration points relevant to the proposed trigger.

    This approach protects the context window. Anthropic states that every file read occupies context and that model performance can deteriorate as the window fills. Its Claude Code guidance warns against unbounded investigation that reads large numbers of files and recommends narrowing the exploration or delegating it. ( https://code.claude.com/docs/en/best-practices )

    Option A is too lexical: searching only for invalidate or expire can miss event-driven invalidation, overridden methods, cache-key mutation, and generic interface calls. Option B loads approximately 6,000 lines without first establishing relevance. Option C assumes that filename patterns and file size correlate with architectural importance; the largest files may contain incidental code while a small interface defines the entire design.

    Option D follows control and type relationships rather than arbitrary file order. After reading the base class, the agent can search for subclasses, imports, construction sites, middleware hooks, and calls to the invalidation contract, progressively expanding only where evidence requires it.

    Official references/topics: Context-Efficient Exploration; Dependency-Guided Reading; Architectural Interfaces; Narrowly Scoped Investigation

  7. Question 7

    Single answer

    You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It uses the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers.

    You’ve configured your Claude agent with three MCP servers: one for git operations, one for Jira ticket management, and one for documentation search.

    When a user asks the agent to “create a branch for JIRA-123 and add documentation links to the ticket,” how does the agent access tools across these servers?

    • Option A:

      Tools from all configured MCP servers are discovered at connection time and available simultaneously to the agent.

      Correct
    • Option B:

      The agent queries each server sequentially to determine which handles each tool, routing calls based on tool name prefixes.

      Correct
    • Option C:

      The agent automatically selects the most relevant server based on the request and loads only that server’s tools.

      Correct
    • Option D:

      You must specify which MCP server to use for each turn, and the agent can only access one server’s tools at a time.

      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: A

    Explanation

    MCP allows a Claude application to connect to multiple servers and expose their enabled tools within the same agentic interaction. Anthropic’s MCP connector documentation explicitly supports connecting to multiple MCP servers in one request. Once connected, Claude can invoke a server’s tool when the user’s request corresponds to the capability described by that tool. ( https://docs.anthropic.com/en/docs/agents-and-tools/mcp-connector )

    In this scenario, the git server can provide the branch-creation operation, the documentation server can locate the relevant links, and the Jira server can update ticket JIRA-123. The agent can coordinate these capabilities without requiring a separate conversational turn that restricts it to only one server. Tool descriptions and schemas tell Claude what each operation does and what inputs it requires.

    Option B incorrectly describes sequential capability discovery. Server identity and tool definitions are established through the MCP configuration rather than discovered by querying every server for each operation. Option C is incorrect because connecting several servers does not inherently restrict the agent to a single selected server. Option D imposes a one-server-per-turn limitation that MCP does not require.

    Access can still be controlled through allowlists, denylists, permissions, and per-tool configuration. Those controls restrict which tools are enabled; they do not change the fundamental ability to make tools from multiple configured servers available together.

    Official references/topics: MCP Server Configuration, Multi-Server Tool Access, Tool Discovery, MCP Tool Permissions.

  8. Question 8

    Single answer

    You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.

    Your extraction pipeline processes invoices and extracts line items, subtotals, tax amounts, and grand totals. During evaluation, you discover that in 18% of extractions, the sum of extracted line item amounts doesn’t match the extracted grand total—sometimes due to OCR errors in the source document, sometimes due to extraction mistakes by the model. Downstream accounting systems reject records with mismatched totals.

    What’s the most effective approach to improve extraction reliability?

    • Option A:

      Add few-shot examples demonstrating invoices where extracted line items sum correctly to the stated total, encouraging the model to produce mathematically consistent extractions.

      Correct
    • Option B:

      Extract line items and totals independently, then use a separate validation model to reconcile discrepancies by determining which extracted values are most likely correct.

      Correct
    • Option C:

      Implement post-processing that automatically adjusts line item amounts proportionally when their sum doesn’t match the stated total.

      Correct
    • Option D:

      Add a “calculated_total” field where the model sums extracted line items alongside a “stated_total” field. Flag records for human review when values differ.

      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: D

    Explanation

    The pipeline must preserve source evidence while making inconsistencies explicit. Option D records the amount stated on the invoice separately from the total derived from extracted line items. A mismatch then becomes a machine-detectable validation condition rather than an invisible extraction defect.

    This approach is superior because it does not silently overwrite source data or ask another model to guess which value is correct. Anthropic’s evaluation guidance recommends automated, code-based grading whenever the criterion can be expressed deterministically. Arithmetic reconciliation is precisely such a criterion. ( https://docs.anthropic.com/en/docs/build-with-claude/develop-tests ) In production, the summation should preferably be calculated by application code using normalized decimal values, even though the option describes the model populating calculated_total . The essential design principle remains the same: preserve stated_total , compute an independent total, compare them, and route discrepancies for adjudication.

    Option A might improve behavior but cannot resolve genuine OCR corruption and could encourage the model to modify extracted values merely to create mathematical consistency. Option B introduces a second probabilistic judgment without new evidence. Option C is unacceptable for accounting data because it fabricates adjusted amounts and destroys fidelity to the invoice.

    The schema should therefore expose both values and attach a validation status or review reason when they differ.

    Official references/topics: Deterministic Validation; Human-in-the-Loop Review; Structured Output Design; Source-Fidelity Controls.

  9. Question 9

    Single answer

    You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution.

    You’re tasked with adding real-time updates to the application. This could be implemented using WebSockets, Server-Sent Events, or polling, each with different complexity, browser support, and infrastructure requirements.

    What’s the most effective way to begin this task?

    • Option A:

      Use direct execution to implement polling first, then evaluate whether to upgrade to WebSockets later.

      Correct
    • Option B:

      Use direct execution with a prompt asking Claude to analyze all approaches and implement the one it determines is best

      Correct
    • Option C:

      Enter plan mode to explore the architecture, evaluate trade-offs, and present options for team approval before implementing.

      Correct
    • Option D:

      Start direct execution with WebSockets, then refactor if infrastructure issues arise.

      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: C

    Explanation

    The implementation approach is unresolved and carries architectural consequences. WebSockets, Server-Sent Events, and polling differ in connection lifecycle, bidirectional communication, proxy compatibility, scaling requirements, deployment topology, reconnection behavior, and operational complexity. Claude should therefore inspect the existing application and infrastructure before modifying code.

    Anthropic recommends separating exploration and planning from implementation when the approach is uncertain, the work affects multiple files, or the developer is unfamiliar with the relevant architecture. In plan mode, Claude can read files and analyze the system without making changes, produce a detailed proposal, and allow the developer or team to review the plan before execution. ( https://code.claude.com/docs/en/best-practices )

    Option A commits to polling before determining whether its latency and load characteristics meet the requirement. Option B delegates a consequential architectural decision and immediate implementation to a single execution step without a review checkpoint. Option D prematurely selects the most infrastructure-sensitive option and assumes later refactoring will be inexpensive.

    Option C creates the correct sequence: examine the frontend and backend architecture, document requirements, compare alternatives, identify infrastructure constraints, obtain approval, and only then implement the selected design with appropriate tests and observability.

    Official references/topics: Plan mode, explore–plan–implement workflow, architectural trade-off analysis, review checkpoints.

  10. Question 10

    Single answer

    You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports.

    In production, you observe that simple fact-checking queries, such as “In what year was the Paris Climate Agreement signed?”, traverse all four subagents sequentially, consuming more than 40 seconds and significant tokens per query. Complex comparative research benefits from the complete pipeline. Your query distribution is diverse and continues to evolve as users discover new applications.

    What is the most effective approach to optimize for varying query complexity?

    • Option A:

      Create a fast path for factual questions that bypasses subagents entirely, routing every other query through the complete pipeline.

      Correct
    • Option B:

      Train a query-complexity classifier using labeled historical data to predict the optimal subagent combination, retraining it periodically.

      Correct
    • Option C:

      Implement pattern-based routing that classifies queries as single-fact, comparative, or analytical and maps each category to a predefined subagent combination.

      Correct
    • Option D:

      Have the coordinator analyze each query and dynamically determine which subagents are required.

      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: D

    Explanation

    Option D allows orchestration effort to scale with the actual request. A simple factual query may require only the web-search agent and a direct coordinator response, whereas a comparative investigation may require web research, document analysis, synthesis, and report generation. Anthropic’s Building Effective AI Agents describes the orchestrator-workers pattern as a central model dynamically identifying subtasks, delegating them, and combining the results. It is specifically appropriate when the required subtasks cannot be predicted reliably in advance. Anthropic’s multi-agent research architecture likewise emphasizes varying the number of agents and tool calls according to task complexity. Option A introduces an inflexible binary decision and still sends every non-factual request through the full pipeline. Option B requires labeled data, ongoing retraining, and reliable definitions of the “optimal” agent combination. Option C is easier to implement but will become brittle as new query types appear. A capable coordinator can examine the requested output, necessary evidence, source requirements, and analytical depth at runtime, then invoke only the specialists that materially contribute to the answer.

  11. Question 11

    Single answer

    Your pipeline includes a release-notes generation step that classifies and summarizes approximately 200 commits at the end of each weekly release cycle. Each commit is currently sent as a separate Messages API call using a Sonnet-tier Claude model. The release notes are not needed until the following morning, so results have approximately 12 hours of acceptable latency. Your team needs to reduce per-token API cost for this step while keeping the same model and prompts, with no change to the model tier or output quality. Which approach satisfies all these constraints?

    • Option A:

      Concatenate all 200 commit messages into a single Messages API request and have the model return all summaries in one response, because fewer requests always reduce total token cost.

      Correct
    • Option B:

      Issue the 200 Messages API requests in parallel using concurrent connections, because concurrency lowers the per-token price charged by the API.

      Correct
    • Option C:

      Submit the 200 requests to the Message Batches API with unique custom_id values and retrieve the results after the batch finishes, which applies a 50% discount to all input and output tokens.

      Correct
    • Option D:

      Switch the summarization calls from the Sonnet-tier model to a Haiku-tier model to take advantage of Haiku’s lower per-token rates.

      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: C

    Explanation

    Option C preserves each commit’s existing model, prompt, and independent processing structure while applying Anthropic’s reduced batch pricing. The official Message Batches documentation states that batch processing reduces input and output token costs by 50%. Requests are processed independently and asynchronously, and each response can be correlated with its original commit through a unique custom_id.

    This workload is a strong batch candidate because it contains many independent requests and does not require an immediate response. Most batches complete within one hour, although processing can continue for up to 24 hours. The pipeline must therefore tolerate asynchronous completion and retrieve the results when processing finishes.

    Option A changes the request architecture, increases the risk of context or output-limit failures, and makes individual retry and result association more difficult. Reducing request count does not inherently reduce per-token pricing. Option B improves throughput but concurrency does not change token rates. Option D would reduce cost but violates the explicit requirement to retain the same model tier. The Message Batches API is the only option satisfying every stated constraint.

    ================

  12. Question 12

    Single answer

    You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports.

    The synthesis agent completes its initial pass but flags that three key research questions remain unanswered because the web-search and document-analysis agents did not find relevant information on those specific subtopics. The coordinator currently proceeds directly to report generation, producing reports with incomplete coverage.

    What change would most effectively improve research completeness?

    • Option A:

      Increase the initial breadth of queries sent to web search and document analysis to reduce the probability of missing relevant information.

      Correct
    • Option B:

      Have the coordinator evaluate the synthesis output for gaps, then re-delegate to web search and document analysis with targeted queries before invoking synthesis again

      Correct
    • Option C:

      Have the report-generation agent note which research questions could not be answered, so users understand the limitations of the final output.

      Correct
    • Option D:

      Give the synthesis agent direct access to web-search tools so it can autonomously fill knowledge gaps without returning control to the coordinator.

      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: B

    Explanation

    Option B introduces an evaluator-and-refinement loop at the correct orchestration layer. The coordinator already owns the research plan and delegation decisions, so it should inspect the synthesis result against the required questions, identify coverage gaps, and issue focused follow-up assignments. Anthropic’s description of its multi-agent research system follows this pattern: the lead agent synthesizes returned findings, determines whether additional research is required, and creates new subagents or refines its strategy before producing the final result. Increasing the initial query breadth, option A, may generate additional irrelevant material and cannot guarantee that unforeseen gaps will be covered. Option C merely documents the incompleteness instead of correcting it. Option D weakens role separation by giving the synthesis agent search capabilities, increasing tool complexity and bypassing the coordinator’s centralized tracking. Targeted re-delegation preserves specialized responsibilities and creates an observable sequence of research, evaluation, refinement, and resynthesis. The coordinator should also maintain explicit coverage criteria and limit the number of refinement rounds so the system improves completeness without entering an uncontrolled research loop.

    ================

  13. Question 13

    Single answer

    You are building a customer support resolution agent using the Claude Agent SDK. The agent handles high-ambiguity requests like returns, billing disputes, and account issues. It has access to your backend systems through custom Model Context Protocol (MCP) tools ( get_customer , lookup_order , process_refund , escalate_to_human ). Your target is 80%+ first-contact resolution while knowing when to escalate.

    A customer raises three separate issues during one session: a refund inquiry (turns 1–15), a subscription question (turns 16–30), and a payment method update (turns 31–45). At turn 48, the customer asks “What happened with my refund?” The conversation is approaching context limits.

    What strategy best maintains the agent’s ability to address all issues throughout the session?

    • Option A:

      Summarize earlier turns into a narrative description, preserving full message history only for the active issue.

      Correct
    • Option B:

      Implement sliding window context that retains the most recent 30 turns.

      Correct
    • Option C:

      Rely on MCP tools to re-fetch relevant information on demand when the customer references earlier issues.

      Correct
    • Option D:

      Extract and persist structured issue data (order IDs, amounts, statuses) into a separate context layer.

      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: D

    Explanation

    The agent must preserve durable state for several concurrently open issues without keeping every conversational turn in the active context window. Option D creates a structured issue ledger containing identifiers, issue type, requested action, current status, completed steps, unresolved questions, and relevant tool outputs.

    Anthropic recommends structured note-taking for long-horizon agents. In this pattern, critical state is written outside the context window and retrieved later, allowing the agent to preserve dependencies and progress across dozens of tool calls. Anthropic also describes compaction as retaining critical details while discarding redundant raw messages and historical tool output. ( https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents )

    Option A is better than retaining the entire transcript, but a narrative summary can merge separate issues or obscure exact identifiers and statuses. Option B will discard the refund conversation because it occurred outside the most recent 30 turns. Option C may recover current backend facts, but it cannot reconstruct conversational commitments, prior explanations, or why a particular action remains pending.

    A structured context layer should maintain one record per issue and be updated after every material action. The active prompt can include compact summaries of all open issues and expanded details only for the issue currently being discussed.

    Official references/topics: Structured note-taking, external agent memory, context compaction, multi-issue state management.

  14. Question 14

    Single answer

    You are integrating Claude Code into your Continuous Integration/Continuous Deployment (CI/CD) pipeline. The system runs automated code reviews, generates test cases, and provides feedback on pull requests. You need to design prompts that provide actionable feedback and minimize false positives.

    Your CI pipeline performs security-focused code reviews on approximately 50 pull requests daily, currently costing $150 per day using the synchronous API. Reviews are non-blocking—developers merge after tests pass and address findings in follow-up commits. You are evaluating the Message Batches API for its 50% cost reduction.

    What factor most determines whether batch processing is appropriate for this use case?

    • Option A:

      Whether reducing per-review latency from 30–60 seconds to near-instant matters for your workflow.

      Correct
    • Option B:

      Whether your result-processing system can handle reviews arriving in a different order from the order in which they were submitted.

      Correct
    • Option C:

      Whether review feedback arriving up to 24 hours after pull-request creation remains actionable.

      Correct
    • Option D:

      Whether you can structure each review as a single request without multi-turn refinement.

      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: C

    Explanation

    Option C identifies the fundamental trade-off introduced by batch processing: lower cost in exchange for asynchronous completion and potentially substantial latency. Anthropic states that most Message Batches complete within one hour, but results may become available only when all requests finish or after 24 hours, whichever occurs first. Therefore, the workflow must remain useful even if security findings arrive considerably later than they would through synchronous requests.

    The reviews are explicitly non-blocking, so batch processing can be suitable if developers can still act on delayed findings through follow-up commits. Option B describes an implementation requirement because batch results may be returned out of submission order, but Anthropic provides a deterministic solution through each request’s unique custom_id. Option A incorrectly focuses on near-instant feedback, which batch processing does not provide. Option D is not decisive because batches support independent Messages API requests containing system prompts, tool use, and multi-turn conversation content. The primary decision is therefore whether the maximum practical feedback delay is acceptable to the development workflow. Anthropic Message Batches documentation

    ================

  15. Question 15

    Single answer

    You are building a customer support resolution agent using the Claude Agent SDK. The agent handles high-ambiguity requests like returns, billing disputes, and account issues. It has access to your backend systems through custom Model Context Protocol (MCP) tools ( get_customer , lookup_order , process_refund , escalate_to_human ). Your target is 80%+ first-contact resolution while knowing when to escalate.

    Your agent is handling a billing dispute. After calling get_customer and lookup_order , it identifies that the dispute involves a promotional pricing error requiring manager approval—beyond the agent’s authorization level.

    How should the workflow handle this mid-process escalation?

    • Option A:

      Call escalate_to_human , passing only the customer’s original message.

      Correct
    • Option B:

      Compile a structured handoff with customer details, order info, and the identified issue before calling escalate_to_human 

      Correct
    • Option C:

      Attempt the refund with process_refund anyway, escalating only if the system rejects the transaction.

      Correct
    • Option D:

      Persist the complete conversation and tool response history to a database, then call escalate_to_human with a reference ID.

      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: B

    Explanation

    A mid-process escalation should transfer the decision-ready state accumulated by the agent. The human reviewer needs the verified customer identity, relevant order information, the promotional-pricing discrepancy, the reason approval is required, and any actions already attempted. Option B preserves this information in a concise, structured handoff while avoiding unnecessary repetition of the complete raw transcript.

    Anthropic’s tool-design guidance recommends returning high-signal information and stable identifiers containing only what Claude or the next workflow participant needs to determine the next action. Anthropic’s context-engineering guidance similarly advocates structured notes that preserve critical state and dependencies without retaining every redundant tool result. A structured escalation payload applies both principles and reduces handling time for the manager. ( https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools )

    Option A discards the investigation already completed. Option C violates the agent’s authorization boundary and risks an impermissible financial action. Option D provides auditability, but a reference ID alone forces the human to reconstruct the case from an excessively broad transcript. Human control must remain meaningful when an agent encounters a decision outside its authority; the agent should pause and hand the decision back with sufficient supporting context. ( https://www.anthropic.com/research/trustworthy-agents )

    Official references/topics: Structured agent handoffs, high-signal tool results, human-control boundaries, persistent structured state

  16. Question 16

    Single answer

    You are building a customer support resolution agent using the Claude Agent SDK. The agent handles high-ambiguity requests like returns, billing disputes, and account issues. It has access to your backend systems through custom Model Context Protocol (MCP) tools ( get_customer , lookup_order , process_refund , escalate_to_human ). Your target is 80%+ first-contact resolution while knowing when to escalate.

    Your process_refund tool returns two types of errors: technical errors (“503 Service Unavailable”, “Connection timeout”) that are transient (~5% of calls), and business errors (“Order exceeds 30-day return window”, “Item already refunded”) that are permanent (~12% of calls). Monitoring shows the agent wastes 3–4 turns retrying business errors that can never succeed. Currently, both error types return only a plain text message to Claude.

    What’s the most effective way to reduce wasted retries while improving customer-facing response quality?

    • Option A:

      Implement automatic retry logic at the tool layer for technical errors only, passing business errors to Claude without retries.

      Correct
    • Option B:

      Add few-shot examples showing how to distinguish retriable from non-retriable errors by parsing error message text.

      Correct
    • Option C:

      Add a check_refund_eligibility tool that must be called before process_refund to prevent business rule violations.

      Correct
    • Option D:

      Return structured error responses with " retriable " : false for business errors and a customer-friendly explanation for Claude to use

      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: D

    Explanation

    The error response must explicitly communicate both control semantics and user-facing meaning. Setting " retriable " : false tells the agent that repeating the same operation cannot change the outcome. Providing a customer-friendly explanation allows Claude to respond accurately without exposing internal implementation details or inventing its own interpretation of the business rule.

    Anthropic recommends returning failed tool operations with an error indicator and sufficiently informative content so Claude can decide whether to retry, request another input, or explain the limitation. Tool interfaces should provide detailed descriptions and structured parameters rather than forcing Claude to infer operational behavior from ambiguous text. ( https://platform.claude.com/docs/en/agents-and-tools/tool-use/build-a-tool-using-agent?utm_source=chatgpt.com )

    Option A appropriately limits automatic retries to technical failures, but it does not solve the stated customer-response problem unless business failures also carry clear semantics. Option B relies on fragile parsing of human-readable messages. Option C adds latency and another tool dependency, and eligibility may still change or fail for reasons not covered by the preliminary check.

    A complete schema should identify the error code, category, retryability, customer-safe explanation, and permitted next actions. Technical errors can similarly return " retriable " : true with retry guidance and a maximum-attempt policy.

    Official references/topics: Structured tool errors, retryability classification, customer-safe explanations, resilient MCP contracts.

  17. Question 17

    Single answer

    You are integrating Claude Code into your Continuous Integration/Continuous Deployment (CI/CD) pipeline. The system runs automated code reviews, generates test cases, and provides feedback on pull requests. You need to design prompts that provide actionable feedback and minimize false positives.

    Your pipeline includes a release-notes generation step that classifies and summarizes approximately 200 commits at the end of each weekly release cycle. Each commit is currently sent as a separate Messages API request using a Sonnet-tier Claude model. The release notes are not needed until the following morning, providing approximately 12 hours of acceptable latency.

    Your team must reduce the per-token API cost while retaining the same model, prompts, and output quality.

    Which approach satisfies all these constraints?

    • Option A:

      Issue the 200 Messages API requests concurrently because parallel execution reduces the per-token price.

      Correct
    • Option B:

      Submit the 200 requests through the Message Batches API with unique custom_id values and retrieve the results after the batch finishes.

      Correct
    • Option C:

      Concatenate all 200 commit messages into one Messages API request because reducing the number of requests always reduces token costs.

      Correct
    • Option D:

      Replace the Sonnet-tier model with a Haiku-tier model to obtain a lower per-token price.

      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: B

    Explanation

    Option B applies Anthropic’s dedicated asynchronous bulk-processing mechanism while preserving the existing model and prompt for every commit. The Message Batches API accepts independent Messages API requests, each identified by a unique custom_id, and charges both input and output usage at 50% of standard API prices. The approximately 12-hour latency allowance makes the release-notes workload well suited to batching because immediate results are unnecessary.

    Option A may reduce wall-clock completion time, but concurrency does not alter the API’s per-token price. Option C changes the task structure and risks exceeding context or output limits, mixing commit-level classifications, complicating retries, and making it harder to associate errors with individual commits. A single large request also does not automatically consume fewer tokens because the model must still process all commit content. Option D violates the requirement to retain the same model tier and output-quality profile. Batch results may arrive in an order different from submission order, so the pipeline must associate every response with its original commit through custom_id. This provides lower cost without changing the individual review prompts. Anthropic Message Batches documentation

    ================

  18. Question 18

    Single answer

    Production monitoring shows that the research phase takes longer than expected. Analysis reveals that the coordinator invokes the web-search subagent, waits for its response, and then invokes the document-analysis subagent. These tasks are independent; neither requires the other’s output. How should you modify the system to run these subagents concurrently?

    • Option A:

      Structure the coordinator to emit both Agent tool calls—for web search and document analysis—in a single response message instead of separate conversation turns.

      Correct
    • Option B:

      Switch both subagents from a Sonnet-tier model to a Haiku-tier model to reduce their individual execution times.

      Correct
    • Option C:

      Add instructions explaining the performance benefits of parallel execution and request that the coordinator invoke both subagents simultaneously.

      Correct
    • Option D:

      Create an asynchronous orchestration layer that launches parallel threads, each running a separate coordinator-subagent pair, and then aggregates the results.

      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: A

    Explanation

    Option A exposes both independent invocations in the same assistant turn, allowing the Agent SDK or application tool runner to execute them concurrently. The coordinator can then receive both results together and continue with synthesis only after the independent research branches have completed.

    Anthropic’s parallel tool-use documentation explains that a response may contain multiple tool-use blocks. Independent, read-only operations can be executed concurrently to reduce latency, after which all corresponding tool results should be returned together. The term “Agent” is used here because current Claude Agent SDK releases renamed the earlier “Task” tool.

    Option B may shorten individual execution but does not eliminate the sequential waiting pattern and could reduce research quality. Option C expresses the desired behavior but does not correct an orchestration implementation that processes only one tool call per turn. Option D introduces unnecessary coordinators, duplicated context, and substantially more complex state management. A single coordinator issuing both independent Agent calls preserves centralized monitoring and result association while removing the avoidable serial dependency. The runtime must process every returned tool call concurrently rather than stopping after the first one.

    ================

  19. Question 19

    Single answer

    You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports.

    When analyzing complex legal cases that cite multiple precedents, the document-analysis subagent processes each precedent sequentially. A landmark case citing 12 precedents takes more than three minutes to analyze completely.

    What is the most effective way to reduce this latency while preserving the coordinator’s ability to monitor and debug the system?

    • Option A:

      Implement a message queue where precedent-analysis tasks are processed asynchronously by a pool of worker agents.

      Correct
    • Option B:

      Enable the document-analysis subagent to spawn its own specialized subagents dynamically when it encounters cases with many citations.

      Correct
    • Option C:

      Have the coordinator spawn parallel document-analysis subagents, each handling a subset of precedents, and then aggregate the results before synthesis.

      Correct
    • Option D:

      Create a recursive agent hierarchy where analysis agents subdivide work among child agents until reaching single-precedent granularity.

      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: C

    Explanation

    Option C parallelizes independent work while retaining centralized orchestration. Each precedent can be analyzed without waiting for the previous precedent, so the coordinator can divide the 12 cases into balanced subsets and invoke several document-analysis subagents concurrently. It then receives their final outputs, records which precedents completed or failed, and aggregates the results before synthesis. Anthropic’s multi-agent research architecture uses an orchestrator-worker pattern in which the lead agent creates specialized subagents that operate in parallel and return findings for consolidation. Keeping spawning decisions at the coordinator also produces a clearer execution trace for monitoring and debugging. A generic asynchronous queue, option A, adds infrastructure but does not define how results remain associated with the correct research task. Options B and D create nested or recursive delegation, making execution paths, permissions, failures, and token consumption harder to observe. Anthropic also cautions that multi-agent systems consume substantially more tokens than ordinary interactions, so unbounded recursive decomposition is inefficient. Coordinator-controlled parallel fan-out followed by deterministic aggregation provides the latency improvement without sacrificing operational visibility.

    ================

  20. Question 20

    Single answer

    You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.

    Your extraction pipeline occasionally receives responses that cannot be parsed as valid JSON, causing downstream processing failures. The current implementation prompts Claude to return JSON in the response text and then parses it.

    What is the most reliable approach to ensure Claude returns valid, schema-compliant structured data?

    • Option A:

      Add explicit formatting instructions to the prompt with JSON examples, emphasizing that Claude must return only valid JSON with no surrounding text.

      Correct
    • Option B:

      Use regular expressions to locate and extract JSON from the response text, handling cases where Claude includes explanatory text around the JSON block.

      Correct
    • Option C:

      Define a tool with a JSON schema specifying the expected structure, using tool use to constrain Claude’s output to schema-compliant JSON.

      Correct
    • Option D:

      Implement a retry loop that catches JSON parsing errors and re-prompts Claude with the error details, asking it to correct the malformed output.

      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: C

    Explanation

    Option C is the strongest choice among the listed approaches because it moves structured data generation from unconstrained response text into a schema-governed interface. Prompt-only JSON instructions, regular-expression extraction, and corrective retries are probabilistic recovery mechanisms: they may reduce failures, but none guarantees that the first response satisfies the contract. Anthropic now provides two schema-constrained mechanisms: JSON Structured Outputs through output_config.format and strict tool use through a tool definition with strict: true. Strict tool use uses grammar-constrained sampling so the tool input conforms to the declared JSON Schema, including required properties and data types. Therefore, the production implementation represented by option C should define the extraction tool’s input_schema and enable strict mode. The application reads the tool_use block as the extracted record; it does not need to scrape prose or search for braces. Option A remains vulnerable to preambles or malformed output. Option B can select a JSON-looking substring but cannot establish schema validity. Option D adds latency and cost and can still fail repeatedly. The schema-constrained tool contract is consequently the most reliable architecture available in these options.

    ================

  21. Question 21

    Single answer

    You are building a customer support resolution agent using the Claude Agent SDK. The agent handles high-ambiguity requests like returns, billing disputes, and account issues. It has access to your backend systems through custom Model Context Protocol (MCP) tools ( get_customer , lookup_order , process_refund , escalate_to_human ). Your target is 80%+ first-contact resolution while knowing when to escalate.

    Anthropic’s tool use documentation states: “Write instructive error messages. Instead of generic errors like ‘failed’, include what went wrong and what Claude should try next.” A billing dispute agent uses lookup_order , which catches all exceptions and returns a tool_result with is_error: true and the message “Tool execution failed”. Monitoring shows two failure modes: the agent retries the identical call until hitting the turn limit, or it immediately calls escalate_to_human without trying alternative tools.

    Which change follows the documented recommendation and gives Claude the information it needs to select the correct recovery action for each error type?

    • Option A:

      Implement retry logic with exponential backoff inside each tool implementation so transient errors are resolved transparently within the tool before any failure result is surfaced to Claude in the agentic loop.

      Correct
    • Option B:

      Return error-type-specific messages with is_error: true , e.g., “Order not found—try get_customer to search by phone” for data errors and “Database timeout (transient)—retry should succeed” for infrastructure errors.

      Correct
    • Option C:

      Remove is_error: true and return the error details as normal tool content, so Claude reasons about the response as data rather than treating it as a flagged failure condition that biases retry behavior.

      Correct
    • Option D:

      Add an error classification step in the agentic loop that intercepts tool errors before Claude sees them, then routes to hardcoded retry or escalation logic.

      Correct
    Show Answer & Explanation Hide Answer & Explanation

    Correct Answer: B

    Explanation

    Option B preserves the formal failure indicator while making the returned content operationally useful. Anthropic’s tool-use guidance states that when a tool fails, the application should return the error through tool_result content and mark it with is_error: true . Claude can then use that information to retry with corrected input, seek clarification, or explain the limitation. ( https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/bash-tool )

    The two example messages identify both the cause and the appropriate recovery path. “Order not found” indicates that repeating the same identifier will not help and proposes an alternative lookup method. “Database timeout” identifies a transient infrastructure condition for which a retry is reasonable. This eliminates blind repetition without removing Claude’s ability to adapt.

    Option A can be useful for tightly bounded low-level retries, but it does not solve permanent errors or tell the agent what happened after retries fail. Option C incorrectly disguises a failed operation as successful tool content. Option D moves semantic knowledge into hardcoded orchestration logic, making the system more rigid and duplicating information already known by the tool.

    The most reliable tool interface combines the error flag, a stable error type, a retryability indicator, a concise causal explanation, and a recommended recovery action.

    Official references/topics: is_error handling, instructive tool results, recovery guidance, resilient MCP tool design.