Question 200
A review agent must obey application-level guarantees under adversarial prompts. A user requests deletion, but the policy requires independent confirmation. Which mechanism should be selected?
- Validate target identifier and cardinality in tool arguments before execution
- Persist the rejection and close the pending mutation authorization
- Gate export execution on server-side identity and scope validation
- Check a central rate or quota counter at execution time
- Apply a confirmation checkpoint enforced by the host workflow
Explanation
Correct Answer
E:A required approval checkpoint converts a human-control requirement into execution logic, rather than merely advising the model to ask first.
Incorrect Answers
A:Target and batch-size validation blocks unintended bulk changes even when a model builds syntactically valid arguments; this is useful for a tool can modify thousands of records although the task requires one record, but it leaves the stated requirement to require confirmation before destructive action unmet.
B:A durable rejection should invalidate the action token; otherwise a replayed model output might still reach the mutation endpoint; that applies when a human reviewer rejects a proposed account adjustment, whereas this case requires a response to a user requests deletion, but the policy requires independent confirmation.
C:This measure fits a different trigger: a prompt injection asks the assistant to call a privileged export tool. In that setting, The permission decision must not be delegated to untrusted text; the service should reject unauthorized exports even if requested by a model; it does not resolve the present need to require confirmation before destructive action.
D:Per-prompt reminders cannot coordinate usage across multiple agents; an authoritative service counter can enforce shared limits; it protects against the case where a tool operation must obey a daily account limit, rather than the failure described here: a user requests deletion, but the policy requires independent confirmation.
Question 201
A support workflow handles errors from external services. A policy lookup returns a valid empty result for an optional note. What should be implemented at the appropriate boundary?
- Query the transaction ledger by idempotency key before retrying
- Convert the exception to a safe user-facing status and retain trace IDs internally
- Propagate an unavailable-service error and avoid a negative factual assertion
- Treat a validated empty optional field as data, not a tool outage
Explanation
Correct Answer
D:An expected empty value is distinct from execution failure; confusing them causes unnecessary recovery attempts. Here it serves the explicit need to preserve legitimate absence semantics without adding a separate unverified inference.
Incorrect Answers
A:Unknown delivery of a response is not proof the operation failed; reconciliation prevents duplicate financial effects; the alternative would make sense if a refund call may have succeeded before its network connection dropped. It does not directly fix the observed condition: a policy lookup returns a valid empty result for an optional note.
B:When a customer-facing workflow receives a detailed internal stack trace, this would be useful because the user needs an accurate next step, not sensitive implementation paths or credentials embedded in a service error; this item instead calls for a way to preserve legitimate absence semantics.
C:A failed query provides no evidence that a record is absent; the customer should receive an honest temporary-status response; the relevant precondition would be the order API times out and the agent states the customer has no order. The question instead describes a policy lookup returns a valid empty result for an optional note.
Question 202
A team uses Claude Code to implement a business-rule change. The fix passes the reproducer but may affect adjacent modules. Which option best meets the operational need?
- Update tests and plan based on the approved revised criteria
- Validate the changed module and affected integration boundaries
- Remove incidental changes and present a focused diff
- Request the exact states and exception cases before coding
Explanation
Correct Answer
B:A local green test is not enough when shared interfaces are modified; neighboring consumers need coverage. This matches the workflow goal to run focused regression tests across dependencies rather than introducing an unrelated action.
Incorrect Answers
A:When a review discovers the acceptance criteria changed mid-implementation, this would be useful because continuing with an obsolete contract can produce polished but wrong code; the new requirements must govern validation; this item instead calls for a way to run focused regression tests across dependencies.
C:This measure fits a different trigger: the generated patch contains unrelated formatting changes. In that setting, A small diff improves reviewability and makes unintended consequences easier to detect; it does not resolve the present need to run focused regression tests across dependencies.
D:An undefined business term can map to several implementations; clarification prevents a seemingly plausible but wrong patch; the relevant precondition would be a ticket uses the word 'active' without defining qualifying account states. The question instead describes the fix passes the reproducer but may affect adjacent modules.
Question 203
A Claude Code team audits the quality of its persistent project instructions. A temporary secret appears in a copied setup example. What is the most appropriate design choice?
- Document the actual lint, test, and review procedures with relevant paths
- Summarize service boundaries and point to authoritative files for details
- Enforce the gate in CI or permission policy, while keeping guidance aligned
- Replace the secret with a safe placeholder and managed-secret guidance
Explanation
Correct Answer
D:Persistent instructions may be read by agents and committed to version control; secrets do not belong in them. For the stated case, the check is whether the system can keep credentials out of instruction memory; this approach supplies that control.
Incorrect Answers
A:Specific commands and expected outcomes give Claude verifiable steps; broad style slogans offer little operational guidance; the relevant precondition would be CLAUDE.md contains vague advice to 'write good code' but omits repository commands. The question instead describes a temporary secret appears in a copied setup example.
B:This measure fits a different trigger: the team wants Claude to know repository architecture without pasting full source files. In that setting, A navigational map improves codebase discovery while leaving large or frequently changing implementation text in its source files; it does not resolve the present need to keep credentials out of instruction memory.
C:When one developer asks Claude Code to ignore a required security gate for speed, this would be useful because prompt instructions are not an authoritative security boundary; a required check should fail independently of the assistant's compliance; this item instead calls for a way to keep credentials out of instruction memory.
Question 204
A document-extraction pipeline exposes conversion and validation tools to Claude. An extraction tool performs irreversible posting but is labeled process_document. Which response is most reliable?
- Constrain the input schema to supported currency codes and document normalization
- Return page identifiers, text, status, and errors as separate structured records
- Include lookup time and source provenance in the result contract
- Rename and describe the operation as a posting action with approval prerequisites
Explanation
Correct Answer
D:Accurate tool semantics make a state-changing command distinguishable from read-only extraction during model tool choice.
Incorrect Answers
A:A typed canonical contract prevents ambiguous symbols from becoming silently incorrect financial records; the relevant precondition would be a validator requires normalized currency codes but callers send symbols. The question instead describes an extraction tool performs irreversible posting but is labeled process_document.
B:Per-page status distinguishes a partly readable document from a fully successful extraction and supports targeted retries; the alternative would make sense if an OCR tool can return multiple pages with partial failures. It does not directly fix the observed condition: an extraction tool performs irreversible posting but is labeled process_document.
C:This measure fits a different trigger: an address verifier uses an external data source that may be outdated. In that setting, A timestamped external check lets downstream logic decide whether the verification is fresh enough for the task; it does not resolve the present need to surface dangerous side effects in its contract.
Question 205
A developer asks Claude Code to implement a new serialization routine. Claude produces a patch that compiles but breaks a boundary case. What should the team do to resolve this particular gap?
- Write or update tests that encode the expected outputs before implementation
- Use the failing test output to make a targeted correction
- Add unseen edge cases and regression checks
- Inspect complexity assumptions and test evidence against acceptance criteria
- Ask for representative input/output pairs and edge cases
Explanation
Correct Answer
B:Compilation checks syntax and types, not all behavior; a failing edge-case test provides precise evidence for improvement.
Incorrect Answers
A:A test-first loop makes success measurable and gives the agent rapid feedback about whether its code matches the spec; the alternative would make sense if the desired behavior is defined by a small set of stable examples. It does not directly fix the observed condition: Claude produces a patch that compiles but breaks a boundary case.
C:This measure fits a different trigger: a generated solution passes only the examples it was shown. In that setting, Overfitting to a few examples can hide incorrect general behavior; independent cases test whether the implementation is robust; it does not resolve the present need to iterate using the observed failure.
D:When a developer wants to know why the proposed algorithm is acceptable, this would be useful because a concise rationale should be backed by measured or inspectable behavior, not by the model's own confidence; this item instead calls for a way to iterate using the observed failure.
E:Concrete examples expose ambiguity in the contract before implementation, reducing incorrect assumptions that tests might otherwise miss; the relevant precondition would be the exact expected encoding is ambiguous in the feature request. The question instead describes Claude produces a patch that compiles but breaks a boundary case.
Question 206
A code-inspection MCP server reports results and operational errors to Claude Code. A path points to a file deleted after the search index was built. Which control is most directly relevant?
- Reject incomplete tool results before marking the inspection complete
- Report access denial with path scope but without privileged file contents
- Return a not-found result with the indexed revision context
- Return an unsupported-encoding error and safe remediation choices
Explanation
Correct Answer
C:The agent needs to know search and read views differ, so it can refresh or requery rather than citing nonexistent content.
Incorrect Answers
A:When a tool reports success but omits a required file hash, this would be useful because structural success is insufficient when required provenance fields are missing; validation must check the actual promised result schema; this item instead calls for a way to expose stale index or missing resource state.
B:A permission-denied file is not equivalent to missing code; the operator may need an approved access adjustment; the relevant precondition would be the source file exists but cannot be read due to repository permissions. The question instead describes a path points to a file deleted after the search index was built.
D:This measure fits a different trigger: the file parser crashes on an unsupported encoding. In that setting, An encoding-specific response directs the workflow to conversion or review instead of claiming the file contains no data; it does not resolve the present need to expose stale index or missing resource state.
Question 207
An enterprise design team compares agent organization patterns for different requests. A legal review cannot begin until a contract-clause extractor finishes. How should the workflow be adjusted?
- Delegate independent evidence collection then combine results in a coordinator
- Route disputed findings to a reviewer or human decision before publication
- Use sequential stages with explicit prerequisite checks
- Use one constrained model call instead of a multi-agent chain
Explanation
Correct Answer
C:The second stage depends on verified clauses, so parallel dispatch would let it act on absent or provisional data. The relevant requirement is to preserve hard ordering constraints, and this measure operates at that decision point.
Incorrect Answers
A:This topology exploits concurrency without letting each worker independently publish a different final answer; the alternative would make sense if an investigation has three independent evidence streams and one final answer. It does not directly fix the observed condition: a legal review cannot begin until a contract-clause extractor finishes.
B:When research outputs frequently conflict and need judgment beyond automated rules, this would be useful because uncertain conflicts should be surfaced and resolved by an accountable stage rather than concealed by the model's confidence; this item instead calls for a way to preserve hard ordering constraints.
D:Simple classification has no meaningful subtask parallelism; multiple agents add latency and reconciliation cost without improving the required outcome; the relevant precondition would be a small deterministic classification needs no external calls. The question instead describes a legal review cannot begin until a contract-clause extractor finishes.
Question 208
An engineering assistant investigates a large repository with long context demands. A summary says a function was removed but contains no commit or path evidence. Which implementation decision is the best fit?
- Record source revision and file or symbol location alongside the claim
- Search for relevant symbols, read selected spans, and keep a file map
- Provide a compact task-state recap with affected files, assumptions, and unresolved work
- Audit compacted state against a checklist of nonnegotiable rules
Explanation
Correct Answer
A:Code facts change over time; a reference to the inspected revision makes the assertion auditable. Here it serves the explicit need to preserve verifiable repository provenance without adding a separate unverified inference.
Incorrect Answers
B:Targeted context reduces distraction and helps Claude reason about the specific implementation rather than unrelated files; the relevant precondition would be repeatedly pasting whole files into one conversation makes later reasoning unreliable. The question instead describes a summary says a function was removed but contains no commit or path evidence.
C:Explicit state restoration prevents old side discussions from becoming accidental requirements for the current fix; the alternative would make sense if a developer returns to a bug after several unrelated investigations. It does not directly fix the observed condition: a summary says a function was removed but contains no commit or path evidence.
D:When a critical security constraint disappears after context compaction, this would be useful because compaction should reduce volume, not silently remove guardrails necessary for safe continuation; this item instead calls for a way to preserve verifiable repository provenance.
Question 209
A document-extraction service must report the state of every processed page. A semantic validator detects inconsistent tax arithmetic. What should the architect specify in the design?
- Use document identity to prevent reuse of unrelated cached outputs
- Return valid page results and flag page nine for targeted correction
- Return expected and observed totals with a validation-failure code
- Return an explicit missing-required-field failure
Explanation
Correct Answer
C:Specific diagnostics help corrective steps distinguish arithmetic conflict from parser failure or missing pages. This matches the workflow goal to surface the exact violated rule rather than introducing an unrelated action.
Incorrect Answers
A:This measure fits a different trigger: a conversion worker crashes but a coordinator has cached its last successful output from another document. In that setting, Cached success for a different input is not a valid substitute; identity-bound artifacts prevent accidental data contamination; it does not resolve the present need to surface the exact violated rule.
B:Page-level status avoids losing successful extraction while preventing the unreadable page from being misrepresented as verified; the relevant precondition would be eight pages are parsed, but page nine contains unreadable characters. The question instead describes a semantic validator detects inconsistent tax arithmetic.
D:A ledger-ready record must satisfy required business fields; a syntactically partial result cannot silently pass to commit; the alternative would make sense if a required identity field is missing from the extracted record. It does not directly fix the observed condition: a semantic validator detects inconsistent tax arithmetic.
Question 210
An invoice-extraction workflow must recover from malformed output. The invoice number appears in two places with different values. Which change most directly addresses this condition?
- Mark the conflict and request human clarification with both source locations
- Stop after the configured retry limit and return a review-needed state
- Require evidence or field-level source matching for supplier identity
- Run business-rule arithmetic validation and request targeted correction
- Report the mismatched field and constraint, then retry within a bounded policy
Explanation
Correct Answer
A:A retry cannot resolve contradictory evidence by itself; the ambiguity belongs in review rather than arbitrary selection.
Incorrect Answers
B:This measure fits a different trigger: the model has failed the same correction twice. In that setting, Unlimited repair attempts can waste resources and may still fabricate a plausible record; bounded retries preserve reliability; it does not resolve the present need to escalate ambiguous source evidence rather than guess.
C:When a corrected output has valid JSON but an invented supplier name, this would be useful because syntax repair does not imply factual correctness; source-backed validation checks whether each critical value is actually present; this item instead calls for a way to escalate ambiguous source evidence rather than guess.
D:A valid numeric type does not prove accounting consistency; arithmetic rules catch errors outside the schema's expressiveness; the alternative would make sense if an extracted total passes type validation but does not equal subtotal plus taxes. It does not directly fix the observed condition: the invoice number appears in two places with different values.
E:Specific schema errors give the model a repair target; blindly regenerating without feedback repeats the same failure mode; the relevant precondition would be a tool payload is not valid against the required JSON Schema. The question instead describes the invoice number appears in two places with different values.