Mock Exam 2
60 items · 120 minutes · four scenarios
Scenarios in this paper: 4 (Developer Productivity), 5 (Claude Code for CI), 1 (Customer Support — second visit), 3 (Multi-Agent Research — second visit). Together with Mock 1, the two papers cover all six scenarios in the bank.
This paper is deliberately not blueprint-weighted. Its actual distribution is D1 22 · D2 15 · D3 6 · D4 9 · D5 8 — because the four scenarios it draws on are the agentic and tool-heavy ones, exactly as the guide maps them. Mock 1 is the blueprint-weighted simulation; use that one to predict your score. Use this one to stress the two domains that together are 45% of the real exam, and to see all six scenarios before exam day.
It is also harder than Mock 1: fewer pure-recall items, more items where two options are defensible and you must pick the better one. Expect a lower raw score here, and don't read that as a regression.
Instructions
- Answer every item. No penalty for a wrong answer.
- Each item states how many options to select. Unless stated, select one.
- Target pace: 30 minutes per scenario.
- Multiple-response items are all-or-nothing. Partial credit does not exist.
Answers: mock-exam-2-answer-key.md. Scoring: scoring-grid.md.
Scenario A — Developer Productivity with Claude
A 200-engineer organization is deploying an internal agent built on the Claude Agent SDK to help developers navigate a large legacy monorepo, write tests, and update documentation. It uses the built-in Read, Write, Edit, Bash, Grep, and Glob tools, plus MCP servers for the internal service catalogue and the ticketing system. Adoption is uneven and some teams report the agent "makes things up" about the codebase.
1
A developer asks the agent to explain how billing reconciliation works in an unfamiliar 200-file service. Which approach is most efficient?
- A.
Readevery file to build a complete picture. - B.
Grepfor entry points, thenReadselectively to follow the imports. - C.
Globfor all source files andReadthe twenty largest. - D. Ask the agent to describe how services of this kind are typically structured.
2
Late in a long refactoring session the agent stops naming specific classes and begins describing "the typical pattern for this kind of service." Its suggestions no longer match the code. Diagnosis and fix?
- A. Context degradation; delegate exploration to subagents and keep a scratchpad file of established findings.
- B. Insufficient model capability; enable extended thinking.
- C. An unclear goal; restate the refactoring objective in more detail.
- D. The codebase is too large for any agent; split it across repositories.
3
Which built-in tool finds every file whose path matches **/*.integration.ts?
- A.
Glob - B.
Grep - C.
Read - D.
Bash
4
The agent must change a config value that appears once in a file with a distinctive surrounding line. Which tool?
- A.
Edit, anchored on the unique surrounding text. - B.
ReadthenWrite. - C.
Bashwithsed. - D.
GrepthenWrite.
5
Every subagent in the system is given all fourteen tools "for flexibility." Which two problems does this create? (Select two.)
- A. Reduced tool-selection accuracy within each subagent.
- B. Violation of least privilege — subagents can take actions outside their role.
- C. Subagents begin communicating directly with each other.
- D. Higher latency during tool discovery at connection time.
6
An MCP-provided search_service_catalogue tool is consistently ignored in favour of the built-in Grep, even where it would be better. Fix?
- A. Enhance the MCP tool's description to state explicitly what it does that
Grepcannot. - B. Remove
Grepfrom the agent's allowed tools. - C. Mark the MCP tool as preferred in
.mcp.json. - D. Register the MCP tool twice so it appears more prominent.
7
The team needs Jira integration. What does the exam prefer?
- A. Use an existing community MCP server for Jira.
- B. Build a custom MCP server wrapping the Jira REST API.
- C. Give the agent
Bashaccess and let it callcurl. - D. Deploy a self-hosted MCP gateway in front of Jira.
8
When are an MCP server's tools discovered, and how are they available afterwards?
- A. At connection time; all discovered tools are then simultaneously available.
- B. On first use; each must be enabled individually.
- C. Per request, based on the prompt's content.
- D. At connection time, but only the first ten load.
9
The internal service catalogue exposes a large browsable set of service definitions the agent should be able to consult. Which MCP primitive fits?
- A. Resources.
- B. A tool per service.
- C. A single
get_servicetool taking a name. - D. Embedding the catalogue in CLAUDE.md.
10
A get_service_owner tool returns null with isError: false both when a service has no registered owner and when the caller lacks directory permission. What is wrong?
- A. Nothing;
nullcorrectly represents "no owner found." - B. An access failure is being reported as a valid empty result; permission denial needs
isError: truewith apermissioncategory. - C. The tool should retry with elevated credentials.
- D. The agent should treat all
nullreturns as errors.
11
The organization wants the agent to update documentation but never to modify production Terraform. Which mechanism is correct?
- A. Scope the agent's tools and add a
PreToolUsegate blocking writes under the Terraform paths. - B. Add a CLAUDE.md instruction never to modify Terraform.
- C. Add a prominent warning to the agent's system prompt.
- D. Ask developers to review every diff before applying it.
12
A single analyze_code tool is used for finding dead code, summarizing modules, and checking test coverage. Quality is poor across all three. Best fix?
- A. Add detailed instructions to the description covering all three use cases.
- B. Split it into three purpose-scoped tools.
- C. Add a
modeparameter with three allowed values. - D. Raise the tool's output token limit.
13
Analysis shows 85% of analyze_code calls are one narrow task: checking whether a module has test coverage. The other 15% vary. Best design?
- A. Add a scoped
check_test_coveragetool for the common case and keep the general tool for the rest. - B. Keep one general tool and improve its description.
- C. Replace the general tool entirely with the scoped one.
- D. Add a
task_typeenum to the general tool.
14
Which elements belong in a tool description to support correct selection? (Select three.)
- A. Accepted input formats and required prefixes.
- B. Example queries the tool is appropriate for.
- C. Explicit boundaries — what it does not handle, and which tool does.
- D. Average latency and cost per call.
15
The agent has a well-described lookup_runbook tool but keeps using web_search. Descriptions are clear and non-overlapping. What should be audited next?
- A. The system prompt, for keyword-sensitive instructions steering toward search.
- B.
lookup_runbook's output schema. - C. Whether
lookup_runbookappears beforeweb_searchin the tools array. - D. The temperature setting.
Scenario B — Claude Code for Continuous Integration
A team has integrated Claude Code into its CI pipeline for automated code review, test generation, and pull request feedback. Early results produced so many low-value comments that developers began ignoring the bot entirely. The team must minimize false positives while keeping useful coverage, and the pre-merge review must not delay merges.
16
The current review instruction is "flag outdated comments." Many correct comments are flagged. Best replacement?
- A. "Flag comments only when the claimed behaviour contradicts the actual code behaviour."
- B. "Be conservative when flagging comments."
- C. "Only flag comments you are highly confident are outdated."
- D. "Flag comments that appear older than the surrounding code."
17
Why does the exam treat false positives as more damaging than false negatives here?
- A. They consume more tokens per finding.
- B. They destroy developer trust, after which true positives are ignored too.
- C. They fail the pipeline and block merges.
- D. They are harder to measure than false negatives.
18
70% of the reviewer's false positives come from one category: "possible null dereference." Which two responses are appropriate? (Select two.)
- A. Temporarily disable that category while its criteria are rewritten.
- B. Rewrite the category's criteria with explicit qualifying conditions and counter-examples.
- C. Instruct the model to be more careful with null-dereference findings.
- D. Lower the category from critical to informational and keep reporting it.
19
What makes severity criteria operational rather than aspirational?
- A. Concrete code examples at each level, including explicit "NOT critical" counter-examples.
- B. A numeric rubric the model applies to each finding.
- C. An instruction to match the issue tracker's severity conventions.
- D. A required confidence score alongside each severity.
20
Which schema field best supports analysing why the reviewer produced a given finding?
- A.
detected_pattern - B.
confidence - C.
severity - D.
line_number
21
Which flags give a non-interactive run with machine-parseable, schema-constrained output? (Select three.)
- A.
-p/--print - B.
--output-format json - C.
--json-schema - D.
--non-interactive
22
The CI review job runs in the same session that generated the code, immediately after generation. It rarely finds real problems. Why?
- A. The generating session carries the assumptions that produced any errors; review needs a fresh, independent context.
- B. The review prompt needs to be longer and more specific.
- C. Extended thinking should be enabled for the review step.
- D. The review should cover the full repository rather than the diff.
23
Which review configuration does the exam rank highest?
- A. A separate reviewer instance with fresh context.
- B. The generating instance reviewing its own output.
- C. The generating instance with extended thinking enabled.
- D. Two sequential self-review passes.
24
Which CI workload suits the Message Batches API?
- A. The nightly aggregate quality report across all repositories.
- B. The pre-merge review that gates pull requests.
- C. Both, since both are automated.
- D. Neither, since batch does not support tools.
25
How does the CI run pick up the team's conventions?
- A. From
CLAUDE.md, read in headless mode too. - B. Conventions must be inlined in the CI prompt; memory files don't load headlessly.
- C. Via a
--rulesflag. - D. Via CI environment variables.
26
The team wants generated tests to follow a specific arrange/act/assert shape. What steers this most effectively?
- A. 2–3 concrete input/output examples of tests in the desired shape.
- B. A detailed prose specification of the shape.
- C. A single canonical example.
- D. 10 examples covering every variation the codebase contains.
27
Which two outcomes do well-chosen few-shot examples produce? (Select two.)
- A. Greater consistency across similar inputs.
- B. Better handling of ambiguous cases.
- C. Elimination of semantic errors in structured output.
- D. Guaranteed schema validity.
28
The review agent must emit findings as structured JSON for the PR-comment bot. What mechanism does the exam expect?
- A. A forced tool call with a JSON schema.
- B. A prompt instruction to reply in JSON only.
- C. A regex post-processor over the model's prose.
- D. A markdown table the bot parses.
29
All findings are schema-valid, but some cite line numbers that don't exist in the diff. What is needed?
- A. A validation step checking each
line_numberagainst the diff, discarding or re-querying invalid findings. - B. A stricter integer constraint on
line_number. - C. A larger
max_tokens. - D.
tool_choice: "any".
30
The team wants a /review-pr workflow every developer can run locally too. What do they create?
- A.
.claude/commands/review-pr.md, committed. - B.
~/.claude/commands/review-pr.md - C. An entry in a
commandsarray in.claude/config.json. - D. A
--review-prCLI flag.
Scenario C — Customer Support Resolution Agent (second visit)
Same system as Mock 1 Scenario A: an Agent SDK support agent with
get_customer,lookup_order,process_refund, andescalate_to_human. This time the focus is the agentic loop itself, delegation, and reliability under load.
31
Which condition correctly terminates the agentic loop?
- A.
stop_reasonis not"tool_use". - B. The response contains no
tool_useblocks and the text is non-empty. - C. A maximum iteration count is reached.
- D. The response text contains a completion phrase.
32
After receiving tool results, what must be appended to messages and in what form? (Select two.)
- A. The assistant's response content, verbatim.
- B. A single user message containing every
tool_resultblock, each keyed to itstool_use_id. - C. A summary of the assistant's response, to save context.
- D. One user message per tool result, in call order.
33
Which are loop anti-patterns? (Select three.)
- A. Using an arbitrary iteration cap as the primary stop condition.
- B. Terminating when the assistant response contains any text.
- C. Terminating after the first tool result is returned.
- D. Appending the assistant's response content verbatim before the tool results.
34
The team is deciding between a model-driven agent and a pre-configured decision tree for triage. Which favours the model-driven approach?
- A. The set of enquiry types is open-ended and evolves.
- B. Every path must be auditable in advance.
- C. There are exactly four enquiry types, all known.
- D. Regulators require a documented, fixed flow.
35
The team adds a specialized returns subagent. How should the main agent delegate to it?
- A. Via the
Tasktool, with"Task"present inallowedTools. - B. By calling the subagent's tools directly.
- C. By setting
delegate: truein the configuration. - D. By starting a new session for the subagent.
36
The returns subagent's AgentDefinition needs three things filled in. Match them. (Select three.)
- A.
description— used by the coordinator to decide when to route here. - B.
prompt— the subagent's own instructions. - C. Scoped tools — only what this role requires.
- D.
parallel— whether it may run concurrently.
37
A delegating prompt reads "Handle the return for the order we discussed." The subagent asks which order. Why?
- A. It lacks
lookup_order. - B. Subagents have isolated context and inherit nothing; the referent is undefined.
- C. The instruction is lost in the middle of the prompt.
- D. Its model is too small.
38
Two enquiries in one conversation are fully independent: a refund on order A and a shipping question on order B. How does the agent handle both concurrently via subagents?
- A. Two
Taskcalls in a single assistant response. - B.
parallel: truein the configuration. - C. One
Taskcall per turn. - D. A single
Taskcall listing both.
39
Which delegating prompt style does the exam prefer?
- A. State the goal and the quality criteria for a successful result.
- B. Enumerate the procedural steps the subagent must follow in order.
- C. Provide the coordinator's full conversation history.
- D. Provide only the customer's raw message.
40
An escalation handoff must be built. What goes in it?
- A. Customer ID, root cause, refund amount, recommended action.
- B. The full transcript.
- C. A one-line reason.
- D. The transcript plus per-action confidence scores.
41
Under load the team wants to cap runaway tool use without breaking correct termination. What is the right relationship between the cap and the loop condition?
- A.
stop_reasonremains the primary condition; the cap is a safety backstop that logs and escalates when hit. - B. The cap becomes the primary condition, checked before
stop_reason. - C. Remove the cap;
stop_reasonis sufficient. - D. Cap at one tool call per turn.
42
An agent handling a 30-turn conversation is producing responses that contradict commitments made in turn 3. Which two changes are appropriate? (Select two.)
- A. Maintain a persistent case-facts block outside the summarized history.
- B. Trim verbose tool outputs so real content isn't crowded out.
- C. Switch to a larger context window.
- D. Drop the oldest turns once a threshold is reached.
43
A refund tool call fails with a transient network error. What should happen?
- A. Return
isError: true,errorCategory: "transient",isRetryable: true; the agent retries. - B. Return
isError: true,isRetryable: false; escalate. - C. Return
isError: falsewith an empty result. - D. Terminate the conversation.
44
The team wants to be certain a refund is never issued twice for one order. Which mechanism?
- A. A
PreToolUsegate checking a persisted record of completed refunds for that order. - B. A prompt instruction not to issue duplicate refunds.
- C. A
PostToolUsehook logging refunds for reconciliation. - D. A few-shot example showing a duplicate request being declined.
45
A developer returns to a support-agent debugging session after the weekend. The recorded reasoning is valuable but the tool results in it are stale. Best action?
- A. Start a fresh session with a structured summary of the prior conclusions.
- B.
--resumethe prior session. - C.
fork_sessionfrom the prior session. - D.
/compactand continue.
Scenario D — Multi-Agent Research System (second visit)
Same system as Mock 1 Scenario C: a coordinator delegating to web-search, document-analysis, synthesis, and report-generation subagents. This time the focus is orchestration topology, decomposition quality, and output fidelity.
46
Which statement describes the required communication topology?
- A. Hub-and-spoke: all inter-subagent communication routes through the coordinator.
- B. Mesh: subagents communicate directly for efficiency.
- C. Chain: each subagent passes results to the next.
- D. Broadcast: every subagent sees every other's output.
47
Which two statements about subagent context are correct? (Select two.)
- A. Subagents have isolated context.
- B. Subagents inherit nothing from the coordinator's conversation.
- C. Subagents inherit the coordinator's system prompt and history.
- D. Subagents share a common context pool.
48
The coordinator decomposed "assess this company's competitive position" into eight subtasks, each covering a single product feature. The report is detailed but misses pricing, distribution, and regulation. Root cause?
- A. Overly narrow decomposition.
- B. Insufficient subagent count.
- C. A synthesis failure.
- D. Inadequate tool access.
49
Which decomposition pattern fits a question whose required sub-areas can only be determined after an initial survey?
- A. Dynamic, adaptive decomposition — survey first, then decide the subtasks.
- B. Prompt chaining with a fixed sequence of stages.
- C. A pre-configured decision tree over question types.
- D. Fixed partitioning into five standard business dimensions.
50
Which pattern re-delegates after a coverage check reveals a gap?
- A. Iterative refinement.
- B. Scope partitioning.
- C. Dynamic subagent selection.
- D. Prompt chaining.
51
The report-generation agent produces a single 40-page document. Reviewers say they cannot find the answer to the client's actual question. What should change?
- A. Lead with key findings, then use explicit section headers for the rest.
- B. Shorten the report to 10 pages.
- C. Add a table of contents.
- D. Increase the report agent's context window.
52
A synthesis pass must combine financial comparisons, a regulatory timeline, and a list of technical risks. How should each render?
- A. Financials as tables, the timeline as prose, technical risks as lists.
- B. All three as prose, for readability.
- C. All three as tables, for consistency.
- D. All three as lists, for scannability.
53
A subagent returns four paragraphs of reasoning before its findings. Over a long run the coordinator's output becomes vague. Which two changes help most? (Select two.)
- A. Specify a structured return format — findings only, as
{claim, source, date}records. - B. Have the coordinator maintain a scratchpad file of accumulated findings.
- C. Increase the coordinator's context window.
- D. Have subagents report directly to the synthesis agent.
54
Reviewing a 60-file codebase for a client's technical due diligence, a single reviewing agent misses issues in files it read early on. Best approach?
- A. Per-file passes, then a separate cross-file integration pass.
- B. A larger context window so all 60 files fit.
- C. Reading the files in dependency order.
- D. Extended thinking on a single pass.
55
The final report must disclose what was not covered. Where does that information come from?
- A. Coverage annotations propagated from each subagent's structured returns, including access failures and gaps.
- B. The synthesis agent inferring gaps from what's present.
- C. A final review pass comparing the report against the original question.
- D. The client noticing and asking.
56
Two subagents were asked the same question and returned conflicting figures for market size. What should the synthesis agent do?
- A. Report both with attribution, publication dates, and any methodological difference.
- B. Take the figure from the more capable subagent.
- C. Use the more recent figure.
- D. Average them.
57
The coordinator must decide which subagents to spawn for a question about a heavily regulated industry, where a regulatory specialist matters and a distribution specialist doesn't. Which pattern?
- A. Dynamic subagent selection.
- B. Scope partitioning.
- C. Iterative refinement.
- D. Prompt chaining.
58
A subagent's prompt instructs it to "research thoroughly and return whatever seems relevant." Findings are inconsistent between runs. Most effective fix?
- A. State the goal and explicit quality criteria for a complete result, plus the required return format.
- B. Instruct it to be more thorough.
- C. Lower its temperature.
- D. Run it three times and merge.
59
Which behaviour is correct when one of four document collections is inaccessible?
- A. Return the three successful result sets plus a structured error for the fourth, with category, what was attempted, and alternatives.
- B. Return a generic "search unavailable" error.
- C. Return only the three successful result sets.
- D. Terminate the workflow.
60
A multi-week research engagement spans several sessions. What must the state export carry to keep later work consistent with earlier work?
- A. The conventions and decisions established earlier, not just the list of completed items.
- B. A timestamp per completed item.
- C. The full conversation history of each prior session.
- D. A confidence score per completed item.
End of Mock Exam 2. Record your answers before checking the key.