Question 480
A support workflow handles errors from external services. A customer-facing workflow receives a detailed internal stack trace. How should the workflow be adjusted?
- Propagate an unavailable-service error and avoid a negative factual assertion
- Query the transaction ledger by idempotency key before retrying
- Stop the action and route to the approved access process
- Treat a validated empty optional field as data, not a tool outage
- Convert the exception to a safe user-facing status and retain trace IDs internally
Explanation
Correct Answer
E:The user needs an accurate next step, not sensitive implementation paths or credentials embedded in a service error.
Incorrect Answers
A:This choice is relevant when the order API times out and the agent states the customer has no order; a failed query provides no evidence that a record is absent; the customer should receive an honest temporary-status response. Here, however, a customer-facing workflow receives a detailed internal stack trace.
B:Unknown delivery of a response is not proof the operation failed; reconciliation prevents duplicate financial effects; the benefit is tied to a refund call may have succeeded before its network connection dropped. It is not the immediate control for the need to avoid leaking operational details.
C:For the separate situation where a backend returns a permanent account-permission denial, a fixed permission constraint is not repaired by exponential backoff; repeated calls can add noise without changing authority; the current task is to avoid leaking operational details.
D:An expected empty value is distinct from execution failure; confusing them causes unnecessary recovery attempts; it is a safeguard for a policy lookup returns a valid empty result for an optional note, not the specific situation described: a customer-facing workflow receives a detailed internal stack trace.
Question 481
An organization wants scoped Claude Code instructions without huge root prompts. Developers accidentally commit secrets in test-fixture paths. Which implementation decision is the best fit?
- Enforce secret scanning in CI for the affected files
- Target only the legacy module rather than the repository root
- Apply documentation rules only to matching Markdown paths
- Create a dedicated rule for migration directories and file patterns
Explanation
Correct Answer
A:Path-specific instructions may remind Claude, but only a scanner or policy gate reliably blocks forbidden content before merge.
Incorrect Answers
B:For the separate situation where a rule is needed only for a deprecated module kept for compatibility, a narrow rule preserves compatibility requirements without imposing obsolete practices on active packages; the current task is to use a deterministic secret gate as well as scope hints.
C:File targeting communicates when a doc-specific tool is relevant and prevents it displacing source-code tests; it is a safeguard for documentation files use a distinct formatting standard, not the specific situation described: developers accidentally commit secrets in test-fixture paths.
D:This choice is relevant when database migration files need extra review beyond normal code; targeted rules add critical checks when touching migrations without burdening unrelated UI tasks. Here, however, developers accidentally commit secrets in test-fixture paths.
Question 482
A code assistant must choose among repository inspection and execution tools. A scanner output must be checked for known-risk entries before publishing. What should the architect specify in the design?
- Restrict edits and shell working directory to the authorized path
- Allow file reads and searches while withholding file-edit tools
- Give the scanner read access and leave release operations to the pipeline gate
- Use repository search or symbol discovery on the relevant scope
Explanation
Correct Answer
C:A worker that inspects risk should not control whether risky artifacts are published, especially before independent evaluation.
Incorrect Answers
A:For the separate situation where a test-fix worker has permission to edit only a small package, worker-specific file boundaries reduce the risk that a narrowly assigned fix changes unrelated services; the current task is to separate inspection from release permissions.
B:A planning phase should not silently mutate the workspace before the human approves the proposed patch; it is a safeguard for a configuration change must be proposed but not written until review, not the specific situation described: a scanner output must be checked for known-risk entries before publishing.
D:This choice is relevant when an engineer only asks which files define an interface by name; name-location tasks need index or text inspection; shell execution is unnecessary and may introduce side effects. Here, however, a scanner output must be checked for known-risk entries before publishing.
Question 483
An internal knowledge system is being exposed through the Model Context Protocol. A resource URI resolves to a newer policy than the model saw earlier. Which change most directly addresses this condition?
- Publish a parameterized MCP prompt for the triage workflow
- Expose the document as an MCP resource with suitable identity and content type
- Handle MCP content blocks according to their declared type instead of flattening everything to text
- Refresh or version the resource reference when content changes
Explanation
Correct Answer
D:A retrievable resource is not permanently immutable; current source identity is necessary for reliable policy decisions.
Incorrect Answers
A:Prompts package reusable instructions and messages, whereas a tool would imply executable service behavior; it is a safeguard for a team wants a reusable suggested workflow template for incident triage, not the specific situation described: a resource URI resolves to a newer policy than the model saw earlier.
B:Resources are suited to retrievable data; they do not by themselves encode an arbitrary side-effecting invocation; the benefit is tied to the assistant needs to read the contents of a stable policy document. It is not the immediate control for the need to avoid stale resource assumptions.
C:For the separate situation where a connection returns JSON records and images through multiple content parts, typed content lets a client interpret data faithfully and prevents binary or structured outputs from being silently mangled; the current task is to avoid stale resource assumptions.
Question 484
An AI research assistant prepares high-stakes organizational recommendations. A legal owner has explicitly delegated a narrow approved judgment. What is the most defensible next step?
- Mark the affected conclusion as unverified and request further review
- Execute the delegated decision inside the defined thresholds with an audit trail
- Apply documented style rules automatically and continue
- Request the applicable policy or route to its owner
Explanation
Correct Answer
B:Escalation should follow actual authority boundaries; needless handoffs for approved routine cases slow the system without improving safety.
Incorrect Answers
A:This choice is relevant when a key source is inaccessible and no equivalent evidence is available; the absence of a crucial source limits what the assistant can responsibly conclude; a plausible summary cannot replace verification. Here, however, a legal owner has explicitly delegated a narrow approved judgment.
C:For the separate situation where a minor stylistic issue does not affect factual or safety requirements, human review capacity is best reserved for consequential ambiguity; deterministic cosmetic corrections can be handled within the workflow; the current task is to respect scoped autonomy where evidence is sufficient.
D:An agent cannot safely invent an organization's normative requirements from generic patterns; it is a safeguard for a requested final verdict depends on a policy that has not been supplied, not the specific situation described: a legal owner has explicitly delegated a narrow approved judgment.
Question 485
An invoice-extraction workflow must recover from malformed output. A corrected output has valid JSON but an invented supplier name. Which approach satisfies the stated constraint?
- 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
- Stop after the configured retry limit and return a review-needed state
- Mark the conflict and request human clarification with both source locations
Explanation
Correct Answer
A:Syntax repair does not imply factual correctness; source-backed validation checks whether each critical value is actually present.
Incorrect Answers
B:A valid numeric type does not prove accounting consistency; arithmetic rules catch errors outside the schema's expressiveness; the benefit is tied to an extracted total passes type validation but does not equal subtotal plus taxes. It is not the immediate control for the need to verify high-value fields against document spans.
C:This choice is relevant when 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. Here, however, a corrected output has valid JSON but an invented supplier name.
D:For the separate situation where the model has failed the same correction twice, unlimited repair attempts can waste resources and may still fabricate a plausible record; bounded retries preserve reliability; the current task is to verify high-value fields against document spans.
E:A retry cannot resolve contradictory evidence by itself; the ambiguity belongs in review rather than arbitrary selection; it is a safeguard for the invoice number appears in two places with different values, not the specific situation described: a corrected output has valid JSON but an invented supplier name.
Question 486
A design review automates multi-stage document and code checks. A failed security check makes downstream deployment work irrelevant. Which mechanism should be selected?
- Use a join gate that requires successful results from both checks
- Use an explicit test checklist and deterministic execution order
- Stop dependent deployment stages and report the failed security gate
- Launch checks concurrently while preserving distinct result records
Explanation
Correct Answer
C:A blocker should halt stages that cannot succeed safely; continuing merely consumes resources and may create risk. Here it serves the explicit need to short-circuit on a blocking failure without adding a separate unverified inference.
Incorrect Answers
A:For the separate situation where a final reviewer needs both lint and tests to pass, approval before every prerequisite completes risks accepting a change that violates an unchecked requirement; the current task is to short-circuit on a blocking failure.
B:This choice is relevant when 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. Here, however, a failed security check makes downstream deployment work irrelevant.
D:Checks that read the same immutable revision can reduce total time without introducing dependency errors; it is a safeguard for independent lint and unit-test suites can run on an unchanged build, not the specific situation described: a failed security check makes downstream deployment work irrelevant.
Question 487
A moderation assistant must apply a policy rubric consistently. The few-shot examples are longer than the actual task input. What should be implemented at the appropriate boundary?
- Provide carefully labeled positive, negative, and borderline few-shot cases
- Include a minimal pair showing how the exception changes the judgment
- Keep a small set of examples that represent distinct failure modes
- Add counterexamples that show when the rule does not apply
Explanation
Correct Answer
C:Verbose demonstrations consume context; coverage of tricky distinctions matters more than repeating easy examples. The relevant requirement is to select compact, discriminating examples, and this measure operates at that decision point.
Incorrect Answers
A:This choice is relevant when the model mislabels positive, negative, and borderline cases; its prompt contains no labeled demonstrations; examples demonstrate how the rubric applies at the decision boundary and can reduce inconsistent interpretation of abstract policy text. Here, however, the few-shot examples are longer than the actual task input.
B:For the separate situation where a new exception is introduced to the policy, near-identical cases with different required outcomes can clarify the actual boundary introduced by a rule change; the current task is to select compact, discriminating examples.
D:One-sided examples bias the output; contrastive cases teach the difference between related categories; the benefit is tied to all examples in the prompt are easy positive cases. It is not the immediate control for the need to select compact, discriminating examples.
Question 488
A developer uses Claude Code to change a risky authentication module. The approved implementation has already been planned and reviewed. Which option best meets the operational need?
- Use plan mode to inspect the codebase and propose steps without applying edits
- Use read-only search and inspection to map the responsible files
- Perform the authorized edits and run the specified verification steps
- Present the plan and wait for authorization before enabling write operations
Explanation
Correct Answer
C:Once scope and approval are established, indefinite re-planning adds little value; controlled execution produces testable results.
Incorrect Answers
A:This choice is relevant when the engineer wants a proposed design and affected-file list before any modifications; read-only planning supports review of dependencies and risk before the team authorizes source changes. Here, however, the approved implementation has already been planned and reviewed.
B:An exploratory pass establishes architecture evidence; jumping into edits risks changing the wrong component; it is a safeguard for the team does not know where authorization is implemented, not the specific situation described: the approved implementation has already been planned and reviewed.
D:For the separate situation where a proposed refactor requires an explicit human go/no-go, a design review requirement is not satisfied merely by generating a plan if the next stage can still commit changes autonomously; the current task is to transition deliberately to bounded execution.
Question 489
A code analysis service accepts Claude-generated review findings. A review is structurally valid but flags a function absent from the repository. What is the most appropriate design choice?
- Use a typed finding schema that permits a null path only for global findings
- Declare an enum aligned to the triage system
- Verify referenced symbols and locations against the actual code revision
- Require an array of test strings or typed test objects
Explanation
Correct Answer
C:A well-formed schema cannot prove an architectural claim is true; source checks are still necessary. This matches the workflow goal to separate syntax validation from factual checking rather than introducing an unrelated action.
Incorrect Answers
A:This choice is relevant when a file path can be missing for repository-wide design findings; conditional optional fields prevent fabricated paths while retaining precise locations for line-specific defects. Here, however, a review is structurally valid but flags a function absent from the repository.
B:Controlled labels avoid synonyms that break deterministic routing and reporting; the benefit is tied to the pipeline needs severities that match its existing triage labels. It is not the immediate control for the need to separate syntax validation from factual checking.
D:Arrays are safer for downstream automation than a single comma-delimited paragraph that could be parsed ambiguously; it is a safeguard for a review record must contain an array of recommended tests, not the specific situation described: a review is structurally valid but flags a function absent from the repository.
Question 490
A document-processing agent invokes external services while extracting invoice fields. A tool schema requires a numeric invoice total but Claude supplies a string. Which response is most reliable?
- Validate tool output against the expected result contract before reasoning
- Track pending work in durable application state until the actual result arrives
- Apply a retry cap and bounded backoff outside the model
- Gate the payment tool behind authorization and confirmation before execution
- Validate tool-call inputs against the declared argument schema
Explanation
Correct Answer
E:Schema checking at the host boundary prevents type errors and unsafe side effects from malformed model-generated arguments.
Incorrect Answers
A:This choice is relevant when the OCR service sometimes returns an empty string rather than recognized text; an empty result may reflect OCR failure, not an intentionally blank invoice field; validation stops it being promoted to fact. Here, however, a tool schema requires a numeric invoice total but Claude supplies a string.
B:For the separate situation where tool execution takes several minutes, but the model has already emitted the request, a long-running call must not be represented as success before completion, especially where later steps depend on its output; the current task is to reject invalid tool arguments before invoking the service.
C:An application-owned retry policy prevents infinite loops and makes downstream reliability predictable under outages; the benefit is tied to an extraction workflow repeats one expensive tool call after a transient error. It is not the immediate control for the need to reject invalid tool arguments before invoking the service.
D:Prompt wording alone is not a reliable transaction guard; the execution layer must verify that the action is approved; it is a safeguard for a payment API can create a real charge, but model responses may be replayed, not the specific situation described: a tool schema requires a numeric invoice total but Claude supplies a string.