Practice exam 1 (30 questions)
Thirty original questions, five per scenario, written in the style of the official samples. Allow 60 minutes. Choose one answer unless the question says otherwise. These are not real exam items. Answers and rationales follow.
Scenario 1: Customer Support Resolution Agent
- 1. In about 5% of cases the agent calls process_refund without first confirming the order is inside the 30-day return window. Policy says this must never happen. What is the most effective fix?
- A. Add a bold "ALWAYS check the return window" line to the system prompt.
- B. Add few-shot examples showing the window check before every refund.
- C. Add a pre-tool hook that blocks process_refund unless a lookup_order result in this session shows the order is inside the window, and redirects to escalation otherwise.
- D. Move to a larger model tier with better instruction following.
- 2. A customer's first message is: "Get me a human now. You charged me twice." What should the agent do?
- A. Escalate immediately, passing a structured hand-off with what is already known.
- B. Look up the duplicate charge first so the human has full context.
- C. Acknowledge the frustration and offer to fix the double charge, escalating only if they ask again.
- D. Run sentiment analysis and escalate if the score is below threshold.
- 3. get_customer returns three accounts for "J. Smith". What should the agent do?
- A. Pick the account with the most recent activity.
- B. Ask the customer for another identifier, such as email or an order number.
- C. Escalate to a human.
- D. Call lookup_order on all three accounts and choose the best match.
- 4. Three MCP servers return dates as Unix seconds, ISO 8601 and "MM/DD/YY". The agent sometimes miscalculates return windows. What is the most effective fix?
- A. Explain the three formats in the system prompt.
- B. Add few-shot examples of date conversions.
- C. Ask each server's owners to standardise on ISO 8601.
- D. Add a PostToolUse hook that normalises all dates to ISO 8601 before the agent sees them.
- 5. A customer asks the agent to match a competitor's lower price. Your policy covers price adjustments for your own site only. What should the agent do?
- A. Refuse, because the policy does not mention competitors.
- B. Approve, because it resembles an own-site adjustment.
- C. Escalate, because the policy is silent on this request.
- D. Ask for proof of the competitor price, then approve.
Scenario 2: Code Generation with Claude Code
- 6. A developer wrote "use pnpm, never npm" in ~/.claude/CLAUDE.md. Teammates' sessions keep using npm. What is the fix?
- A. Move the instruction into the project's CLAUDE.md and commit it.
- B. Ask each teammate to copy the line into their own ~/.claude/CLAUDE.md.
- C. Create a .claude/rules/ file with paths: ["package.json"].
- D. Create a /pnpm slash command.
- 7. The root CLAUDE.md is 1,800 lines covering testing, API conventions and deployment, and Claude applies parts of it inconsistently. What is the most maintainable improvement?
- A. Summarise it to 300 lines.
- B. Convert each section into a skill.
- C. Split it into topic files in .claude/rules/, scoping them with paths where they apply to specific files.
- D. Move it to each developer's user-level CLAUDE.md.
- 8. (Choose two.) A team skill analyses the whole codebase and produces long output. It must not clutter the main conversation and must never modify files. Which frontmatter settings achieve this?
- A. context: fork
- B. allowed-tools: Read, Grep, Glob
- C. argument-hint: <directory>
- D. isolation: true
- 9. You need to add a null check to one function, and you have a clear stack trace. Which approach fits?
- A. Plan mode, to explore the codebase first.
- B. Spawn the Explore subagent.
- C. Fork the session to compare two fixes.
- D. Direct execution.
- 10. You described a log-line transformation in a paragraph, and Claude produced three different interpretations. What is the most effective next step?
- A. Rewrite the paragraph with more detail.
- B. Provide 2 or 3 concrete input and output examples.
- C. Switch to plan mode.
- D. Ask Claude to explain its interpretation before each run.
Scenario 3: Multi-Agent Research System
- 11. The synthesis subagent's reports omit statistics that the coordinator's logs show the search subagent found. What is the most likely root cause?
- A. The coordinator did not include the search findings in the synthesis subagent's prompt.
- B. The synthesis subagent's context window is too small.
- C. The search tool's description is too vague.
- D. Shared memory between subagents is disabled.
- 12. The coordinator calls four search subagents in four separate turns, so research takes four times longer than needed. What is the fix?
- A. Increase max_tokens for the coordinator.
- B. Merge the four subagents into one.
- C. Have the coordinator emit all four Task calls in a single response.
- D. Submit the searches through the Message Batches API.
- 13. The coordinator never spawns subagents; logs show it has no tool for doing so. What is missing?
- A. Subagent definitions in CLAUDE.md.
- B. tool_choice: {"type": "any"} on the coordinator.
- C. An MCP server for agent communication.
- D. "Task" in the coordinator's allowedTools.
- 14. One source gives a market size of US4.1BandanotherUS6.8B. The report calls them "conflicting estimates", but one is from 2023 and one from 2025. What design change prevents this?
- A. Always prefer the most recent source.
- B. Require subagents to output publication or collection dates with each claim.
- C. Average the two values.
- D. Drop statistics that disagree.
- 15. The document analysis subagent times out on 3 of 20 PDFs. What is the best design?
- A. Retry transient failures locally, then report the three failures to the coordinator with what was tried and any partial results, and annotate the gap in the final report.
- B. Fail the whole research job so nothing incomplete ships.
- C. Return results for the 17 successes and mark the job successful.
- D. Have the coordinator re-run all 20 documents.
Scenario 4: Developer Productivity with Claude
- 16. The agent must find every file named *.migration.ts. Which built-in tool fits best?
- A. Grep
- B. Read
- C. Glob
- D. Edit
- 17. An Edit call fails because its target snippet appears four times in the file. What is the reliable fallback?
- A. Retry the same Edit.
- B. Read the whole file, then Write the corrected file.
- C. Use Grep to count the matches.
- D. Abandon the change and ask the user.
- 18. Your team's MCP semantic code-search tool answers "where is authentication handled?" far better than Grep, but the agent keeps using Grep. What is the most effective first fix?
- A. Remove Grep from the agent's tools.
- B. Force the MCP tool with tool_choice.
- C. Add "always use semantic search" to the system prompt.
- D. Rewrite the MCP tool's description to explain what it does, what it returns and when it beats Grep.
- 19. Two hours into exploring a legacy system, the agent's answers mention a "typical service layer" instead of the specific classes it found earlier. What helps most?
- A. Switch to a model with a larger context window.
- B. Restart the session with no summary.
- C. Keep a scratchpad of key findings, delegate narrow questions to subagents, and use / compact.
- D. Increase max_tokens.
- 20. From one shared codebase analysis, you want to compare two refactoring approaches independently. What should you use?
- A. fork_session
- B. --resume the same session twice
- C. Two new sessions with no shared context
- D. Plan mode
Scenario 5: Claude Code for Continuous Integration
- 21. 40% of review comments are style nits, and developers now ignore all comments, including real bugs. What is the most effective fix?
- A. Add "only report high-confidence findings".
- B. Cap the review at five comments.
- C. Define explicit criteria: report bugs and security issues, skip style and local patterns, with examples.
- D. Use a larger model.
- 22. After every push, the review bot re-posts the same comments. What should you change?
- A. Run the review only on the first push.
- B. Delete old comments before each run.
- C. Lower the temperature.
- D. Include prior findings in context and ask only for new or still-unaddressed issues.
- 23. A script must post findings as inline PR comments. How do you get machine-parseable output?
- A. Ask for JSON in the prompt and parse it.
- B. Use --output-format json with --json-schema.
- C. Parse the default text output with regular expressions.
- D. Use --batch mode.
- 24. The same Claude session that wrote a feature is asked to review it and misses obvious issues. What helps most?
- A. Run the review in an independent instance without the generation context.
- B. Add "review your work critically" to the prompt.
- C. Turn on extended thinking for the review.
- D. Run the review twice in the same session.
- 25. (Choose two.) Generated tests duplicate existing ones and test trivial behaviour. Which changes help?
- A. Raise the temperature for more variety.
- B. Provide the existing test files in context.
- C. Move test generation to the Message Batches API.
- D. Document testing standards, valuable test criteria and fixtures in CLAUDE.md.
Scenario 6: Structured Data Extraction
- 26. Some contracts have no termination date, and the extractor invents one. What is the most effective fix?
- A. Add "do not invent values" to the prompt.
- B. Retry when the date looks wrong.
- C. Make termination_date nullable in the schema.
- D. Keep it required and ask for "N/A" when absent.
- 27. Output is always valid JSON, but in 6% of invoices the line items do not sum to the total. What helps most?
- A. Turn on strict schema mode.
- B. Extract calculated_total alongside stated_total, flag conflicts, and retry with the specific error.
- C. Force the extraction tool with tool_choice.
- D. Make more fields required.
- 28. A validation-retry loop fixes 90% of failures. The rest always fail on a missing PO number, which appears only in a separate purchase order that is not provided. What should you do?
- A. Allow more retries.
- B. Strengthen the prompt about PO numbers.
- C. Use a larger model.
- D. Stop retrying these, return null with a flag, and route them for review or supply the source document.
- 29. (Choose two.) Which workloads suit the Message Batches API?
- A. Nightly extraction of 50,000 archived documents.
- B. Extraction while a customer waits on a live chat.
- C. A weekly accuracy audit report.
- D. An agent that must call tools mid-request.
- 30. Overall extraction accuracy is 97%, and the team wants to stop human review of high-confidence results. What is the best next step?
- A. Measure accuracy by document type and field, calibrate confidence thresholds on a labelled set, and keep stratified sampling of high-confidence output.
- B. Stop review now, since 97% is high.
- C. Have the model rate its own confidence and trust ratings above 9 of 10.
- D. Raise the confidence threshold to 0.99 without further analysis.
Answer key
# Answer Why
1 C A must-never rule needs a deterministic gate. A, B and D only improve the odds. 2 A Honour an explicit request for a human at once. C applies only when no human was requested. 3 B Multiple matches need clarification, never a heuristic guess.
4 D Normalise heterogeneous tool output in a hook. C is slow and outside your control. 5 C Policy gaps are an escalation trigger.
6 A User-level CLAUDE.md is not shared; project CLAUDE.md is.
7 C Topic and path-scoped rule files are the guide's answer to a monolithic CLAUDE.md. 8 A, B context: fork isolates output; allowed-tools restricts actions. isolation does not exist. 9 D Simple, well-scoped change with a clear cause.
10 B Concrete input/output examples fix inconsistent interpretation.
11 A Subagents get only what the coordinator puts in their prompt.
12 C Parallel subagents come from multiple Task calls in one response.
13 D The Task tool spawns subagents and must be in allowedTools.
14 B Dates stop temporal differences being read as contradictions.
15 A Local recovery, structured propagation and coverage annotations. B and C are the two anti-patterns. 16 C Glob matches file paths; Grep searches contents.
17 B The guide's fallback when Edit cannot find a unique anchor.
18 D Better descriptions are the first fix; A and B remove useful flexibility. 19 C Scratchpads, subagent delegation and /compact counter context degradation. 20 A fork_session branches from a shared baseline.
21 C Explicit categorical criteria beat confidence instructions and caps.
22 D Prior findings in context prevent duplicate comments.
23 B The documented flags for structured CI output. --batch does not exist.
24 A An independent instance lacks the author's reasoning bias.
25 B, D Existing tests prevent duplicates; CLAUDE.md standards raise test value. 26 C Nullable fields remove the pressure to fabricate.
27 B Schemas guarantee syntax, not semantics; add semantic checks. A, C and D only affect structure. 28 D Retries cannot recover information absent from the source.
29 A, C Latency-tolerant work only; batches do not support mid-request tool calls. 30 A Aggregates hide weak segments; calibrate and keep sampling.
Scoring guide: 24 or more correct (80%) suggests you are ready. Below that, reread the chapters for the domains you missed.
Distractor analysis for Practice exam 1
Knowing why the right answer is right is half the skill. The other half is recognising why each wrong option is tempting and where it fails. This section takes every option in turn. # Option Why it is wrong (or right)
1 A A louder prompt is still a prompt; compliance stays probabilistic.
1 B Few-shot examples improve the odds but cannot guarantee the order.
1 C Right: a gate makes the window check deterministic.
1 D A model upgrade does not change the nature of the guarantee.
2 A Right: explicit requests are honoured immediately.
2 B Investigating first ignores the request and frustrates the customer further. 2 C This is the right move only when no human was requested.
2 D Sentiment is a poor proxy, and the request is already explicit.
3 A Recency is a heuristic; it can pick the wrong person and expose their data. 3 B Right: ask for a distinguishing identifier.
3 C Escalation is premature; the agent can resolve the ambiguity itself.
3 D Searching all three accounts' orders exposes other customers' data.
4 A Prompt notes on formats leave the conversion to chance.
4 B Same problem as A, with more tokens.
4 C Reasonable long-term, but slow and outside your control; not the most effective fix. 4 D Right: normalise in code before the model sees the data.
5 A Refusing treats silence as a "no"; policy gaps need a human decision.
5 B Approving treats silence as a "yes"; equally unjustified.
5 C Right: a policy gap is an escalation trigger.
5 D Asking for proof assumes the policy allows matching at all.
6 A Right: project CLAUDE.md is shared through version control.
6 B Works only until the next new hire; not maintainable.
6 C A rule scoped to package.json will not load for most tasks.
6 D A command must be invoked; this rule must always apply.
7 A Cutting content loses rules; the problem is organisation, not length alone. 7 B Skills load on demand; universal rules must always be present.
7 C Right: topic and path-scoped rule files.
7 D User-level files are not shared and would split the team.
8 A, B Right: fork isolates output; allowed-tools prevents writes.
8 C argument-hint prompts for input; it neither isolates nor restricts.
8 D isolation: true is not a skill frontmatter field.
9 A Plan mode adds overhead to a one-line, well-understood fix.
# Option Why it is wrong (or right)
9 B Exploration is unnecessary; the stack trace points to the line.
9 C Forking is for comparing approaches; there is only one.
9 D Right: direct execution for small, clear changes.
10 A More prose is still prose; it will still be read inconsistently.
10 B Right: concrete examples define the transformation.
10 C Plan mode does not resolve an ambiguous specification.
10 D Explanations reveal the misreading but do not fix it.
11 A Right: subagents only see what their prompt contains.
11 B Possible in theory, but the logs show the data was never passed.
11 C The search worked; its description is not the issue.
11 D There is no automatic shared memory to enable.
12 A Output length has nothing to do with parallelism.
12 B One merged subagent loses focus and parallelism.
12 C Right: several Task calls in one response run in parallel.
12 D Batches suit latency-tolerant offline work, not live research.
13 A CLAUDE.md does not grant tools.
13 B tool_choice cannot force a tool the agent does not have.
13 C Agent communication does not need an MCP server.
13 D Right: the Task tool must be in allowedTools.
14 A "Newest wins" discards valid historical data.
14 B Right: dates make the two figures compatible.
14 C Averaging different years and methods produces a figure nobody measured. 14 D Dropping data hides useful information.
15 A Right: local recovery, structured propagation, annotated gaps.
15 B Total failure over 3 of 20 documents wastes the 17 that worked.
15 C Silent suppression: the report would look complete when it is not.
15 D Re-running the 17 successes wastes time and money.
16 A Grep searches contents, not file names.
16 B Read needs a path you do not yet have.
16 C Right: Glob matches path patterns.
16 D Edit changes files; it does not find them.
17 A The same Edit will fail the same way.
17 B Right: Read the file, then Write the corrected whole.
17 C Counting matches confirms the problem without solving it.
17 D Giving up is unnecessary; a reliable fallback exists.
18 A Removing Grep takes away a tool that is right for many other searches.
# Option Why it is wrong (or right)
18 B Forcing one tool every turn breaks normal agent behaviour.
18 C A prompt rule may work but is weaker than fixing the description at its source. 18 D Right: descriptions drive tool selection.
19 A A bigger window delays degradation; it does not prevent it.
19 B A restart with no summary throws away two hours of findings.
19 C Right: scratchpad, delegation and compaction.
19 D Output length does not affect what the model remembers.
20 A Right: fork from the shared baseline.
20 B Resuming twice continues one line of work; it does not branch.
20 C Fresh sessions repeat the analysis and may diverge in their baselines.
20 D Plan mode plans one approach; it does not keep two independent branches. 21 A Confidence instructions do not tell the model which findings matter.
21 B A cap keeps noise and drops real findings arbitrarily.
21 C Right: explicit report and skip criteria.
21 D Model size does not define your team's criteria.
22 A Skipping later pushes misses new issues.
22 B Deleting old comments destroys the review history.
22 C Temperature does not tell the model what was already reported.
22 D Right: pass prior findings and ask for new ones only.
23 A Prompt-requested JSON is less reliable than schema-enforced output.
23 B Right: the documented flags.
23 C Regular expressions on prose are brittle.
23 D --batch does not exist.
24 A Right: an independent instance lacks the author's bias.
24 B The same context still anchors the review.
24 C Extended thinking reasons more, but from the same assumptions.
24 D Repeating in the same session repeats the bias.
25 A Higher temperature produces more random tests, not better ones.
25 B, D Right: show existing tests; document standards.
25 C Batching changes cost and timing, not test quality.
26 A A prompt rule is weaker than removing the pressure to fill the field.
26 B Retrying cannot produce a date that does not exist.
26 C Right: nullable fields.
26 D "N/A" in a date field breaks downstream parsing and is still a forced value. 27 A Strict mode is about syntax; the problem is semantic.
27 B Right: semantic checks plus targeted retry.
# Option Why it is wrong (or right)
27 C Forcing the tool changes nothing about the numbers.
27 D More required fields add pressure to invent values.
28 A More retries repeat a failure that cannot succeed.
28 B No prompt can extract what is not there.
28 C No model can either.
28 D Right: stop, flag, and supply the source or route to a human.
29 A, C Right: latency-tolerant bulk and periodic work.
29 B A waiting customer needs a synchronous call.
29 D Batches cannot run tool calls mid-request.
30 A Right: segment, calibrate, keep sampling.
30 B The 97% may hide a weak document type.
30 C Self-rated confidence is uncalibrated.
30 D A higher threshold without analysis is still a guess.