Question 350
An invoice-extraction workflow must recover from malformed output. The model has failed the same correction twice. How should the workflow be adjusted?
- Stop after the configured retry limit and return a review-needed state
- Report the mismatched field and constraint, then retry within a bounded policy
- Require evidence or field-level source matching for supplier identity
- Run business-rule arithmetic validation and request targeted correction
- Mark the conflict and request human clarification with both source locations
Explanation
Correct Answer
A:Unlimited repair attempts can waste resources and may still fabricate a plausible record; bounded retries preserve reliability.
Incorrect Answers
B:For the separate situation where a tool payload is not valid against the required JSON Schema, specific schema errors give the model a repair target; blindly regenerating without feedback repeats the same failure mode; the current task is to bound the repair loop and surface failure.
C:Syntax repair does not imply factual correctness; source-backed validation checks whether each critical value is actually present; the alternative would make sense if a corrected output has valid JSON but an invented supplier name. It does not directly fix the observed condition: the model has failed the same correction twice.
D:This control matters when an extracted total passes type validation but does not equal subtotal plus taxes; a valid numeric type does not prove accounting consistency; arithmetic rules catch errors outside the schema's expressiveness. The required decision is different: the model has failed the same correction twice.
E:A retry cannot resolve contradictory evidence by itself; the ambiguity belongs in review rather than arbitrary selection; that assumes the invoice number appears in two places with different values. The item tests the different ability to bound the repair loop and surface failure.
Question 351
A Claude Agent SDK application maintains long-running support sessions. The resumed session references an order whose refund status may have changed. Which implementation decision is the best fit?
- Fork the session for a separate review path
- Use the saved session identity and recover relevant persisted messages
- Store session identifiers and required checkpoints in a durable backing store
- Query the authoritative order service before another financial decision
Explanation
Correct Answer
D:Conversation memory is not a transactional system; live order status takes precedence over stale statements in a transcript.
Incorrect Answers
A:This control matters when a supervisor wants an independent second assessment without overwriting the original; a fork preserves a common starting context while allowing a different conclusion or investigation without corrupting the original trail. The required decision is different: the resumed session references an order whose refund status may have changed.
B:For the separate situation where a returning customer asks about a previously paused case with the same conversation state, resumption preserves continuity for the same case, provided the application verifies authorization and current account state; the current task is to recheck mutable facts after session restore.
C:Recoverable state allows orchestration to continue after host failure, unlike in-memory variables lost on restart; the alternative would make sense if a long-running session needs to survive application restarts. It does not directly fix the observed condition: the resumed session references an order whose refund status may have changed.
Question 352
A design review automates multi-stage document and code checks. A final reviewer needs both lint and tests to pass. What should the architect specify in the design?
- Use an explicit test checklist and deterministic execution order
- Stop dependent deployment stages and report the failed security gate
- Use budgeted iterative retrieval with stopping conditions
- Use a join gate that requires successful results from both checks
Explanation
Correct Answer
D:Approval before every prerequisite completes risks accepting a change that violates an unchecked requirement. This matches the workflow goal to synchronize before approval rather than introducing an unrelated action.
Incorrect Answers
A:For the separate situation where a fixed compliance check requires a predictable list of tests, stable compliance steps should be reproducible in code, with Claude assisting individual reasoning tasks rather than inventing the pipeline; the current task is to synchronize before approval.
B:A blocker should halt stages that cannot succeed safely; continuing merely consumes resources and may create risk; the alternative would make sense if a failed security check makes downstream deployment work irrelevant. It does not directly fix the observed condition: a final reviewer needs both lint and tests to pass.
C:This control matters when a novel repository may require more or fewer search steps; unknown structure calls for conditional exploration, but it must not continue indefinitely after finding sufficient evidence. The required decision is different: a final reviewer needs both lint and tests to pass.
Question 353
An engineering company integrates Claude Code into a secure CI workflow. A build reports a Claude-generated pass despite skipped unit tests. Which change most directly addresses this condition?
- Use schema-checked JSON findings with severity and source locations
- Use separate restricted runners or permission scopes for untrusted PR analysis
- Record the revision, prompt configuration, and tool versions for each run
- Gate success on actual test and lint exit statuses, not the assistant's assertion
Explanation
Correct Answer
D:A generated summary is evidence to inspect, not a replacement for deterministic pipeline results. Here it serves the explicit need to make CI status depend on independent checks without adding a separate unverified inference.
Incorrect Answers
A:This control matters when the pipeline requires a stable format for severity, path, and line number; a validated contract lets downstream code render and deduplicate findings without trusting prose extraction. The required decision is different: a build reports a Claude-generated pass despite skipped unit tests.
B:A model that reads untrusted code should not share a security boundary with credentials capable of changing production; the alternative would make sense if the reviewer has access to production deployment credentials through the runner image. It does not directly fix the observed condition: a build reports a Claude-generated pass despite skipped unit tests.
C:Traceable inputs help explain why findings changed and distinguish code changes from changes in review configuration; that assumes a nightly review compares generated findings with a baseline. The item tests the different ability to make CI status depend on independent checks.
Question 354
A company processes thousands of independent documents through Claude. One batch item fails while the remaining documents complete. What is the most defensible next step?
- Submit independent requests as a batch and reconcile completed results later
- Record per-request success or error and retry only eligible failures
- Record the document revision or digest with each submitted request
- Attach stable custom identifiers and reconcile outputs with the submission manifest
Explanation
Correct Answer
B:A batch is not necessarily all-or-nothing; item-level bookkeeping avoids rerunning already successful documents. This matches the workflow goal to handle partial failure by item rather than introducing an unrelated action.
Incorrect Answers
A:For the separate situation where each document is self-contained and does not require an immediate interactive response, batch execution suits large offline workloads where delayed completion is acceptable and each request has its own input and output identity; the current task is to handle partial failure by item.
C:Versioned input identity ensures results are interpreted against the data actually sent, not a later file with different contents; the alternative would make sense if the source file changes after the batch is submitted. It does not directly fix the observed condition: one batch item fails while the remaining documents complete.
D:Result ordering alone may not match input ordering; explicit IDs prevent extracted data being assigned to the wrong document; that assumes thousands of batch results must be matched back to source documents. The item tests the different ability to handle partial failure by item.
Question 355
An internal knowledge system is being exposed through the Model Context Protocol. A connection returns JSON records and images through multiple content parts. Which approach satisfies the stated constraint?
- Handle MCP content blocks according to their declared type instead of flattening everything to text
- Refresh or version the resource reference when content changes
- Expose the query as an MCP tool with a defined input schema
- Expose the document as an MCP resource with suitable identity and content type
- Publish a parameterized MCP prompt for the triage workflow
Explanation
Correct Answer
A:Typed content lets a client interpret data faithfully and prevents binary or structured outputs from being silently mangled.
Incorrect Answers
B:A retrievable resource is not permanently immutable; current source identity is necessary for reliable policy decisions; the alternative would make sense if a resource URI resolves to a newer policy than the model saw earlier. It does not directly fix the observed condition: a connection returns JSON records and images through multiple content parts.
C:For the separate situation where Claude must actively run a database query with parameters, tools are callable actions with arguments; a parameterized database operation is not just a static document resource; the current task is to preserve content type and structured payload boundaries.
D:This control matters when the assistant needs to read the contents of a stable policy document; resources are suited to retrievable data; they do not by themselves encode an arbitrary side-effecting invocation. The required decision is different: a connection returns JSON records and images through multiple content parts.
E:Prompts package reusable instructions and messages, whereas a tool would imply executable service behavior; that assumes a team wants a reusable suggested workflow template for incident triage. The item tests the different ability to preserve content type and structured payload boundaries.
Question 356
An architect is reviewing Claude Code memory usage for a large engineering organization. A teammate edits private local guidance and expects it in code review. Which mechanism should be selected?
- Keep the billing convention in the billing project or scoped rule
- Put the shared standard in the repository-level CLAUDE.md
- Move genuinely team-wide requirements into version-controlled project guidance
- Reference the maintained build configuration rather than hard-code versions in memory
Explanation
Correct Answer
C:Local-only user notes may not travel with the repository; team enforcement needs a shared reviewed artifact. For the stated case, the check is whether the system can recognize that private and committed scopes differ; this approach supplies that control.
Incorrect Answers
A:This control matters when an instruction is mandatory only for the billing service; narrow placement keeps tasks in unrelated services from inheriting incompatible commands or assumptions. The required decision is different: a teammate edits private local guidance and expects it in code review.
B:A root project instruction communicates cross-cutting conventions without repeating them in every package; that assumes a convention applies to every service in the same monorepo. The item tests the different ability to recognize that private and committed scopes differ.
D:The build manifest is authoritative for version details; repeating values in instructions creates stale conflicting copies; the alternative would make sense if a rule changes frequently because its tool version is pinned elsewhere. It does not directly fix the observed condition: a teammate edits private local guidance and expects it in code review.
Question 357
A Claude Code team audits the quality of its persistent project instructions. The team wants Claude to know repository architecture without pasting full source files. What should be implemented at the appropriate boundary?
- Enforce the gate in CI or permission policy, while keeping guidance aligned
- Resolve the conflict and express one authoritative formatting rule
- Replace the secret with a safe placeholder and managed-secret guidance
- Summarize service boundaries and point to authoritative files for details
Explanation
Correct Answer
D:A navigational map improves codebase discovery while leaving large or frequently changing implementation text in its source files.
Incorrect Answers
A:Prompt instructions are not an authoritative security boundary; a required check should fail independently of the assistant's compliance; the alternative would make sense if one developer asks Claude Code to ignore a required security gate for speed. It does not directly fix the observed condition: the team wants Claude to know repository architecture without pasting full source files.
B:This control matters when two instruction files issue contradictory formatting requirements; conflicting directives can produce nondeterministic edits; a clear standard prevents wasted patch iterations. The required decision is different: the team wants Claude to know repository architecture without pasting full source files.
C:Persistent instructions may be read by agents and committed to version control; secrets do not belong in them; that assumes a temporary secret appears in a copied setup example. The item tests the different ability to provide a concise component map.
Question 358
A support team exposes several similar billing tools through an MCP server. Two tools have nearly identical names and descriptions despite different output formats. Which option best meets the operational need?
- Return a concise typed result with the required fields and stable meanings
- Write descriptions stating purpose, side effects, eligibility, and safe-use boundaries
- Differentiate names, descriptions, required inputs, and result semantics by real capability
- Describe the active-account limitation and expected error behavior in the tool contract
Explanation
Correct Answer
C:Precise boundaries are more effective than extra prompt reminders when Claude must select between overlapping functions.
Incorrect Answers
A:A narrow result format saves context and keeps downstream reasoning focused on validated data rather than incidental service metadata; the alternative would make sense if a tool returns a large raw object although callers need just three fields. It does not directly fix the observed condition: two tools have nearly identical names and descriptions despite different output formats.
B:For the separate situation where Claude often confuses a read-only balance lookup with a credit-issuance action, tool descriptions guide model selection; explicit mutation semantics reduce accidental use of a credit action for an informational request; the current task is to reduce selection ambiguity among similar tools.
D:A precondition affects whether the model should choose the tool; hiding it leads to avoidable failures and misleading answers; that assumes an account lookup can handle only active accounts, which is absent from its description. The item tests the different ability to reduce selection ambiguity among similar tools.
Question 359
A code review automation runs Claude Code on inbound pull requests. A reviewer finds a potential SQL-injection path in an unfamiliar module. What is the most appropriate design choice?
- Switch from review to authorized bounded editing and validation
- Use an interview or planning step to collect expected behavior
- Inspect tainted inputs, query construction, and existing parameterization
- Run allowed checks and inspect logs before proposing edits
Explanation
Correct Answer
C:Security findings require traceable evidence; a pattern match alone may yield a false positive or overlook mitigations.
Incorrect Answers
A:This control matters when a human explicitly requests a patch after reviewing generated suggestions; separation between analysis and implementation gives the maintainer control over when automated modifications occur. The required decision is different: a reviewer finds a potential SQL-injection path in an unfamiliar module.
B:Undefined success conditions make a code change hard to test; targeted questions can establish the missing contract; that assumes an agent is asked to review a feature without knowing its acceptance criteria. The item tests the different ability to investigate code flow before asserting a vulnerability.
D:Diagnostic evidence is needed to locate the cause; granting automatic write access in the discovery phase increases change risk; the alternative would make sense if a test suite is failing and the team wants diagnosis only. It does not directly fix the observed condition: a reviewer finds a potential SQL-injection path in an unfamiliar module.
Question 360
A support agent returns structured case-resolution decisions. The output includes free-text status that downstream logic cannot branch on. Which response is most reliable?
- Run policy and permission checks independently of JSON shape
- Include conditional reason fields tied to the decision status
- Use a controlled status enum plus an independent natural-language message
- Validate nonempty identifiers and documented format requirements
- Define typed decision, rationale, and policy-reference fields
Explanation
Correct Answer
C:Machines need stable state tokens, while humans need context; combining them in one free-form field weakens both uses.
Incorrect Answers
A:Structured output can be syntactically perfect while semantically unsafe; the execution boundary must reject unauthorized actions; the alternative would make sense if a decision object passes schema validation but requests an unauthorized refund. It does not directly fix the observed condition: the output includes free-text status that downstream logic cannot branch on.
B:This control matters when the model returns a Boolean eligibility flag but omits the reason for ineligibility; a yes/no value alone is often insufficient for safe escalation or customer communication when the answer is no. The required decision is different: the output includes free-text status that downstream logic cannot branch on.
D:Field-level constraints catch malformed records before downstream calls, although existence and authorization still require service checks; that assumes the response schema accepts any account ID string, including empty values. The item tests the different ability to separate machine state from user explanation.
E:For the separate situation where a refund decision needs a rationale plus a reviewed policy reference, a consistent structured record supports auditability and guards against free-form messages that omit why the decision was made; the current task is to separate machine state from user explanation.