Claude Certified Architect – Foundations

CCAR-F mock exam

Our own scenario-based items, written to the published exam guide. They are not real exam questions.

full mock

60items per sitting, from a bank of 288
120 mintime limit when timed
4 of 6scenarios drawn at random, each with its own items

Readiness gauge only. The real exam reports a scaled score (pass at 720 on a 100–1,000 scale); percent-correct here does not convert to it. Aim for 75%+ in every domain.

practice by scenario

practice by domain

sample questions

10 items from the mock bank, one per scenario first. Open an item to see the answer and why.

  1. The team's prototype loop calls the Messages API directly with tool_choice {"type": "auto"}. One billing chat logged eight requests, each showing messages: 1 and ending stop_reason: "tool_use" for get_customer {"email": "d.okafor@example.com"}. Every result was {"customer_id": "C-20931", "verified": true}, without isError. Then the loop hit its cap.

    What is the most likely root cause?

    1. get_customer's description never says a verified result is final, so the model re-checks the customer's identity on every turn.
    2. tool_choice is forcing a get_customer call on every request, so the model is never allowed to move on to lookup_order.
    3. The loop never appends the tool_use turn and its tool_result to messages, so every request reaches the model as a first turn.
    4. get_customer is reporting its results as tool errors, so the model keeps retrying the verification until the loop's cap finally stops it.
    Show the answer

    Answer: C.

    Correct: history never appended. The log shows messages: 1 on every request, so the model never saw its own tool call or the verified result, and it made the same first move eight times. The loop must append the assistant turn and a matching tool_result before the next request. Why not the others: thin description — a real cause of misrouting, but no description helps when the result never enters the conversation; forced tool_choice — the config shows "auto"; tool errors — every result came back verified and without isError. The message count is the decisive evidence.

  2. Since the move to pnpm, Claude runs pnpm --filter api test for the tech lead but npm test for the other five engineers. On the lead's machine, /memory lists ./CLAUDE.md, ./CLAUDE.local.md and ~/.claude/CLAUDE.md, and the pnpm rule sits in ./CLAUDE.local.md. The repository's .gitignore lists CLAUDE.local.md.

    What is the most likely root cause?

    1. The rule sits in a personal project file that .gitignore keeps out of version control, so other clones lack it.
    2. The rule sits in the lead's user-level CLAUDE.md, which applies across all of that engineer's projects but is never shared.
    3. The root CLAUDE.md imports the rule through a relative path that resolves only from the lead's working directory.
    4. The other engineers launch Claude inside packages/api, so files at the repository root above that directory never load.
    Show the answer

    Answer: A.

    Correct: gitignored local file. /memory places the rule in CLAUDE.local.md, a personal per-project file, and .gitignore keeps it out of every other clone. Moving the rule into the committed CLAUDE.md fixes it for all six engineers. Why not the others: user-level CLAUDE.md — produces the same symptom, but the listing puts the rule in the second file, not ~/.claude/CLAUDE.md; relative import — imports resolve from the importing file, and nothing in the evidence involves an import; launching inside packages/api — CLAUDE.md files in every directory above the working directory load at launch.

  3. The coordinator's loop is for i in range(8): call the model, run any Task calls, append the results. Reports on broad topics lack whole sections. In 31 of 40 such runs, the last logged response ended with stop_reason: "tool_use" and two Task calls that were never executed; the coordinator's text so far then went to report generation.

    What is the most likely root cause?

    1. The coordinator decomposes broad topics too narrowly, so the subagents it delegates to never receive the missing sections.
    2. The web search subagent returns too few sources on broad topics, so synthesis has nothing to write the missing sections from.
    3. The loop stops at a fixed iteration count instead of on stop_reason, so runs end while the coordinator is still delegating.
    4. The synthesis subagent drops findings that arrive late in its input, so sections researched last never reach the report.
    Show the answer

    Answer: C.

    Correct: iteration cap as the stopping rule. The last logged response still ended with stop_reason "tool_use" and carried two unexecuted Task calls, so the coordinator had not finished; the range(8) loop cut it off. The loop should continue while stop_reason is "tool_use" and end on "end_turn", with any cap only as a safety net. Why not the others: narrow decomposition — a real cause of missing coverage, but the Task calls for the missing work existed and were never run; too few sources — nothing shows thin search results; late findings dropped — the subagents for those sections were never invoked. The pending Task calls decide it.

  4. An engineer asks the agent to add a currency field to 14 legacy invoice serializers. The run stops after 9 files with no summary. The ResultMessage shows subtype "error_max_turns" and num_turns 20; the query sets maxTurns: 20 "to be safe". No hook denied a call, and no compact_boundary message appears.

    What is the most likely root cause?

    1. Automatic compaction dropped the list of remaining serializers, so the agent lost track of the files it still had to change.
    2. A PreToolUse hook blocked an Edit on the tenth serializer, and the agent ended the run instead of trying another approach.
    3. The turn cap, set as the run's main stopping rule, ended the loop before the agent produced a response without tool calls.
    4. The agent judged the task complete after nine files and ended its turn, so end_turn arrived before the other five serializers were done.
    Show the answer

    Answer: C.

    Correct: turn cap as the stopping rule. error_max_turns means the loop hit maxTurns before Claude returned a response with no tool calls, which is how the loop normally ends. A cap is a safety net; used as the main stop, it cuts real work short. Raise it or cap spend instead, and resume the session to finish. Why not the others: automatic compaction — a real cause of lost state, but no compact_boundary message appeared; hook blocking an Edit — no denial was logged; judged complete — a normal finish reports subtype success, not a turn-limit error. The result subtype decides it.

  5. The review step runs claude -p with --output-format json and --json-schema set to the findings schema. The posting script pipes the output through jq '.result' and then JSON.parse, which fails on every run with "Unexpected token T". The logged value begins "The diff introduces two issues…".

    What is the most likely root cause?

    1. The --json-schema value is not a valid schema, so Claude Code ignores it and returns the review as unstructured prose.
    2. The script reads the result field, which holds the response text, while the validated findings sit in structured_output.
    3. The final message ran past the output token limit, so the findings JSON was cut off partway through the text.
    4. The prompt never tells Claude to answer in JSON, so the model wrote prose even though a schema was supplied.
    Show the answer

    Answer: B.

    Correct: reading the wrong field. With --output-format json, result always holds the response text; when --json-schema is set, the schema-validated object is returned in structured_output. The script is parsing prose. Why not the others: invalid schema — current Claude Code exits with an error at startup on an invalid schema instead of falling back to prose; truncation — would leave partial JSON, but the logged value is prose from its first word; prompt wording — the schema, not the prompt, shapes structured_output, and result stays text either way. The jq path decides it.

  6. Invoices and contracts run through a fixed chain: classify, extract, validate, normalise. The team is adding supplier-dispute emails. What each one needs depends on its content: some cite an invoice number, some a contract clause, some both, and a few point to earlier emails that must be fetched first.

    Which design best handles dispute emails while preserving the predictable chain for invoices and contracts?

    1. Route dispute emails to an adaptive step that plans lookups from what each email references, keeping the fixed chain for the rest.
    2. Replace the fixed chain with one adaptive agent for every document type, so invoices, contracts and dispute emails all share one design.
    3. Add a fixed stage for dispute emails that always fetches the cited invoice and the cited contract before extraction runs.
    4. Add few-shot dispute emails to the extraction prompt, so the existing chain extracts their fields in its single extraction pass.
    Show the answer

    Answer: A.

    Correct: adaptive step for disputes only. Prompt chaining suits predictable, multi-aspect work such as invoices and contracts. Dispute emails are open-ended: what to fetch next depends on what each email references, so their subtasks should be generated from intermediate findings. Why not the others: one adaptive agent for everything — would handle disputes, but gives up the predictable chain the stem asks to keep; fixed fetch stage — assumes every dispute cites exactly one invoice and one contract, and misses earlier emails; few-shot dispute emails — improve field extraction but cannot fetch the documents an email points to. "Preserving the predictable chain" decided it.

  7. A PreToolUse hook denies process_refund above $500 with permissionDecision "deny" and no reason. Of 40 denied sessions last week, 31 ended with the agent telling the customer the refund "could not be processed"; only 9 reached escalate_to_human. Human agents cannot see the conversation transcript.

    Which change most directly gets these customers to a human with a usable handoff?

    1. Add a permissionDecisionReason stating that refunds over $500 go through escalate_to_human with the customer ID, amount, root cause and recommended action.
    2. Have the hook call the escalation backend itself with the refund's tool input, so every denied refund is queued for a human automatically.
    3. Return continue: false alongside the denial, so the session stops before the agent can tell the customer something inaccurate.
    4. Return updatedInput capping the amount at $500 with permissionDecision "allow", and let the agent escalate the remaining balance.
    Show the answer

    Answer: A.

    Correct: deny with a reason. The hook already guarantees the block; what is missing is the redirect. permissionDecisionReason reaches the model with the denial, so the agent learns why and which workflow comes next, and it can compile the summary a human without the transcript needs. Why not the others: hook queues the escalation — would route every case deterministically, but the human receives only an order ID and an amount, and the customer still hears "could not be processed"; continue: false — stops the agent, leaving no reply and no handoff; capping via updatedInput — issues a refund the customer never agreed to. "Usable handoff" decided it.

  8. packages/api/CLAUDE.md contains the line @docs/standards/http-errors.md, meant to pull in the repository-root file docs/standards/http-errors.md. Engineers start Claude sometimes at the repository root and sometimes inside packages/api. In neither case does Claude follow the error-format standard, and it says it has never seen that file.

    Which import line loads the standard wherever Claude is started?

    1. @./docs/standards/http-errors.md, because a ./ prefix anchors an import path at the repository root.
    2. @../../docs/standards/http-errors.md, because a relative import resolves from the directory of the file containing it.
    3. @docs/standards/http-errors.md unchanged, because the import resolves from the directory where Claude was started.
    4. @/docs/standards/http-errors.md, because a leading slash anchors an import path at the top of the git repository.
    Show the answer

    Answer: B.

    Correct: the ../../ relative path. Relative imports resolve from the file that contains them, so from packages/api/CLAUDE.md the path must climb two levels to reach the root docs folder; that is also why the original line failed from both start points. Why not the others: ./ prefix — still resolves from packages/api; unchanged line — the working directory plays no part, which is why starting at the root did not help; leading slash — an absolute filesystem path, pointing at /docs on the machine rather than the repository. "Wherever Claude is started" decided it.

  9. About 1 report in 25 reaches readers cut off mid-sentence. The coordinator's loop runs while stop_reason == "tool_use" and treats any other stop_reason as a finished report. Logs for the truncated reports show stop_reason: "max_tokens". The loop's tool handling works and must stay as it is.

    Which change most directly stops truncated reports from reaching readers while preserving the existing tool loop?

    1. Branch on the final stop_reason: deliver on "end_turn", and on "max_tokens" continue the response or retry with a higher limit.
    2. Raise max_tokens on the coordinator's requests, so that long reports fit within the limit and are cut off far less often.
    3. Instruct the coordinator to keep every report under 3,000 words, so that its final response always ends before the token limit.
    4. Check that the report's last character is a full stop, and rerun the whole research workflow whenever that check fails.
    Show the answer

    Answer: A.

    Correct: branch on stop_reason. The loop treats every stop other than "tool_use" as completion, so a "max_tokens" response ships as if it were finished. Treating "end_turn" as the only delivery signal, and continuing or retrying on "max_tokens", stops truncation at its source without touching tool handling. Why not the others: raise max_tokens — would cut how often it happens, but a longer report can still hit the new limit and ship truncated; word limit — a prompt instruction the model may overrun, and it shortens every report; full-stop check — parses output text instead of the API's signal, and reruns everything. "Most directly" decided it.

  10. An engineer asks the agent to "document everything that changes an invoice total". The coordinator's log shows three subtasks: "line-item pricing in billing/pricing", "tax rules in billing/tax" and "discount codes in billing/promo". Each subagent's report is accurate. The finished document omits the nightly proration job in jobs/ and the credit-note adjustments in ledger/.

    What is the most likely root cause?

    1. The coordinator's decomposition covered only three billing directories, so no subagent was ever assigned the jobs/ or ledger/ code.
    2. The subagents' Grep patterns were too narrow to find invoice-total writes that live outside their assigned billing directories.
    3. The synthesis step lacks an instruction to check its draft against the codebase for areas the three reports never mention.
    4. The subagents' context windows filled with pricing and tax code, so their later reads of jobs/ and ledger/ were compacted away.
    Show the answer

    Answer: A.

    Correct: decomposition too narrow. The log shows the problem directly: all three subtasks point into billing/, and nothing assigned the proration job or the credit-note code. The subagents did what they were given. Why not the others: narrow Grep patterns — searches can miss things, but these subagents were never scoped to jobs/ or ledger/; a synthesis gap check — a useful safeguard that might catch the hole, but it acts downstream of the cause; compacted reads — no subagent was assigned those directories to read. The coordinator's subtask list decides it. Adapted from the exam guide's sample question 7.