CertSafari

    Free Anthropic Claude Certified Architect – Foundations (CCAR-F) Sample Questions

    35 free sample questions from our bank of 435+, covering every exam domain, with answers and detailed explanations. Updated November 2026.

    Domain 1: Agentic Architecture & Orchestration

    Subdomain 1.2: Orchestrate multi-agent systems with coordinator-subagent patterns

    1.An architect reviews a multi-agent research assistant and finds that each subagent independently implements its own retry logic, logging format, and rate-limit backoff, leading to inconsistent behavior across the system. Which change best aligns this design with the hub-and-spoke coordinator pattern's intended benefits?

    1. A.Paste one shared retry and backoff routine into each subagent's system prompt, leaving each subagent to apply it on its own
    2. B.Move retry handling into the coordinator and keep logging and backoff in each subagent, leaving them tuned to their own tools
    3. C.Add a dedicated subagent that applies the retry, logging and backoff policy for the others, leaving the coordinator to route work
    4. D.Move the retry, logging and backoff policy into the coordinator, leaving subagents to report failures and results back to it
    Show answer & explanation

    Correct answer: D — Move the retry, logging and backoff policy into the coordinator, leaving subagents to report failures and results back to it

    • A. Pasting the same routine into each prompt keeps the policy inside the subagents, so every copy is still run and interpreted independently. Copies drift as they are edited, and a prompt cannot enforce identical behavior. The coordinator gains no central control over errors.
    • B. Centralizing only retries leaves logging format and rate-limit backoff defined separately in each subagent, so two of the three reported inconsistencies remain. The coordinator still cannot see or control how failures are logged or throttled.
    • C. A dedicated policy subagent adds a peer that must see the others' failures. In hub-and-spoke, the coordinator is the single point through which subagent communication and error handling pass, so this adds a hop and moves control away from the hub. The coordinator also loses direct visibility into failures.
    • D. Correct. In hub-and-spoke, subagents communicate only through the coordinator, so it is the natural place for retry, logging and backoff policy. Subagents then report outcomes, and behavior is uniform and observable in one place.

    Subdomain 1.1: Design and implement agentic loops for autonomous task execution

    2.An architect is building a client-side agent loop against the Messages API for a data-cleanup task. The first response has stop_reason set to "tool_use" and contains a tool_use block requesting a file-listing tool. What should the loop do next to correctly continue the agentic execution?

    1. A.Run the tool, add its output as a tool_result block with the matching tool_use_id in a user message, and resend the history with the tool_use turn
    2. B.Run the tool, add its output as a tool_result block with the matching tool_use_id in an assistant message, and resend the history without the tool_use turn
    3. C.Run the tool, add its output as a plain text block naming the tool_use_id in a user message, and resend the history without the tool_use turn
    4. D.Run the tool, add its output as a plain text block naming the tool_use_id in an assistant message, and resend the history with the tool_use turn
    Show answer & explanation

    Correct answer: A — Run the tool, add its output as a tool_result block with the matching tool_use_id in a user message, and resend the history with the tool_use turn

    • A. Correct. The client runs the requested tool, returns the output in a user message as a tool_result block carrying the tool_use_id of the request, and resends the history including Claude's tool_use turn. This is how the loop continues.
    • B. Incorrect. A tool_result block belongs in a user message, not an assistant message. Removing Claude's tool_use turn also leaves the result with no matching tool call, so the request is invalid.
    • C. Incorrect. Naming the tool_use_id inside plain text does not link the output to the call. The result has to come back as a tool_result block, and the history needs Claude's tool_use turn so the model can see what it requested.
    • D. Incorrect. After an assistant turn containing a tool_use block, the next message must be a user message whose content answers it with a tool_result block. Plain text in an assistant message does not return the output to Claude.

    Subdomain 1.3: Configure subagent invocation, context passing, and spawning

    3.A coordinator prompt for a "research-assistant" subagent currently reads: "Step 1: search for the top 5 articles. Step 2: open each one. Step 3: extract the publish date. Step 4: return a table." Reviewers find the subagent produces a table even when the most useful sources have no clear publish date, or when six sources would answer the question better than five. What change to the coordinator prompt would improve outcomes here?

    1. A.Replace the numbered list with a brief stating the research goal and the quality bar for sources, and let the subagent decide how many to read and what to report
    2. B.Keep the numbered list but add a branch to step 3: skip articles without a clear date and open the next search result until five dated articles are collected
    3. C.Keep the numbered list but add a fifth step that re-reads each article's byline and metadata to confirm the extracted publish date before the table is returned
    4. D.Expand the four steps into ten, spelling out search query wording, click order and date field extraction so each decision point is fixed in advance
    Show answer & explanation

    Correct answer: A — Replace the numbered list with a brief stating the research goal and the quality bar for sources, and let the subagent decide how many to read and what to report

    • A. Correct. The failures come from a fixed procedure that cannot adapt. A brief that states the goal and the quality bar lets the subagent read more or fewer sources and handle a missing date sensibly. It also lets the subagent report what it could verify rather than filling in a table.
    • B. Incorrect. The branch discards credible sources just because they have no clear date, even though those can be the most useful ones. The count also stays fixed at five, so a case where six sources would answer the question better is still not handled.
    • C. Incorrect. Re-checking a date that was extracted only polishes the existing procedure. It does nothing when an article has no clear publish date to confirm, and it leaves the fixed five-article count and the mandatory table unchanged.
    • D. Incorrect. A longer script fixes more decisions in advance, so it adds rigidity. The subagent would still produce a table when sources lack dates and would still stop at a preset number of sources, which are the problems reviewers reported.

    Subdomain 1.4: Implement multi-step workflows with enforcement and handoff patterns

    4.A refund workflow requires that process_refund always be called with the exact customer_id captured by an earlier verified get_customer call, never a value the model retypes from the conversation. A PreToolUse hook already blocks the call when no verified ID exists in session state. What should the hook do once a verified ID is present, to prevent the model from substituting a different ID string?

    1. A.Return permissionDecision "allow" with no updatedInput, so the refund runs with the customer_id the model supplied once session state holds a verified ID
    2. B.Return permissionDecision "allow" with updatedInput that replaces customer_id with the verified ID from session state, so the refund runs with the stored value
    3. C.Return permissionDecision "ask" with a prompt showing the verified ID, so a reviewer compares it with the model's customer_id and approves each refund call
    4. D.Return permissionDecision "deny" with a reason giving the verified ID, so the model retries process_refund and passes the customer_id from that message
    Show answer & explanation

    Correct answer: B — Return permissionDecision "allow" with updatedInput that replaces customer_id with the verified ID from session state, so the refund runs with the stored value

    • A. Incorrect. Allowing the call without updatedInput lets the model's own customer_id reach process_refund. Having a verified ID in session state does not show the model used it, so a substituted string would still get through.
    • B. Correct. With "allow", updatedInput rewrites the tool arguments before execution. The hook can overwrite customer_id with the verified value from session state, so the model's own string never reaches process_refund.
    • C. Incorrect. "ask" only hands the model's arguments to a person for approval, and the hook does not change customer_id. Enforcement then depends on a reviewer spotting a mismatch on every refund, which does not guarantee the verified ID is used.
    • D. Incorrect. A deny reason is text fed back to the model, so the model has to retype the ID from that message. That is the retyped value the workflow forbids, and nothing guarantees the retry carries the exact verified string.

    Subdomain 1.7: Manage session state, resumption, and forking

    5.An architect resumed a session and asked the agent to revert a file to a state from earlier in that same conversation, expecting the session itself to have preserved the file's old contents. The agent instead reports it can only see the file's current, edited contents on disk. What explains this behavior?

    1. A.The resume call replays the transcript but not file state, so reverting a file requires the separate file checkpointing feature
    2. B.The resume call loaded a different session ID than the original, so the file snapshots taken in that session were not available
    3. C.The resume call omitted fork_session, so the agent worked on the live files instead of a branched copy holding the earlier state
    4. D.The resume call reloaded the transcript without earlier tool results, so the agent can read only what is currently on disk
    Show answer & explanation

    Correct answer: A — The resume call replays the transcript but not file state, so reverting a file requires the separate file checkpointing feature

    • A. Correct. Resuming a session restores the saved conversation history, including tool calls and their results, but it does not capture the filesystem. Returning a file to an earlier state needs the separate file-checkpointing feature.
    • B. Incorrect. A session stores conversation history and never holds file snapshots, so no session ID, right or wrong, could have supplied the earlier file contents. Loading the correct session would still leave the file as it is on disk.
    • C. Incorrect. fork_session only decides whether a resumed conversation branches into a new session or continues the original. It does not copy files or keep earlier file versions, so the agent would see the same on-disk file either way.
    • D. Incorrect. A resumed session reloads the earlier tool results along with the rest of the conversation history. The agent cannot restore the file because history was never a store of file contents, not because earlier reads were dropped.

    Subdomain 1.6: Design task decomposition strategies for complex workflows

    6.A reviewer is designing an agentic code review for a pull request that touches 40 files across a monorepo. Reviewers have noticed that when a single pass tries to hold all 40 files in context at once, subtle cross-file issues are missed and comments become generic. What restructuring addresses this attention dilution problem?

    1. A.Review each file in its own pass for local issues, then run a second pass over those findings to check how the files interact
    2. B.Move the review to a model with a larger context window, so the full diff is read in one sitting without being truncated
    3. C.Keep one pass over the diff, but have the model rank the files by risk first, then spend its review effort on the highest-risk ones
    4. D.Run one pass over the diff several times with the file order shuffled each time, then keep the comments that recur across runs
    Show answer & explanation

    Correct answer: A — Review each file in its own pass for local issues, then run a second pass over those findings to check how the files interact

    • A. Correct. Focused per-file passes keep each review small enough to stay specific, and a second pass over the findings catches interactions between files that a per-file review cannot see. This matches the recommended pattern for large pull requests.
    • B. The reviewer already puts the whole diff into a single pass, and the problem is that attention is spread thinly across 40 files. A larger context window only lets more content fit. It does not make the model attend to each file more carefully, so generic comments and missed cross-file issues remain.
    • C. Ranking files by risk inside one pass still keeps all 40 files in context, so attention stays diluted. It also directs less effort to the lower-ranked files, where subtle cross-file issues can still be hiding, so the missed issues are not recovered.
    • D. Each shuffled run still holds the entire diff in a single pass, so attention is diluted in every run. Reordering only changes which files happen to get more attention each time. Keeping the comments that recur favours the obvious issues and drops the subtle cross-file ones that surface inconsistently.

    Subdomain 1.1: Design and implement agentic loops for autonomous task execution

    7.An agent loop generating a long report hits a response where stop_reason comes back as "max_tokens" rather than "tool_use" or "end_turn", because the output was truncated before Claude could finish. The loop's control flow only branches on those two familiar values and falls through to the "end_turn" branch by default. What is the risk of that fallback behavior?

    1. A.The loop handles the cut-off response as a normal completion, so a partial report is returned as the final result and the run ends normally
    2. B.The loop re-sends the same request with a larger max_tokens value, so the report is regenerated from the beginning and the run continues normally
    3. C.The loop reads the response as a pending tool call, so it runs the tool handler with empty input and the conversation continues with a bad result
    4. D.The loop raises an error on the unrecognised stop_reason, so the run aborts with an unhandled exception and the partial report is lost
    Show answer & explanation

    Correct answer: A — The loop handles the cut-off response as a normal completion, so a partial report is returned as the final result and the run ends normally

    • A. Correct. The default branch is the completion branch, so a response that was cut off mid-generation is handled like a finished one. The partial report is returned as final and the loop stops without asking Claude to continue.
    • B. Incorrect. Raising max_tokens and retrying is a reasonable way to handle truncation, but this loop has no such logic. Its default branch is the completion branch, which stops the run, and nothing in the API changes max_tokens or resends a request on its own.
    • C. Incorrect. A tool handler runs only when stop_reason is "tool_use". A truncated response carries "max_tokens", which falls through to the completion branch, so no tool is invoked and no bad tool result is produced.
    • D. Incorrect. "max_tokens" is a documented stop_reason value, and this loop has a default branch that catches any value it does not list. No exception is raised. The loop ends quietly with the partial report treated as complete.

    Subdomain 1.7: Manage session state, resumption, and forking

    8.An architect's internal tool lets engineers pick a past investigation session of a codebase and continue it. One engineer wants to try a different refactoring approach starting from the same analysis baseline, while keeping the original investigation intact so the team can still continue it later. Which approach fits?

    1. A.Resume with fork_session so the alternative runs in a new session branched from the baseline
    2. B.Resume the session normally and tell the agent to ignore its earlier conclusions on the topic
    3. C.Start a fresh session with no history and ask the agent to re-analyze the whole codebase
    4. D.Resume the same session and have the agent keep both approaches apart within one conversation
    Show answer & explanation

    Correct answer: A — Resume with fork_session so the alternative runs in a new session branched from the baseline

    • A. Correct. Forking creates a new session that starts with a copy of the original's history while the original stays unchanged, which is exactly an independent branch from a shared analysis baseline. The engineer keeps the full prior context and the original investigation remains available for the other approach.
    • B. Incorrect. Resuming without forking appends the new work to the same session, so the original investigation is changed rather than preserved. Telling the agent to ignore earlier conclusions also leaves the old reasoning in context and does not create a separate branch.
    • C. Incorrect. A fresh session does keep the original untouched, but it throws away the analysis already done, so the baseline has to be rebuilt at the cost of time and tokens. The goal was to branch from the existing baseline, not to restart from nothing.
    • D. Incorrect. Keeping two competing approaches inside a single resumed conversation mixes them in one history, so each approach contaminates the other and the original is no longer a clean baseline. Independent branches need independent sessions.

    Subdomain 1.4: Implement multi-step workflows with enforcement and handoff patterns

    9.An architect is drafting the handoff protocol for cases where an agent must escalate mid-process to a human supervisor who cannot see the conversation. The draft template currently has one field: a free-text "notes" box the agent fills in however it sees fit. What is the strongest improvement to make the handoffs reliably useful?

    1. A.Remove the notes field and have the supervisor phone the customer at the start of each escalation to confirm the account details and the issue directly
    2. B.Keep the notes field as free text but raise its character limit, giving the agent room to record the full context it gathered during the conversation
    3. C.Replace the notes field with required structured fields (customer details, suspected root cause, recommended action) filled in before escalating
    4. D.Keep the notes field as free text but add a system prompt guideline asking the agent to cover the customer, the likely cause, and the next step in each note
    Show answer & explanation

    Correct answer: C — Replace the notes field with required structured fields (customer details, suspected root cause, recommended action) filled in before escalating

    • A. Incorrect. The agent already holds the case details, and the supervisor cannot see the conversation. Calling the customer back makes them repeat themselves and delays resolution. The fix should be to make the agent's handoff complete, not to discard it.
    • B. Incorrect. A higher character limit adds room but no structure. The agent can still leave out the cause or the next action, or bury them in a long note, so the supervisor still gets handoffs of uneven quality.
    • C. Correct. Required fields for customer details, root cause, and recommended action force the agent to supply the same essentials in every escalation. The agent only records its recommendation in the template; the supervisor receives the case and decides how to act. A supervisor who cannot see the conversation then gets consistent, complete context instead of whatever a free-form note happens to contain.
    • D. Incorrect. A prompt guideline is only a nudge on an unstructured field. Nothing requires the agent to include the cause or next step, and nothing validates that it did, so completeness is still not reliable across handoffs.

    Domain 2: Tool Design & MCP Integration

    Subdomain 2.3: Distribute tools appropriately across agents and configure tool choice

    10.An onboarding agent walks a new user through account setup and needs to call create_profile immediately as the very first action of the conversation, before considering any other tool such as send_welcome_email or assign_default_settings. After that first call, the agent must be free either to call one of the remaining tools or to reply to the user in plain text, depending on what the user says. What is the best way to configure this?

    1. A.Use tool_choice: {"type": "tool", "name": "create_profile"} for the first turn only, then switch to tool_choice: {"type": "auto"} for subsequent turns
    2. B.Use tool_choice: {"type": "any"} for the entire conversation so the model is always forced to pick from create_profile, send_welcome_email, and assign_default_settings
    3. C.Order create_profile first in the tools array and leave tool_choice at {"type": "auto"} for the whole conversation
    4. D.Use tool_choice: {"type": "none"} for the first turn so the model cannot call any tool, then switch to {"type": "auto"} afterward
    Show answer & explanation

    Correct answer: A — Use tool_choice: {"type": "tool", "name": "create_profile"} for the first turn only, then switch to tool_choice: {"type": "auto"} for subsequent turns

    • A. Correct. Naming the tool in tool_choice forces that specific tool, so create_profile is guaranteed to run as the opening action. Switching to auto afterward is what the later turns need: auto lets Claude decide whether to call any provided tool or not, so the agent can invoke a remaining tool when the user's reply calls for one and answer in plain text when it does not.
    • B. Incorrect. The any setting requires the model to use one of the provided tools without forcing a particular one, so it never guarantees that create_profile runs first. It also prefills a tool call on every turn, so the agent could never respond to the user in plain text.
    • C. Incorrect. Position in the tools array is not a documented mechanism for controlling which tool is called first. Under auto the model decides whether to call a tool at all and which one, so create_profile is not guaranteed to be the opening action.
    • D. Incorrect. The none setting prevents Claude from using any tools, so blocking tool calls on the first turn also blocks create_profile, the very action that is required to happen first.

    Subdomain 2.1: Design effective tool interfaces with clear descriptions and boundaries

    11.A single tool, `analyze_document`, extracts data points, produces summaries, and verifies claims against a source. Users report it inconsistently performs only one of these behaviors for ambiguous requests. Which redesign best addresses this?

    1. A.Keep the tool as is and have the system prompt tell the model to call it once per behavior on each request.
    2. B.Fold it into a broader `process_document` tool covering the full set of document tasks, with a detailed description.
    3. C.Replace it with three tools for extraction, summarization and claim checking, each with a description of its own.
    4. D.Add a required `mode` parameter (extract, summarize, verify) to the tool, sharing one general description across modes.
    Show answer & explanation

    Correct answer: C — Replace it with three tools for extraction, summarization and claim checking, each with a description of its own.

    • A. Incorrect. Calling the tool once per behavior on every request wastes invocations when a request needs only one behavior. The tool is still a single generic one, so nothing tells it which behavior each call should perform, and the ambiguity remains.
    • B. Incorrect. Folding the tool into a broader one gives a single tool even more responsibilities. A longer description does not tell the model which behavior a call should trigger, so the overlap that causes the inconsistency gets worse.
    • C. Correct. Separate tools for extraction, summarization and claim verification, each with its own description, make the intended behavior explicit at selection time. This removes the ambiguity in a single multi-purpose tool.
    • D. Incorrect. A mode parameter helps only if the model knows when each mode applies. With one shared general description, an ambiguous request still leaves the model guessing the purpose, so it may pick the wrong mode or the same one every time.

    Subdomain 2.4: Integrate MCP servers into Claude Code and agent workflows

    12.An architect is rolling out a GitHub MCP server for the whole engineering team. Every teammate has their own GitHub personal access token, and the config must be checked into the repo without ever committing a real secret. How should the architect configure this?

    1. A.Add the server with project scope in .mcp.json, and set the header to `Authorization: Bearer ${GITHUB_TOKEN}`, with each teammate defining that variable in their shell environment
    2. B.Add the server with user scope in ~/.claude.json, and set the header to `Authorization: Bearer <token>`, with each teammate filling in their own token on their machine
    3. C.Add the server with local scope, and set the header to `Authorization: Bearer <token>` in .mcp.json, with each teammate replacing the placeholder with their own token
    4. D.Add the server with project scope in .mcp.json, and add that file to .gitignore, with each teammate keeping their own token in the header of their local copy
    Show answer & explanation

    Correct answer: A — Add the server with project scope in .mcp.json, and set the header to `Authorization: Bearer ${GITHUB_TOKEN}`, with each teammate defining that variable in their shell environment

    • A. Correct. Project scope writes the server to .mcp.json, which is committed and shared with the team. Claude Code expands ${GITHUB_TOKEN} from the environment of whoever connects, so each teammate's own token is used and no secret appears in the file.
    • B. User scope stores the server in ~/.claude.json, a per-user file on one machine. Nothing is added to the repository, so the team does not receive a checked-in configuration, which the scenario requires.
    • C. Local scope is private to one user in one project and does not write to .mcp.json, so the checked-in file would not hold the server. Having teammates edit a tracked .mcp.json to insert real tokens also risks committing a secret.
    • D. Ignoring .mcp.json keeps it out of version control, so the server definition is never shared through the repo. Teammates would have to build their own copies, which fails the requirement for a checked-in team configuration.

    Subdomain 2.5: Select and apply built-in tools (Read, Write, Edit, Bash, Grep, Glob) effectively

    13.An architect asks Claude Code to identify every React test file in a codebase where naming mixes `.test.tsx`, `.spec.tsx`, and older files simply ending in `Test.tsx`, spread across many nested feature directories. Only a list of matching file paths is needed, with no content inspection. Which tool is the most direct fit?

    1. A.Bash, running find from the project root with -name '*.test.tsx' to list the test file paths in nested feature folders
    2. B.Grep, using output mode files_with_matches and a regex for describe calls to list the test file paths in the codebase
    3. C.Glob, using patterns such as **/*.test.tsx, **/*.spec.tsx, and **/*Test.tsx to list the test file paths in the codebase
    4. D.Read, opening the Jest config file and using its testMatch setting to list the test file paths in nested feature folders
    Show answer & explanation

    Correct answer: C — Glob, using patterns such as **/*.test.tsx, **/*.spec.tsx, and **/*Test.tsx to list the test file paths in the codebase

    • A. Incorrect. A find command filtered on '*.test.tsx' matches only one of the three naming conventions. It misses the .spec.tsx files and the older files ending in Test.tsx, so the list of paths would be incomplete.
    • B. Incorrect. Grep matches file contents rather than file names, and the task needs paths selected by naming convention with no content inspection. A regex for describe calls would also return non-React test files and helpers that contain such calls, and would miss matching files that lack them.
    • C. Correct. Glob matches file paths by name pattern and supports recursive ** matching. Giving it one pattern per naming convention returns the matching file paths across the nested directories without opening any file.
    • D. Incorrect. Read returns the contents of the single file it is pointed at. Opening the Jest config would show the testMatch patterns as text, not the list of files that match them, so it produces no file paths.

    Subdomain 2.2: Implement structured error responses for MCP tools

    14.A coordinator dispatches the same document-indexing task to three subagents in parallel, each covering a different folder. Subagent 1 finishes cleanly. Subagent 2 hits a permission error on one file it cannot resolve locally and reports partial results plus that failure. Subagent 3's process crashes with no output at all. How should the coordinator's downstream handling differ between subagent 2 and subagent 3?

    1. A.For subagent 2, keep its partial results in the index and follow up on the one file it reported as blocked by a permission error; for subagent 3, queue the whole folder for a fresh indexing run and treat none of its files as confirmed indexed.
    2. B.For subagent 2, discard its partial results and error report, then queue the whole folder for a fresh indexing run from the start; for subagent 3, queue the whole folder for a fresh indexing run and treat none of its files as confirmed indexed.
    3. C.For subagent 2, keep its partial results and retry only the file that hit the permission error; for subagent 3, retry the files most likely to have hit the same permission error, using the earlier failure as the working diagnosis for the crash.
    4. D.For subagent 2, merge the partial results into the index and mark the folder done, logging the permission error as a non-blocking warning; for subagent 3, mark the folder done as well, treating the absence of reported file errors as a clean run.
    Show answer & explanation

    Correct answer: A — For subagent 2, keep its partial results in the index and follow up on the one file it reported as blocked by a permission error; for subagent 3, queue the whole folder for a fresh indexing run and treat none of its files as confirmed indexed.

    • A. Correct. Subagent 2 returned usable partial results and named the exact file that failed, so the coordinator can keep the finished work and resolve only that gap. Subagent 3 crashed with no output, so nothing in its folder can be verified and the whole folder has to be indexed again.
    • B. Incorrect. Subagent 2 reported what it finished and which file failed, so throwing that away repeats completed indexing and ignores a precise, actionable error. Handling a structured partial failure the same way as a silent crash removes the difference the coordinator is supposed to act on.
    • C. Incorrect. Subagent 3 crashed without producing any output or error, so there is no evidence that a permission problem was involved or which files were affected. Targeting guessed files leaves the rest of the folder unverified, so parts of it may never get indexed.
    • D. Incorrect. A permission error that subagent 2 could not resolve means at least one file is not indexed, so marking the folder done leaves a known gap. A crash with no output is not a clean run: a missing error report shows the failure went unreported, not that the folder was indexed.

    Subdomain 2.4: Integrate MCP servers into Claude Code and agent workflows

    15.A custom MCP server dynamically adds a new tool partway through a long-running session, based on state changes on its own backend. The server sends the appropriate MCP notification for this. What should the architect expect Claude Code to do, without any manual reconnect?

    1. A.Re-request that server's tool list as soon as the `list_changed` notification arrives, and add the new tool to the current session over the same connection.
    2. B.Keep the tool list from the initial handshake when the `list_changed` notification arrives, and expose the new tool only once the next session starts.
    3. C.Close the server connection when the `list_changed` notification arrives, then reopen it in the background to load the new tool list, cutting off running tool calls.
    4. D.Note the `list_changed` notification when it arrives, and expose the new tool only after the user reconnects that server from the `/mcp` menu of the running session.
    Show answer & explanation

    Correct answer: A — Re-request that server's tool list as soon as the `list_changed` notification arrives, and add the new tool to the current session over the same connection.

    • A. Correct. Claude Code supports the MCP `list_changed` notification. When a server sends it, Claude Code re-requests that server's tool list and updates its tools in place. The new tool becomes usable mid-session, with no reconnect and no restart.
    • B. Incorrect. The tool list is not frozen at the initial handshake. `list_changed` exists so a server can change its tools mid-session, and Claude Code acts on it right away. Waiting for a new session would leave the new tool unavailable throughout the long-running session described.
    • C. Incorrect. Handling `list_changed` does not involve dropping the connection. Claude Code refreshes the tool list over the existing connection, so tool calls that are already running are not cut off during a long-running session.
    • D. Incorrect. Claude Code acts on `list_changed` by itself and does not wait for the user to reconnect the server from `/mcp`. Requiring a manual reconnect contradicts the stated expectation that the new tool appears without one.

    Subdomain 2.1: Design effective tool interfaces with clear descriptions and boundaries

    16.A tool description reads "Updates a customer record with given fields." In practice, the model frequently passes fields that don't exist on the schema, and it's unclear whether partial updates are supported. What documentation gap explains this failure mode?

    1. A.The schema's camelCase field names clash with the model's snake_case habits, so it sends field names that are not defined on the schema.
    2. B.The tool is declared after the read-only tools in the list, so the model gives it lower priority and fills in fields the schema does not define.
    3. C.The description lists no valid fields and does not say if a partial set of fields is accepted, so the model improvises inputs the schema rejects.
    4. D.The schema marks fields as optional, which the model handles poorly, so the description should require a full set of fields on each call.
    Show answer & explanation

    Correct answer: C — The description lists no valid fields and does not say if a partial set of fields is accepted, so the model improvises inputs the schema rejects.

    • A. Incorrect. Claude handles camelCase and snake_case field names equally well, so casing does not cause invented fields. Casing also does not explain the uncertainty about partial updates. Both symptoms come from a description that never states which fields are valid or how updates behave.
    • B. Incorrect. The order in which tools are declared does not make the model rank a tool lower or hallucinate fields. Tool use follows the user's intent and the tool descriptions. Declaration order also says nothing about partial-update support, which is the other symptom here.
    • C. Correct. The one-line description gives no list of valid fields, no input format and no boundary behavior such as partial-update support. With no guidance the model has to guess, so it invents fields. Naming the valid fields and stating the partial-update behavior closes this documentation gap.
    • D. Incorrect. Claude handles optional parameters reliably when the schema and description define them clearly. Requiring a full set of fields on each call would change the tool's design and rule out partial updates. It also leaves the actual gap open: the description never says which fields exist or what a partial update does.

    Subdomain 2.2: Implement structured error responses for MCP tools

    17.A coordinator agent delegates a three-step data migration to a subagent: extract, transform, and load, but the load step fails twice on a database connection reset, a known transient condition, before finally succeeding on the third attempt inside the subagent's own execution. What should the subagent report back to the coordinator?

    1. A.A success result confirming that extract, transform and load finished, keeping the retried load attempts inside the subagent's own run rather than passing them up
    2. B.An `isError: true` result listing the two connection resets and the final load success, leaving the coordinator to decide whether to rerun the migration from the start
    3. C.A partial-completion result marking extract and transform as done and load as unconfirmed, leaving the coordinator to verify the target database before continuing
    4. D.An escalation naming the two connection resets as a credential problem, asking the coordinator to issue new database credentials before the migration is rerun
    Show answer & explanation

    Correct answer: A — A success result confirming that extract, transform and load finished, keeping the retried load attempts inside the subagent's own run rather than passing them up

    • A. Correct. The load step succeeded on the third attempt, so the subagent's actual final state is a completed migration. In the Claude Agent SDK's subagent design, intermediate tool calls and results stay in the subagent's own context and only its final message goes back to the parent. A recovered transient failure therefore does not need to reach the coordinator, and a success result describes the outcome accurately.
    • B. Incorrect. MCP's isError flag marks a tool execution that failed and still needs to be acted on. Here the load step already succeeded before the subagent reports back, so an error result misstates the outcome. It would also invite the coordinator to rerun a migration that is already complete, and it pushes the subagent's internal retry detail up into the coordinator's context.
    • C. Incorrect. The subagent knows the load step finished on its third attempt, so labelling it unconfirmed understates the real result. It also hands the coordinator a verification task and a reason to hold up or repeat work that is already done, when the retries were resolved inside the subagent.
    • D. Incorrect. The connection reset is described as a known transient condition, and the load succeeded on retry with the same credentials. That rules out expired credentials, which would fail every attempt with an authentication error. Escalating for new credentials targets the wrong cause and asks for action on a migration that has already completed.

    Domain 3: Claude Code Configuration & Workflows

    Subdomain 3.4: Determine when to use plan mode vs direct execution

    18.A team is choosing between two integration approaches for a new payment provider: one requires a new message queue and asynchronous worker fleet, the other requires synchronous calls from existing services with added retry logic. Each has different infrastructure and operational tradeoffs, and the team has not yet decided which to pursue. What is the most appropriate way to proceed with Claude Code?

    1. A.Use plan mode to have Claude draft a detailed design for the queue-based option, then treat that design as the team's chosen direction
    2. B.Use plan mode to have Claude read the existing services and compare both options on operational cost and risk, then report back before code is written
    3. C.Use direct execution to have Claude build the queue-based and synchronous options on separate branches, then compare the pull requests and keep one
    4. D.Use direct execution to have Claude estimate which option adds fewer new files and modules, then implement the smaller one and revisit if needed
    Show answer & explanation

    Correct answer: B — Use plan mode to have Claude read the existing services and compare both options on operational cost and risk, then report back before code is written

    • A. Plan mode is a safe place to design, but planning only the queue-based option makes that choice before the two approaches have been compared. The team has not decided between them, so the synchronous option with retry logic never gets evaluated.
    • B. Correct. The two approaches carry different infrastructure and operational costs, and the team has not chosen one. Plan mode lets Claude read the existing services and compare both options without changing code, so the team can decide before any implementation starts.
    • C. Building both integrations means paying for a queue and worker fleet plus the synchronous changes, and then discarding one. The team has not decided yet, and a read-only comparison would settle the question at a fraction of that cost and rework.
    • D. The number of new files or modules says little about the operational tradeoffs that separate the two approaches, such as running a worker fleet versus adding retry logic. Starting implementation on that basis picks an approach without any real comparison.

    Subdomain 3.6: Integrate Claude Code into CI/CD pipelines

    19.A CI pipeline needs to parse Claude's response programmatically to decide whether a build step should fail. The team wants the reply to always match a specific JSON shape, for example an object with a boolean `passed` field and an array of `issues` strings, regardless of how Claude phrases its reasoning. Which invocation achieves this?

    1. A.claude -p "review this diff" --output-format json --json-schema '{"type":"object","properties":{"passed":{"type":"boolean"},"issues":{"type":"array","items":{"type":"string"}}},"required":["passed","issues"]}'
    2. B.claude -p "review this diff and reply with a boolean passed and a list of issues" --output-format json --max-turns 1
    3. C.claude -p "review this diff" --output-format stream-json --verbose --include-partial-messages --max-turns 1
    4. D.claude -p "review this diff" --append-system-prompt "Reply only with a JSON object: {passed: boolean, issues: string[]}"
    Show answer & explanation

    Correct answer: A — claude -p "review this diff" --output-format json --json-schema '{"type":"object","properties":{"passed":{"type":"boolean"},"issues":{"type":"array","items":{"type":"string"}}},"required":["passed","issues"]}'

    • A. Correct. Combining --output-format json with --json-schema validates the model's structured output against the supplied schema and returns it in the structured_output field, giving a guaranteed machine-parseable shape.
    • B. --output-format json only wraps the run in a JSON envelope. Claude's answer still sits in the result field as free-form text, so passed and issues are not guaranteed to appear in a fixed shape.
    • C. stream-json with --verbose and partial messages emits a stream of turn-by-turn events for live display. Nothing in it validates or constrains the final answer to a passed/issues object, and the event stream is harder to parse.
    • D. Putting the JSON shape in the system prompt is only an instruction. Nothing validates the reply against a schema, so Claude can still add prose, drop a field or change a type, and the CI step cannot rely on the shape.

    Subdomain 3.2: Create and configure custom slash commands and skills

    20.A developer configured `allowed-tools: Write Edit` on a skill, expecting this to prevent Claude from ever calling Bash while the skill runs. During a session, Claude still calls Bash after asking for the user's approval. Why did this happen, and what should the developer configure instead to fully remove Bash from the available pool while the skill is active?

    1. A.`allowed-tools` is applied only after the skill finishes running, so it has no effect on Bash calls made during the run. Set `context: fork` so the skill runs in an isolated subagent that receives only the tools listed in the skill.
    2. B.`allowed-tools` needs wildcard patterns such as `Write*` and `Edit*` to work as a restriction, so bare tool names are not treated as a limit. Rewrite the entries on the skill with a trailing `*` so only those two tools can be called.
    3. C.`allowed-tools` only governs tools the user invokes directly, not tools Claude picks on its own during the run. Set `model: inherit` so the skill uses the session's model, which limits Claude's own tool choices to the listed tools.
    4. D.`allowed-tools` only grants the listed tools permission to run without a prompt and leaves the other tools callable. Add `disallowed-tools: Bash` to the skill so that Bash is taken out of the tools Claude can call during the run.
    Show answer & explanation

    Correct answer: D — `allowed-tools` only grants the listed tools permission to run without a prompt and leaves the other tools callable. Add `disallowed-tools: Bash` to the skill so that Bash is taken out of the tools Claude can call during the run.

    • A. Incorrect. `allowed-tools` takes effect while the skill is active, not only after it finishes, so timing is not why Bash stayed callable. The real cause is that the field pre-approves the listed tools and does not remove the others. `context: fork` changes where the skill runs but does not limit it to the listed tools, so Bash would still be available. `disallowed-tools: Bash` is what removes it.
    • B. Incorrect. Bare tool names in `allowed-tools` are valid, and adding a trailing `*` does not turn the field into an exclusive list. Wildcards only change which tool names a pattern matches. Bash stayed callable because the field pre-approves the listed tools without removing the rest. Taking Bash out of the pool needs `disallowed-tools: Bash`.
    • C. Incorrect. `allowed-tools` is not limited to tools the user invokes directly. It also covers the tools Claude chooses itself while the skill runs, and it pre-approves them rather than restricting them. `model: inherit` only selects which model the skill uses and has no effect on which tools are available. Removing Bash requires `disallowed-tools: Bash`.
    • D. Correct. `allowed-tools` lets the listed tools run without a permission prompt, but it does not take unlisted tools out of the pool. Bash therefore stayed callable and Claude could use it once the user approved. `disallowed-tools: Bash` removes Bash from the tools Claude can call while the skill is active.

    Subdomain 3.5: Apply iterative refinement techniques for progressive improvement

    21.A developer wants Claude Code to implement a rate limiter for an internal API and wants to reduce the number of correction cycles needed afterward. Which opening approach best follows a test-driven iteration pattern?

    1. A.Ask Claude to write tests for throttling behavior, burst limits, and window resets before the implementation, then build the limiter and share each failing test result to refine it.
    2. B.Ask Claude to build the limiter first, then write tests for throttling behavior, burst limits, and window resets, and share each failing test result back to refine the code before release.
    3. C.Ask Claude to build the limiter first, then exercise it by hand in the terminal with bursts, retries, and rate limit headers, and share each unexpected result back to refine the code.
    4. D.Ask Claude to draft a design document for throttle rules, burst limits, and reset windows first, then build the limiter and review the code against that document, refining it until it matches.
    Show answer & explanation

    Correct answer: A — Ask Claude to write tests for throttling behavior, burst limits, and window resets before the implementation, then build the limiter and share each failing test result to refine it.

    • A. Correct. Tests written before the code turn the expected throttling, burst and reset behavior into executable checks. Each failing result then gives Claude a precise target to correct, which is how a test-driven loop cuts the number of correction cycles.
    • B. Incorrect. Tests written after the limiter exists tend to encode whatever was built, including any misreading of the throttling or reset rules. The tests do not steer the implementation, so the loop is not test-driven and does not reduce the corrections needed during the build.
    • C. Incorrect. Hand-run terminal requests produce observations that must be re-run and re-judged by a person after every change. No automated tests exist to define expected behavior up front, so the loop is not test-driven and gives no repeatable pass/fail signal.
    • D. Incorrect. A design document is a prose specification that cannot be run, so checking the code against it depends on reading and judgment. It gives no executable failure to iterate on, which is what a test-driven pattern requires.

    Subdomain 3.5: Apply iterative refinement techniques for progressive improvement

    22.A product architect wants Claude Code to build a real-time collaborative document editor, a domain the architect has not built in before. Before any implementation starts, the architect wants to surface cache invalidation strategy, conflict resolution approach, and failure handling considerations that might not be obvious up front. What technique should the architect use?

    1. A.Give Claude a brief description of the feature and have it interview the architect with the AskUserQuestion tool about technical approach, edge cases and design tradeoffs, then write up the spec from the answers.
    2. B.Draft the full written specification yourself after researching how collaborative editors work, covering each design decision you can identify, then give it to Claude as a fixed set of instructions to implement.
    3. C.Have Claude build a minimal working collaborative editor first, then use the bugs and edge cases found in manual testing to decide the caching, conflict and failure design, revising the code as issues appear.
    4. D.Pick a mature, well-regarded open-source collaborative editor and have Claude replicate its architecture, then review the copied caching, conflict and failure patterns to decide which of them fit this product.
    Show answer & explanation

    Correct answer: A — Give Claude a brief description of the feature and have it interview the architect with the AskUserQuestion tool about technical approach, edge cases and design tradeoffs, then write up the spec from the answers.

    • A. Correct. Letting Claude interview the architect before a spec exists draws out technical choices, edge cases and tradeoffs the architect would not think to raise in an unfamiliar domain. Cache invalidation, conflict resolution and failure handling come up as questions while nothing has been built yet, and the answers feed the spec.
    • B. Incorrect. The architect has never built in this domain, so a self-written spec can only cover the decisions the architect already knows to look for. The gaps are the considerations that are not obvious up front, and fixing the spec as final instructions leaves no step where Claude probes for them. Research helps but does not replace a back-and-forth that exposes blind spots.
    • C. Incorrect. The architect wants these considerations surfaced before any implementation starts, and this plan builds the editor first. Testing a minimal build finds only the problems that happen to show up in manual use, and design issues such as conflict resolution or cache invalidation then come out as rework instead of upfront decisions.
    • D. Incorrect. Replicating another project's architecture starts implementation before the architect's own requirements have been examined. The copied caching, conflict and failure patterns were chosen for that project's constraints, so reviewing them does not draw out what matters for this product. Nothing in the process asks the architect about their own scenario.

    Subdomain 3.1: Configure CLAUDE.md files with appropriate hierarchy, scoping, and modular organization

    23.A team has used Claude Code for six months. Every long-time teammate reports that Claude consistently follows the team's commit message format and test-running conventions. A new engineer clones the repository fresh, and for them Claude ignores those conventions entirely. The CLAUDE.md file committed to the repository is present but empty, and the repository contains no other instruction files. What is the most likely reason the conventions reach the long-time teammates but not the new engineer?

    1. A.The rules sit in each teammate's personal ~/.claude/CLAUDE.md, outside the repository, so cloning never brings them to the new engineer's machine.
    2. B.Claude Code loads a project CLAUDE.md only once /init has run in the clone, so the new engineer's committed copy of the file stays unread.
    3. C.A .gitignore entry covers CLAUDE.md files, so the new engineer's clone never receives the project file and Claude Code starts with no repository rules.
    4. D.The project CLAUDE.md imports the rules with @-imports that need a one-time approval from each user, so the new engineer's session skips them.
    Show answer & explanation

    Correct answer: A — The rules sit in each teammate's personal ~/.claude/CLAUDE.md, outside the repository, so cloning never brings them to the new engineer's machine.

    • A. This is the most likely cause. The user-level `~/.claude/CLAUDE.md` holds personal preferences that apply only to that user, while the project CLAUDE.md is the file shared through version control. The committed project file is empty and the repository has no other instruction files, so the only place the rules can live for the long-time teammates is their own machines. Their sessions load those private files, git never distributes them, and the new engineer's sessions start without the rules.
    • B. Claude Code does not wait for `/init` before reading a project CLAUDE.md. It reads the file at the start of a session, and `/init` only generates a starter file. Even if the committed file were skipped, it is empty, so nothing would be lost. That cannot explain why the long-time teammates get the rules and the new engineer does not.
    • C. The scenario says the committed CLAUDE.md is present in the clone, so it was not excluded and did reach the new engineer's disk. The file is simply empty. A missing file would also leave the rules with the long-time teammates unexplained, because the repository itself holds none of them.
    • D. An approval step on imports would matter only if the project CLAUDE.md contained any. The committed file is empty, so there are no imports for anyone to approve or skip. The rules reaching the long-time teammates must therefore come from somewhere outside the repository.

    Domain 4: Prompt Engineering & Structured Output

    Subdomain 4.6: Design multi-instance and multi-pass review architectures

    24.Per-file passes on two interdependent files each recommend a different fix for what turns out to be the same underlying data-flow issue, and the two recommendations conflict. What architectural step should resolve this rather than picking one per-file recommendation at random?

    1. A.A separate cross-file integration pass that examines both files together and produces one recommendation based on the actual data flow
    2. B.Re-running each per-file pass a second time and keeping whichever recommendation is worded with higher confidence language
    3. C.Merging the two files into one before review so a single per-file pass can cover both without needing an integration step
    4. D.Asking the original generator to arbitrate between the two recommendations, since it has full context on why it wrote the code that way
    Show answer & explanation

    Correct answer: A — A separate cross-file integration pass that examines both files together and produces one recommendation based on the actual data flow

    • A. Correct. A cross-file integration pass is designed to resolve exactly this kind of conflict by examining how data flows between the interdependent files together, rather than in separate isolated passes.
    • B. Incorrect. Confidence-sounding wording doesn't reflect which recommendation actually accounts for the real cross-file data flow.
    • C. Incorrect. Merging files together is not the designed mechanism and doesn't generalize; the intended fix is a dedicated integration pass, not restructuring the files under review.
    • D. Incorrect. Letting the original generator arbitrate reintroduces the same retained-reasoning bias that independent review is meant to avoid.

    Subdomain 4.3: Enforce structured output using tool use and JSON schemas

    25.A team is building a pipeline that asks Claude to read free-form support tickets and return a JSON object with fields like priority, category, and summary. Early prototypes used a prompt asking Claude to "reply with only JSON", but downstream parsing occasionally failed on malformed brackets and stray commentary text. Which approach most reliably eliminates these JSON syntax failures?

    1. A.Define an extraction tool with an input_schema for the ticket fields, then read the arguments from its tool_use block instead of the text reply
    2. B.Prefill the assistant turn with an opening brace so the reply starts directly as an object, then parse the text Claude returns with a JSON parser
    3. C.Set temperature to 0 and raise max_tokens above the expected object size, then parse the text completion with a standard library JSON parser
    4. D.Ask Claude to put its reply inside <json> tags, then extract the tag contents with a regular expression and parse the extracted text
    Show answer & explanation

    Correct answer: A — Define an extraction tool with an input_schema for the ticket fields, then read the arguments from its tool_use block instead of the text reply

    • A. Correct. With a tool and an input_schema, Claude returns the fields as structured arguments in a tool_use block, so the application reads them directly. It no longer depends on Claude formatting free text as valid JSON, which removes the bracket and commentary failures.
    • B. A prefilled opening brace removes leading commentary, but the rest of the reply is still free text that Claude formats itself. Unbalanced brackets, trailing remarks or truncated output can still occur, so syntax failures are reduced rather than eliminated.
    • C. Temperature 0 makes output more consistent, and a larger max_tokens avoids truncation. Neither enforces a schema or valid syntax, so the reply can still contain malformed brackets or surrounding commentary that breaks parsing.
    • D. Tags make the JSON easier to locate, but they only delimit the text. The content between them is still free-form output that can contain malformed brackets or extra commentary, so the parser can still fail.

    Subdomain 4.4: Implement validation, retry, and feedback loops for extraction quality

    26.A security review assistant extracts structured findings from source code and developers frequently dismiss a large share of the findings tied to one particular helper function used for input sanitization. The team wants to analyze this dismissal trend systematically over time. What should be added to the structured finding schema to support this analysis?

    1. A.Add a detected_pattern field that names the code construct behind each finding, so dismissal rates can be compared per construct
    2. B.Add a dismissal_reason field with preset categories like false_positive or wont_fix, so dismissal rates can be compared per reason
    3. C.Add a confidence_score field that rates how certain the model is about each finding, so dismissal rates can be compared per score band
    4. D.Add a severity field that ranks the impact of each finding from low to critical, so dismissal rates can be compared per tier
    Show answer & explanation

    Correct answer: A — Add a detected_pattern field that names the code construct behind each finding, so dismissal rates can be compared per construct

    • A. Correct. Dismissals cluster around findings tied to one helper function, so each finding must record which code construct triggered it. A detected_pattern field gives a stable grouping key, so dismissal rates can be aggregated per construct over time and the noisy detection can be isolated.
    • B. Incorrect. Preset dismissal categories are structured, but they describe why a reviewer rejected a finding, not what produced it. Many constructs would share the same category, so the helper-function pattern cannot be separated out and tracked.
    • C. Incorrect. A confidence score reflects how certain the model is, and it is not tied to a particular construct. Bucketing dismissals by score band shows nothing about which helper function's findings are being rejected, so the trend stays unattributed.
    • D. Incorrect. Severity describes impact, so dismissals grouped by tier mix findings from many different constructs. The tier does not identify the sanitization helper that keeps triggering rejected findings, so the pattern-specific trend cannot be isolated.

    Subdomain 4.1: Design prompts with explicit criteria to improve precision and reduce false positives

    27.A team's automated PR-review prompt currently instructs Claude to "check that comments are accurate." The category produces a high volume of false positives on trivial phrasing nitpicks, and developers have started ignoring its output. An architect is rewriting the instruction to raise precision. Which replacement instruction best applies the principle of explicit criteria over vague instructions?

    1. A.Flag a comment only when you are highly confident it is wrong, such as one describing a method that appears to be missing from the codebase, and drop borderline cases rather than reporting them with a lower confidence rating.
    2. B.Flag a comment only when it departs from the team's style guide or leaves out detail a reader needs, such as a docstring with no description of its parameters, and propose a rewritten version that fixes the gap.
    3. C.Flag a comment only when the problem is significant enough to deserve developer attention, such as wording that could mislead a maintainer into introducing a bug, and skip minor differences in how things are phrased.
    4. D.Flag a comment only when it states a specific behavior that the code contradicts, such as a docstring saying a function returns None when the function returns a value on each path, and cite the line of code that conflicts with it.
    Show answer & explanation

    Correct answer: D — Flag a comment only when it states a specific behavior that the code contradicts, such as a docstring saying a function returns None when the function returns a value on each path, and cite the line of code that conflicts with it.

    • A. Incorrect. The filter is the model's own confidence that something is wrong, which is a self-assessed feeling and not a rule it can check against the code. 'Wrong' is never defined, so the model still decides case by case what counts, and the false positives that led developers to ignore the output persist.
    • B. Incorrect. Style-guide conformance and missing detail are the clarity and completeness concerns that produce phrasing nitpicks. They do not test whether a comment's claim is accurate. Adding them gives the reviewer more reasons to comment, so false positives rise instead of falling.
    • C. Incorrect. 'Significant enough to deserve attention' is a subjective judgment the model must make on its own, with no checkable condition behind it. It repeats the weakness of the original vague instruction and is likely to keep producing the same inconsistent flags that developers have learned to ignore.
    • D. Correct. It names a concrete, checkable condition: a specific behavioral claim in the comment that the code contradicts. The docstring example shows what qualifies, and citing the conflicting line makes each flag verifiable. This explicit criterion replaces the vague 'check that comments are accurate' and cuts false positives.

    Subdomain 4.1: Design prompts with explicit criteria to improve precision and reduce false positives

    28.After temporarily disabling a high false-positive "performance suggestions" category and rewriting its criteria with specific, checkable rules, an architect must decide when it is safe to re-enable the category for the whole team. What is the most appropriate validation step before re-enabling it broadly?

    1. A.Have two reviewers read the rewritten criteria alongside the category's earlier false-positive findings, and re-enable the category once each new rule looks specific and checkable enough to apply consistently.
    2. B.Re-enable the category for the engineer who reported the false positives and collect their feedback on the findings over the next two sprints, before extending it to the rest of the engineering team.
    3. C.Run the rewritten prompt against a held-out set of past pull requests with known findings, and measure its false-positive rate against the team's acceptable threshold before re-enabling the category.
    4. D.Re-enable the category for the whole team now and track how often developers dismiss its findings over the next few weeks, turning it off again if the false-positive rate rises above the acceptable level.
    Show answer & explanation

    Correct answer: C — Run the rewritten prompt against a held-out set of past pull requests with known findings, and measure its false-positive rate against the team's acceptable threshold before re-enabling the category.

    • A. Incorrect. Reading the rewritten criteria shows that they are worded precisely, but not how the model behaves when it applies them to real code. Rules that look checkable can still produce false positives, so a wording review gives no measured false-positive rate to base the re-enabling decision on.
    • B. Incorrect. This turns the category back on for a live user before any evidence exists that the rewrite works. One engineer's impressions over a couple of sprints are subjective and cover a narrow slice of the team's code. They give no measured false-positive rate, so the decision to extend it still rests on opinion.
    • C. Correct. Running the rewritten prompt on held-out historical pull requests with known findings measures the false-positive rate directly, without exposing developers to noisy output. Comparing that rate with the acceptable threshold gives objective evidence that the rewrite worked, before the category is re-enabled for the team.
    • D. Incorrect. Re-enabling for the whole team first and watching dismissals afterwards makes developers the test set. If the rewrite did not fix the precision problem, they see the same noise that led to disabling the category, which erodes trust further. The check has to happen before re-enabling, using historic data.

    Subdomain 4.2: Apply few-shot prompting to improve output consistency and quality

    29.An automated code reviewer flags many instances of a pattern (a broad except clause) as issues, but a large fraction of those flags are on lines where the pattern is intentional and acceptable, such as top-level error boundaries that log and re-raise. Reviewers are starting to ignore the tool's output because of the false-positive rate. What change would most directly reduce false positives while still catching genuine issues?

    1. A.Add to the reviewer prompt a flagged and a permitted use of the pattern, each labeled with its verdict
    2. B.Disable the broad except check for the files that produced the most flags, and keep it active elsewhere
    3. C.Instruct the reviewer to flag the pattern only in files where it appears more than three times in total
    4. D.Raise the confidence cutoff so the reviewer reports only its single highest-confidence finding in each file
    Show answer & explanation

    Correct answer: A — Add to the reviewer prompt a flagged and a permitted use of the pattern, each labeled with its verdict

    • A. Labeled examples of a problematic use and a permitted use show the reviewer where the line falls, for instance between a top-level boundary that logs and re-raises and a handler that swallows errors. The check stays on for every file, so false flags drop while real problems are still reported.
    • B. Turning the check off in the noisiest files only hides the symptom. Genuine swallowed errors in those files are no longer caught, and the intentional boundaries in the remaining files are still flagged, so the false-positive rate barely changes.
    • C. How often the pattern occurs in a file does not show whether a given use is intentional. A single swallowed exception would go unreported, while a file with several legitimate error boundaries would still be flagged. The reviewer still has no way to tell acceptable uses from problematic ones.
    • D. Raising the cutoff and keeping one finding per file hides real issues beyond the first. The surviving finding is not more likely to be a genuine problem, because an intentional error boundary can score just as high. This caps output volume without teaching the reviewer to separate acceptable uses from problematic ones.

    Subdomain 4.3: Enforce structured output using tool use and JSON schemas

    30.A developer calls Claude with an `extract_invoice` tool and `tool_choice` set to `{"type": "auto"}`, then runs `json.loads(response.content[0].text)`. It fails intermittently: sometimes the first content block is a sentence such as "I'll extract that now", and sometimes there is no `text` attribute at all. What is the correct way to retrieve the structured data?

    1. A.Run a regular expression over the text blocks of `response.content` to find the first JSON object, pass the match to `json.loads`, and return the parsed dict.
    2. B.Index the final block with `response.content[-1]`, read its `input` dict, and return that dict to the caller as the extracted invoice data.
    3. C.Add a system prompt line forbidding text before tool calls, then read `response.content[0].input` and return that dict to the caller as the invoice data.
    4. D.Loop over `response.content`, select the `tool_use` block named `extract_invoice`, read its `input` dict, and return it, raising an error when no such block exists.
    Show answer & explanation

    Correct answer: D — Loop over `response.content`, select the `tool_use` block named `extract_invoice`, read its `input` dict, and return it, raising an error when no such block exists.

    • A. With a tool call, the structured data is the already-parsed `input` of a `tool_use` block, not JSON text. Text blocks hold only a short preamble, so the regular expression finds nothing, and the `tool_use` block has no `text` attribute to search.
    • B. Block position is not a contract. Under `auto` the reply can be text only, in which case the last block has no `input`. Text can also follow the tool call, and multiple tool calls can occur, so the final index does not reliably point at the `extract_invoice` result.
    • C. A system prompt instruction does not make Claude call the tool under `auto`; it can still answer in plain text. The first block would then be a text block with no `input`, so reading index zero stays unreliable.
    • D. The result is the parsed `input` of the `tool_use` block for `extract_invoice`, so no JSON parsing is needed. Selecting by block type and name works wherever that block sits and whatever text precedes it. A text-only reply surfaces as an explicit error instead of a crash.

    Domain 5: Context Management & Reliability

    Subdomain 5.2: Design effective escalation and ambiguity resolution patterns

    31.A utility company customer needs a multi-step billing correction involving a meter re-read, a prorated credit, and a plan adjustment. Every step is explicitly detailed in the documented billing policy, and the agent has tools to execute each step. Should the agent escalate this case simply because it involves several steps?

    1. A.No, step count is not a trigger by itself, so the agent should resolve it directly when the policy covers each step
    2. B.Yes, several dependent steps raise the risk of error, so a supervisor should review the case before the agent acts
    3. C.Yes, the re-read result can change the credit amount, so a human should sign off before the agent applies it
    4. D.No, but the prorated credit changes the customer's balance, so a human should handle that step and the agent the rest
    Show answer & explanation

    Correct answer: A — No, step count is not a trigger by itself, so the agent should resolve it directly when the policy covers each step

    • A. Correct - the policy spells out the re-read, the prorated credit and the plan change, and the agent has tools for each. Having several steps is not an escalation trigger, so the agent completes the case itself.
    • B. Incorrect - the steps depend on each other, but the policy defines each one and the agent can run them in order. A chain of dependent steps is not a trigger that calls for supervisor review when the procedure is documented and executable.
    • C. Incorrect - the policy already defines how the prorated credit is calculated from the re-read result, and no sign-off requirement is stated. The credit depending on the re-read only fixes the order of the steps, so the agent applies it after the re-read.
    • D. Incorrect - it rejects escalating the whole case but still hands one step to a human. The policy covers the prorated credit and the agent has a tool for it, so changing a balance is not a reason to split the case when the policy covers that step.

    Subdomain 5.5: Design human review workflows and confidence calibration

    32.A logistics company's bill-of-lading extraction pipeline shows 94% field accuracy in aggregate. A new architect discovers that the 'weight' field is correct only 70% of the time specifically when the source document's units are ambiguous (for example, a number with no unit label present). All other conditions for the weight field exceed 95%. What review policy should be applied to the weight field going forward?

    1. A.Send weight values to a human reviewer when the document gives no clear unit, and let weights with a clearly stated unit continue to the output without review.
    2. B.Review a fixed random sample of weight values across the whole pipeline, sized to the overall 94% accuracy, and treat documents with missing units like the rest.
    3. C.Move weight extraction to manual entry by staff for the full set of bills of lading, and stop using the model for that field whether or not a unit is given.
    4. D.Add a prompt rule that assigns the most common unit from past documents to a bare weight number, and release those values to the output without a reviewer.
    Show answer & explanation

    Correct answer: A — Send weight values to a human reviewer when the document gives no clear unit, and let weights with a clearly stated unit continue to the output without review.

    • A. Correct. The errors come from one identifiable condition, a missing or unclear unit. Sending only those documents to a person puts review effort where accuracy is 70%. Clearly labelled weights already exceed 95% and can continue without review.
    • B. Incorrect. A uniform random sample spreads review thinly over documents that are already accurate. Most of the unit-ambiguous weights, which are only 70% correct, would still reach the output unchecked. The 94% aggregate hides that weak segment.
    • C. Incorrect. Weights with a clear unit are already correct more than 95% of the time. Manual entry for the whole set discards that performance and spends staff time where it is not needed. The problem is limited to documents with ambiguous units.
    • D. Incorrect. When no unit label is present, the document does not contain the information needed to know the unit. A default unit is a guess, so it would be wrong whenever the true unit differs. Releasing those values without a reviewer leaves the 70% failure uncaught.

    Subdomain 5.5: Design human review workflows and confidence calibration

    33.A legal-document review pipeline processes contracts where, in some cases, two clauses on different pages state contradictory terms for the same provision (for example, differing renewal notice periods). The model extracts a single value for the field without flagging the contradiction. What review-routing behavior should the team implement for this scenario?

    1. A.Send an extraction to human review when the document gives different values for the same field, whatever confidence the model reports for the single value it picked.
    2. B.Send an extraction to human review when the model's confidence score falls below a tuned threshold, and let higher-scoring values go straight to the final output.
    3. C.Run a second, independent extraction pass with a reworded prompt, and send the field to human review when the two passes return different values for that field.
    4. D.Have the pipeline keep the value from the earlier page as the controlling clause, and send the field to human review if that clause is missing or unreadable.
    Show answer & explanation

    Correct answer: A — Send an extraction to human review when the document gives different values for the same field, whatever confidence the model reports for the single value it picked.

    • A. Correct. Contradictory source text is a separate risk signal from low model confidence. A model can report high confidence in one value while silently choosing between two clauses, so these fields need a human to decide which term is binding.
    • B. Incorrect. A confidence score reflects how certain the model is about the value it output, not whether the source was consistent. The model here already extracts one value without noticing the contradiction, so its score can be high and the field would pass through unreviewed.
    • C. Incorrect. Disagreement between runs measures the model's own variability, not contradictions in the source. A model that favours one of the two clauses will usually return the same value on both passes, so the contradiction stays hidden and the field is never routed.
    • D. Incorrect. Contract interpretation has no general rule that an earlier clause overrides a later one. Deciding which of two contradictory terms binds takes legal judgment, and a positional rule would settle it silently, so the field would only reach review if the clause were missing.

    Subdomain 5.6: Preserve information provenance and handle uncertainty in multi-source synthesis

    34.An architect is choosing between Claude's citations feature and having subagents manually append plain-text bibliographies to their outputs, for a multi-source synthesis pipeline that must let end users click through to the exact passage supporting each generated statement. Which factor most favors using the citations feature?

    1. A.Citations tie individual claims in the output to character or page ranges in the supplied documents, so readers can open the quoted source text
    2. B.Citations let the model retrieve relevant passages from the source set itself, so subagents can skip reading the documents before synthesis
    3. C.Citations compare figures across the cited sources and reconcile conflicting statistics, so the final answer states one consistent value
    4. D.Citations record the publication date of each cited source beside the statement, so the pipeline needs no separate date-tracking step
    Show answer & explanation

    Correct answer: A — Citations tie individual claims in the output to character or page ranges in the supplied documents, so readers can open the quoted source text

    • A. Correct. The citations feature returns the exact quoted text and its location (character, page or block range) in the supplied documents for individual claims. That gives users a verifiable, passage-level link, which a general list of sources cannot give.
    • B. Citations only reference documents that are already supplied in the request; they do not search the source set. Subagents must still read and process the documents, so this offers no benefit for passage-level traceability.
    • C. Citations attribute claims to source passages and do not compare or reconcile figures between sources. Conflicting statistics must still be resolved by the pipeline's own logic, and this does nothing to let users click through to supporting passages.
    • D. Citations return the quoted text and its location in the document, not publication dates. Dates must still be captured separately, and date metadata would not provide the passage-level link users need.

    Subdomain 5.3: Implement error propagation strategies across multi-agent systems

    35.A coordinator dispatches a pricing-lookup subagent against an internal catalog API. The subagent's HTTP call hangs and exceeds its timeout budget before any response arrives. A separate subagent queries the same catalog for a discontinued SKU and receives a 200 response with zero matching rows. How should the two outcomes be reported to the coordinator?

    1. A.Report the timeout as a retryable access failure, and the zero-row 200 as a valid empty result that needs no retry
    2. B.Report both as valid empty results, adding a note about the timeout, so neither outcome triggers a retry from the coordinator
    3. C.Report both as retryable access failures, so the coordinator re-queries the discontinued SKU and the timed-out lookup
    4. D.Report the timeout as a valid empty result, and the zero-row 200 as a retryable access failure that needs a new query
    Show answer & explanation

    Correct answer: A — Report the timeout as a retryable access failure, and the zero-row 200 as a valid empty result that needs no retry

    • A. The hung call never received a response, so the catalog's answer is unknown and a retry may succeed. That makes it a transient access failure. The 200 with zero rows is a real answer: the discontinued SKU has no matching records. It is a valid empty result, and repeating the query would return the same thing.
    • B. A timeout is not an answer from the catalog. Reporting it as a valid empty result tells the coordinator the pricing lookup completed and found nothing, so it would not retry a call that never finished. A note in the message does not fix this, because the failure type is what drives the coordinator's recovery.
    • C. Only the timeout is an access failure worth retrying. The zero-row 200 shows the catalog was reached and answered that the discontinued SKU has no records, so re-querying it gives the same empty result and wastes calls.
    • D. This swaps the two classifications. The timeout means no response was received and the outcome is unknown, so it is a retryable access failure. The zero-row 200 is a completed, successful lookup with an empty result, so a new query for it is unnecessary.

    Want the full experience?

    These are just samples. Practice the full Anthropic Claude Certified Architect – Foundations (CCAR-F) question bank in quiz mode — free, no signup, with domain practice and exam simulation.