CCAR-F sample questions with answers
10 questions from the Claude Certified Architect – Foundations practice bank, spread across its domains. Pick your answer, then open the explanation to see why each option is right or wrong.
- Question 1Agentic Architecture & Orchestration
A developer-productivity agent analysed 40 files of a payments service on Monday in a named session. Overnight a teammate merged a change touching three of those files (
ledger.py,fees.py,tests/test_fees.py); the other 37 are unchanged. On Tuesday the developer wants the agent to continue implementing the refactor it proposed. What is the best way to pick the work up?- A
Resume the session and continue as if nothing changed; the agent will re-read any file it needs when it opens it for editing.
- B
Resume the session, name the three changed files, and ask the agent to re-read them before continuing.
- C
Start a fresh session and have the agent re-explore all 40 files from scratch.
- D
Fork the session so the stale file contents stay in the original and the fork starts clean.
Show the answer and explanation
Answer: B
Sessions persist the conversation, not the filesystem, so a resumed agent believes its earlier tool results are current. When only a few analysed files changed, resume and explicitly tell the agent which files to re-read; reserve a fresh session for when most of the prior results are stale.
Why the other options are wrong
A. The agent's context still contains Monday's versions of the three files and it has no reason to suspect they are stale, so it may edit against outdated code.
C. Full re-exploration discards a mostly valid analysis to refresh 3 of 40 files; it is the expensive option for a small change.
D. A fork copies the same history, stale tool results included; branching does not refresh anything.
- A
- Question 2Claude Code Configuration & Workflows
An engineer with no caching experience asks Claude Code to add a read-through cache in front of the product catalogue service. The first implementation works, but over the next week the team discovers stale prices after catalogue updates, a thundering-herd problem when a hot key expires, and no story for cache failure. Each discovery triggers another round of rework. What should the engineer have done at the start?
- A
Have Claude interview him about invalidation, expiry and failure modes first, then write a spec.
- B
Write a longer initial prompt listing every caching requirement he could think of, including TTLs and the catalogue update flow, before asking for the implementation.
- C
Enter plan mode so Claude explores the catalogue service and its call sites before implementing the cache.
- D
Implement first and rely on production monitoring to reveal the missing cases.
Show the answer and explanation
Answer: A
The interview pattern has Claude ask questions to surface design considerations the developer may not have anticipated (cache invalidation, stampedes, failure modes) before implementing in an unfamiliar domain. The answers become a spec, which then drives implementation and avoids the repeated discovery-and-rework cycle.
Why the other options are wrong
B. He could not list invalidation or stampede handling because he did not know about them; a longer prompt from the same knowledge has the same gaps.
C. Plan mode explores the codebase and proposes changes; it does not by itself elicit the domain requirements (invalidation strategy, failure behaviour) that were missing.
D. That is the rework loop the team is already stuck in; discovering design gaps in production is the most expensive way to learn them.
- A
- Question 3Prompt Engineering & Structured Output
An automated reviewer keeps flagging the team's sanctioned patterns as bugs: the repository's
retry_with_backoffwrapper is reported as "swallowing exceptions", and deliberate# noqasuppressions are reported as lint violations. The team added explicit skip rules for both, but each week a new sanctioned variant (a different wrapper, a different suppression comment) gets flagged. Which change best reduces false positives while still catching genuine issues?- A
Maintain a growing allowlist of file paths, function names and comment markers that the reviewer must never comment on, updated by the team each time a new sanctioned variant is flagged.
- B
Add paired examples: a sanctioned pattern that looks like a bug, annotated as acceptable and why, beside a similar-looking genuine issue annotated as a real finding and why.
- C
Require two independent review runs to agree before a finding is posted.
- D
Remove the bug category entirely and let the reviewer comment only on security.
Show the answer and explanation
Answer: B
Explicit skip rules only cover the cases they name. When variants keep appearing, few-shot examples that contrast acceptable patterns with similar-looking genuine issues, each with its reasoning, let the model generalise the distinction and reduce false positives without losing recall.
Why the other options are wrong
A. An allowlist by name cannot keep up with new variants and also hides real bugs inside those files; it does not teach the model the distinction being drawn.
C. Both runs share the same misunderstanding of the team's conventions, so they will agree on the false positive; consensus also suppresses real findings that are only caught intermittently.
D. Dropping a valuable category to avoid tuning it sacrifices real findings; the issue is a missing distinction, not an unfixable category.
- A
- Question 4Tool Design & MCP Integration
An agent must change
return null;toreturn defaultHeader();inside theparseHeaderfunction only. Its Edit call fails: theold_stringreturn null;appears four times in the file, because four generated handlers share 30 lines of byte-identical body and differ only in their signature line. The agent must make exactly one change reliably. What should it do?- A
Read the whole file, then Write it back with only the
parseHeaderoccurrence changed. - B
Retry Edit with
replace_all: true. - C
Run
sed -i '58s/return null;/return defaultHeader();/'via Bash, estimating the line number from the earlier error. - D
Retry the identical Edit call; the match may succeed on the second attempt.
Show the answer and explanation
Answer: A
Edit performs targeted modifications by exact, unique text matching. When the anchor is not unique and cannot practically be made unique, the reliable fallback is Read (load the full file) followed by Write (write the full modified file). replace_all is only right when every occurrence should change.
Why the other options are wrong
B. replace_all changes all four occurrences, altering three handlers that must stay as they are.
C. Guessing a line number without reading the file is fragile and, if wrong, silently edits a different handler.
D. Edit's uniqueness check is deterministic; the same anchor will fail the same way every time.
- A
- Question 5Context Management & Reliability
The web-search subagent returns
results: []both when its search API times out and when a query genuinely matches nothing. The coordinator therefore retries every empty response up to three times, which wastes budget on legitimate no-match queries and sometimes gives up on queries that only needed one retry. What is the right fix?- A
Have the coordinator treat any empty result as final and never retry.
- B
Increase the coordinator's retry count to five so transient failures are more likely to be covered.
- C
Report the two cases differently: an access failure (with failure type and retry advice) versus a successful query with zero matches.
- D
Have the subagent automatically broaden the query whenever it gets an empty result, dropping terms until something is returned, so the coordinator always receives at least one match.
Show the answer and explanation
Answer: C
An access failure and a valid empty result look identical if both are reported as "no results". Error reporting must separate them so the coordinator can retry the former and accept the latter.
Why the other options are wrong
A. This makes transient timeouts look like genuine gaps, so the report silently loses coverage whenever the API hiccups.
B. More retries on every empty result multiplies the waste on legitimate no-match queries and still does not tell the coordinator which case it is in.
D. Silently widening the query changes what was asked and can return irrelevant matches as if they answered the original question, hiding both failures and genuine gaps.
- A
- Question 6Agentic Architecture & Orchestration
A research coordinator receives the synthesis subagent's draft, notices that two of the five subtopics it planned have no supporting findings, and currently responds by re-invoking synthesis with "be more thorough". Reports still ship with the gaps, and each retry adds 20 seconds. What should the coordinator do instead when it detects insufficient coverage?
- A
Give the synthesis subagent the web-search tools so it can fill gaps itself without returning control to the coordinator, saving a round trip per gap.
- B
Have the report subagent add a disclaimer listing the subtopics that were not covered.
- C
Re-invoke synthesis with a higher reasoning-effort setting and a longer output budget.
- D
Identify the missing subtopics, re-delegate targeted queries to search and analysis, then re-run synthesis, bounded by a round limit.
Show the answer and explanation
Answer: D
The coordinator should evaluate the synthesis output against explicit coverage criteria, re-delegate targeted queries to the search and analysis subagents for the gaps, and re-run synthesis until coverage is sufficient, bounded by a round limit.
Why the other options are wrong
A. Moving open-ended research into synthesis removes the coordinator's control over scope and partitioning and hides the extra searches from its traces.
B. Disclosing gaps is better than hiding them, but it accepts an incomplete report when the system can still close the gaps with targeted re-delegation.
C. Synthesis can only combine what it was given; no amount of effort creates findings for subtopics that were never researched.
- A
- Question 7Claude Code Configuration & Workflows
A data migration script written by Claude Code processes 38 of 40 sample rows correctly. Three rounds of "handle edge cases better" have not fixed the remaining two, which the engineer has now inspected: one has a
nullmiddle_nameand the other storespostal_codeas an integer instead of a string. What is the most effective next message?- A
"IMPORTANT: the script must handle ALL edge cases in the data without failing on any row."
- B
"Wrap the row loop in a try/except that logs and skips any row that raises, so the migration completes and the two rows can be handled by hand afterwards."
- C
Provide the two failing rows as test cases with the exact expected output for each.
- D
Switch to a larger model and repeat the previous request, since the bigger model handles edge cases better.
Show the answer and explanation
Answer: C
When a vague instruction fails to fix an edge case after a round or two, replace it with concrete test cases: the failing input and the expected output. That gives Claude a precise, checkable goal for cases such as null values or wrong types, whereas emphasis, blanket exception handling or a model swap leaves the requirement undefined.
Why the other options are wrong
A. This is the same vague instruction with emphasis; it still does not tell Claude which inputs fail or what the correct output is.
B. Skipping bad rows hides the failures and silently drops two customers from the migration instead of handling them correctly.
D. The problem is under-specified feedback, not model capability; a different model given the same vague prompt has the same information gap.
- A
- Question 8Prompt Engineering & Structured Output
Developers dismiss about 40% of an automated reviewer's findings, but the team cannot tell which kinds of code trigger the bad ones: findings are stored as free text and dismissals as a single click. They want to improve the prompt systematically rather than by anecdote. What should they add?
- A
A mandatory free-text reason from the developer on every dismissal.
- B
A
detected_patternfield in each finding naming the code construct that triggered it, so dismissal rates can be grouped per pattern. - C
A self-reported
confidencescore on each finding, then drop findings below the median so that developers only see the half the reviewer is surest about. - D
Full prompt and response logging so an engineer can read the dismissed cases each week.
Show the answer and explanation
Answer: B
Feedback loops need structured signals. Adding a
detected_patternfield to each finding lets the team correlate dismissals with the constructs that produced them and then rewrite the specific criteria responsible, instead of guessing from individual complaints.Why the other options are wrong
A. Free-text reasons are inconsistent, hard to aggregate, and add friction; the pattern data should come from the reviewer's own structured output.
C. Confidence filtering hides findings without explaining them; it does not reveal which constructs the reviewer misjudges.
D. Raw logs are necessary but not sufficient; without a structured pattern label, analysis stays manual and anecdotal.
- A
- Question 9Tool Design & MCP Integration
A developer-productivity system has a code-exploration subagent (Read, Grep, Glob, Bash) and a boilerplate-generation subagent (Read, Write, Edit). Tracing shows the generation agent needs to look up an existing type or function definition in 85% of tasks; today it returns to the coordinator, which dispatches the exploration agent and re-invokes generation, adding two round trips per task. The remaining 15% of lookups are open-ended investigations across many files. What is the best way to cut the overhead without weakening the separation of roles?
- A
Give the generation agent the exploration agent's full tool set, including Bash, so it can investigate anything itself.
- B
Have the exploration agent pre-collect every definition in the repository into the generation agent's prompt before each task.
- C
Have the generation agent batch all of its lookups and return them to the coordinator at the end of its pass.
- D
Give the generation agent a scoped, read-only
find_symbol_definition(name)tool for the common lookup, and keep routing open-ended investigations through the coordinator to the exploration agent.
Show the answer and explanation
Answer: D
Scoped tool access allows limited cross-role tools for specific high-frequency needs. A narrow read-only lookup gives the generation agent what it needs most of the time without handing it the exploration agent's full capabilities; the rare complex cases still go through the coordinator.
Why the other options are wrong
A. Over-provisioning the generation agent with Bash and unrestricted search is the cross-specialisation misuse the design is meant to prevent, and it makes the agent's tool set larger and less reliable.
B. Speculative pre-loading cannot predict which definitions will be needed and bloats the generation agent's context on every run.
C. Later boilerplate often depends on an earlier lookup, so deferring lookups to the end blocks the work rather than shortening it.
- A
- Question 10Context Management & Reliability
A codebase-exploration agent works in two phases: phase 1 maps the service boundaries of a 30-module system; phase 2 spawns one subagent per module to trace its data flow. Logs show phase-2 subagents spend most of their budget rediscovering the boundaries and naming conventions that phase 1 already established. Which two changes fix this? (Choose two.)
Choose 2.
- A
Pass the complete phase-1 transcript, including all tool output, into each phase-2 subagent's initial prompt.
- B
Summarise phase-1's key findings (module boundaries, entry points, conventions) before spawning phase 2, and inject that summary into each subagent's initial context.
- C
Rely on the subagents inheriting the main agent's conversation automatically when they are spawned.
- D
Raise each subagent's turn limit so it has enough budget to redo the discovery.
- E
Have each phase write its findings to scratchpad files in a known location that later phases and subagents read and update.
Show the answer and explanation
Answer: B and E
Between exploration phases, summarise what was learned and inject it into the next phase's initial context, and persist findings to scratchpad files. Subagents do not inherit the parent's context, and raw transcripts are too noisy to pass wholesale.
Why the other options are wrong
A. The raw transcript is mostly discovery noise; 30 copies of it consume budget and reintroduce the lost-in-the-middle problem in each subagent.
C. Subagents start with a fresh, isolated context; they do not see the parent conversation unless the relevant information is explicitly passed to them.
D. This pays for the duplicated work 30 times over rather than eliminating it.
- A
Practise all 192 CCAR-F questions
Start with the free 15-question diagnostic. It shows where to focus, and your results carry over if you sign up.