Question 110
The current design of a production API pipeline does not adequately identify rising error rates and latency after launch. Which improvement resolves the gap?
- Instrument production observability
- Separate development, staging, and production environments
- Set a maintenance and deprecation plan
- Implement automated regression tests
Explanation
Correct Answer
A:Logs, metrics, traces, and alert thresholds reveal operational failures at the right layer; this behavior directly supports the need to identify rising error rates and latency after launch. User feedback alone arrives too late for timely diagnosis.
Incorrect Answers
B:Environment boundaries keep credentials, data, and writes isolated during testing; despite being useful when a service must exercise an agent's database tool without touching live customer records, it is not a solution to identify rising error rates and latency after launch; reusing production tokens in a local experiment defeats the separation.
C:For the alternate objective to keep an integration functional when a pinned model version approaches retirement, a dependency inventory and upgrade schedule create time for evaluation and migration; the feature here must identify rising error rates and latency after launch, and indefinite reliance on a model identifier can become an outage risk.
D:Repeatable cases compare changes against documented acceptance criteria; this applies to the different goal to catch schema and policy failures after a model or tool update, not the requirement to identify rising error rates and latency after launch; a single successful demonstration provides little protection against regressions.
Question 111
A team maintaining a backend integration needs to continue the agent loop when Claude is waiting for external observations. Which implementation most directly satisfies the requirement?
- Handle the tool_use stop_reason
- Handle a refusal stop_reason safely
- Handle the max_tokens stop_reason
- Call the Messages API with explicit model and max_tokens
Explanation
Correct Answer
A:This stop reason means tool calls need to be executed and their results returned before synthesis; this behavior directly supports the need to continue the agent loop when Claude is waiting for external observations. Terminating at this point strands an unfinished task.
Incorrect Answers
B:A refusal is a deliberate non-completion path that requires a defined application response; the supported outcome is to avoid parsing safety refusals as valid JSON business records, whereas this scenario requires the ability to continue the agent loop when Claude is waiting for external observations; repeatedly increasing the token limit does not resolve a content refusal.
C:This approach serves the separate need to recover a response that ended because its output budget was exhausted because the finish reason identifies truncation, so a caller may need a continuation or a revised token budget; it does not establish the outcome to continue the agent loop when Claude is waiting for external observations, and treating that response as a complete answer can hide missing fields.
D:A message request identifies the target model, a message list, and an output-token ceiling; despite being useful when a service must return an answer to a short user request through a backend service, it is not a solution to continue the agent loop when Claude is waiting for external observations; the API is not a stateful chat session unless prior turns are supplied.
Question 112
A design review identifies a missing capability in a workflow automation project: it must let Claude continue after a client tool returns a transaction status. Which change meets that goal?
- Forward tool_result blocks with matching identifiers
- Use a durable session store
- Return a structured tool error to the model
- Preserve assistant tool-use content in conversation history
Explanation
Correct Answer
A:Results must reference the corresponding tool_use IDs and be included in the next conversation turn; this behavior directly supports the need to let Claude continue after a client tool returns a transaction status. Sending a human-readable summary without the tool correlation can break the protocol.
Incorrect Answers
B:This approach serves the separate need to recover agent state when a container restarts during a lengthy customer case because external persistence holds the conversation and workflow metadata needed to resume safely; it does not establish the outcome to let Claude continue after a client tool returns a transaction status, and process-local variables disappear with the worker.
C:Tool-result errors surface the failure without impersonating a successful action; despite being useful when a service must recover from a failed search while preserving the agent's chance to choose another path, it is not a solution to let Claude continue after a client tool returns a transaction status; silently dropping a failed tool response leaves the model without a valid observation.
D:For the alternate objective to maintain a valid transcript when the model requests multiple tools, the next request retains the assistant message containing tool_use blocks before providing their user-role tool_result blocks; the feature here must let Claude continue after a client tool returns a transaction status, and dropping that assistant turn loses the linkage required for continuation.
Question 113
A production-readiness check for an agent extensibility component requires the service to speed up independent product lookups without racing dependent account updates. Which approach passes this check?
- Map tool_use IDs to results
- Restrict tool network credentials
- Handle parallel tool requests carefully
- Write task-specific tool descriptions
- Add an approval boundary before sensitive writes
Explanation
Correct Answer
C:Independent reads can run concurrently but dependent mutations need ordering or transactions; this behavior directly supports the need to speed up independent product lookups without racing dependent account updates. Unconditional parallel dispatch can violate business invariants.
Incorrect Answers
A:Correlation IDs connect each observation to the exact invocation that requested it; the supported outcome is to support multiple simultaneous lookups without mixing their responses, whereas this scenario requires the ability to speed up independent product lookups without racing dependent account updates; pairing results by arrival order is unsafe under concurrency.
B:This approach serves the separate need to stop a directory lookup function from also gaining unrestricted database write access because minimal capabilities reduce risk when generated arguments or retrieved text are hostile; it does not establish the outcome to speed up independent product lookups without racing dependent account updates, and better prompt wording does not remove excess infrastructure permissions.
D:For the alternate objective to let Claude distinguish a read-only invoice lookup from an invoice update, clear capabilities and side effects guide tool selection without granting new authority; the feature here must speed up independent product lookups without racing dependent account updates, and vague overlapping descriptions increase erroneous calls.
E:Authorization by a user or operator can be enforced before the executor commits changes; this applies to the different goal to prevent a helpful assistant from issuing refunds automatically, not the requirement to speed up independent product lookups without racing dependent account updates; a note in the model's prompt is not a transaction approval.
Question 114
A design review identifies a missing capability in a backend integration project: it must verify that a real staging tool and its API contract work together. Which change meets that goal?
- Validate webhook signatures
- Use explicit HTTP method semantics
- Separate integration tests from unit tests
- Validate JSON before deserialization
Explanation
Correct Answer
C:Integration tests exercise boundaries and serialization that isolated mocks may miss; this behavior directly supports the need to verify that a real staging tool and its API contract work together. Unit tests can pass while authentication or payload mapping is broken.
Incorrect Answers
A:This approach serves the separate need to reject forged callbacks from an external asynchronous job service because cryptographic verification checks the sender and payload integrity before processing the event; it does not establish the outcome to verify that a real staging tool and its API contract work together, and accepting any POST with the expected JSON fields permits spoofing.
B:GET should retrieve resources while state changes use appropriate mutation methods and authorization checks; despite being useful when a service must prevent a supposedly read-only status lookup from changing a server-side record, it is not a solution to verify that a real staging tool and its API contract work together; putting write behavior behind a read endpoint undermines predictable retry and caching semantics.
D:A parser and schema validator catch missing types and invalid syntax before side effects; this applies to the different goal to reject a malformed tool argument payload before calling a payroll service, not the requirement to verify that a real staging tool and its API contract work together; model-generated text is not trustworthy merely because it looks structured.
Question 115
An architecture review of a workflow automation product lists two distinct outcomes: the first subsystem must let Claude continue after a client tool returns a transaction status, and a second subsystem must serve many tenants without mixing their tool outputs or prior messages. Which pair delivers these outcomes?
- First component: Forward tool_result blocks with matching identifiers. Second component: Keep user-specific state out of a shared agent process.
- First component: Return a structured tool error to the model. Second component: Implement a custom Messages API tool loop.
- First component: Forward tool_result blocks with matching identifiers. Second component: Return a structured tool error to the model.
- First component: Implement a custom Messages API tool loop. Second component: Keep user-specific state out of a shared agent process.
Explanation
Correct Answer
A:The first proposal fits its assigned role because results must reference the corresponding tool_use IDs and be included in the next conversation turn, while the second proposal fits its assigned role because per-request identity and session boundaries prevent cross-tenant context leakage; their respective acceptance criteria are to let Claude continue after a client tool returns a transaction status and to serve many tenants without mixing their tool outputs or prior messages.
Incorrect Answers
B:The first proposal serves the different purpose to recover from a failed search while preserving the agent's chance to choose another path instead of the assigned first role because tool-result errors surface the failure without impersonating a successful action, while the second proposal serves the different purpose to retain complete control over a small set of proprietary tool calls and their execution order instead of the assigned second role because the application receives tool requests, validates inputs, executes authorized functions, and sends tool results back; their respective acceptance criteria are to let Claude continue after a client tool returns a transaction status and to serve many tenants without mixing their tool outputs or prior messages.
C:The first proposal fits its assigned role because results must reference the corresponding tool_use IDs and be included in the next conversation turn, while the second proposal serves the different purpose to recover from a failed search while preserving the agent's chance to choose another path instead of the assigned second role because tool-result errors surface the failure without impersonating a successful action; their respective acceptance criteria are to let Claude continue after a client tool returns a transaction status and to serve many tenants without mixing their tool outputs or prior messages.
D:The first proposal serves the different purpose to retain complete control over a small set of proprietary tool calls and their execution order instead of the assigned first role because the application receives tool requests, validates inputs, executes authorized functions, and sends tool results back, while the second proposal fits its assigned role because per-request identity and session boundaries prevent cross-tenant context leakage; their respective acceptance criteria are to let Claude continue after a client tool returns a transaction status and to serve many tenants without mixing their tool outputs or prior messages.
Question 116
A latency optimization review asks the team to close two unrelated gaps without merging their execution paths. Service A must implement an interactive collaboration channel requiring messages in both directions; service B must keep integration behavior aligned with a supported request contract. Which paired remediation works?
- First component: Choose WebSockets for bidirectional realtime exchange. Second component: Send an API version header where required.
- First component: Send the correct API authentication header. Second component: Choose SSE for one-way streamed responses.
- First component: Choose SSE for one-way streamed responses. Second component: Send an API version header where required.
- First component: Choose WebSockets for bidirectional realtime exchange. Second component: Send the correct API authentication header.
Explanation
Correct Answer
A:The first proposal fits its assigned role because persistent two-way channels fit interactive event exchange where the client also sends messages during a session, while the second proposal fits its assigned role because explicit protocol versioning makes the caller's expected API semantics unambiguous; their respective acceptance criteria are to implement an interactive collaboration channel requiring messages in both directions and to keep integration behavior aligned with a supported request contract.
Incorrect Answers
B:The first proposal serves the different purpose to avoid unauthenticated model requests from a backend worker instead of the assigned first role because the API validates the provided credential before accepting a request, while the second proposal serves the different purpose to deliver tokens to a browser without maintaining a bidirectional command channel instead of the assigned second role because server-sent events provide ordered server-to-client updates over an HTTP stream; their respective acceptance criteria are to implement an interactive collaboration channel requiring messages in both directions and to keep integration behavior aligned with a supported request contract.
C:The first proposal serves the different purpose to deliver tokens to a browser without maintaining a bidirectional command channel instead of the assigned first role because server-sent events provide ordered server-to-client updates over an HTTP stream, while the second proposal fits its assigned role because explicit protocol versioning makes the caller's expected API semantics unambiguous; their respective acceptance criteria are to implement an interactive collaboration channel requiring messages in both directions and to keep integration behavior aligned with a supported request contract.
D:The first proposal fits its assigned role because persistent two-way channels fit interactive event exchange where the client also sends messages during a session, while the second proposal serves the different purpose to avoid unauthenticated model requests from a backend worker instead of the assigned second role because the API validates the provided credential before accepting a request; their respective acceptance criteria are to implement an interactive collaboration channel requiring messages in both directions and to keep integration behavior aligned with a supported request contract.
Question 117
The current design of a backend integration pipeline does not adequately reject a numeric quote that is syntactically valid but outside the permitted range. Which improvement resolves the gap?
- Add cancellation handling to streaming UI
- Handle empty and partial model responses
- Keep user tasks in the user message
- Validate semantic business constraints after parsing
- Create one session per user conversation
Explanation
Correct Answer
D:Application logic must enforce business rules even after schema-valid output is produced; this behavior directly supports the need to reject a numeric quote that is syntactically valid but outside the permitted range. Valid JSON does not prove that an amount is permitted or accurate.
Incorrect Answers
A:Cancellation signals should propagate through streams, queues, and workers where supported; despite being useful when a service must stop processing when a user cancels a long report and release resources cleanly, it is not a solution to reject a numeric quote that is syntactically valid but outside the permitted range; hiding the browser output alone may leave paid requests running.
B:For the alternate objective to keep a downstream parser from crashing when a request returns no usable text block, content-aware response handling checks block types, stop reasons, and required values before proceeding; the feature here must reject a numeric quote that is syntactically valid but outside the permitted range, and assuming every message contains a single complete text string is unsafe.
C:Explicit message roles distinguish requested work from higher-priority operational framing; this applies to the different goal to separate an end user's request from the developer's stable operating instructions, not the requirement to reject a numeric quote that is syntactically valid but outside the permitted range; merging everything into one unstructured prompt weakens provenance.
E:Session scoping ensures history and tool results belong to the correct principal; the supported outcome is to keep follow-up requests linked without exposing another tenant's messages, whereas this scenario requires the ability to reject a numeric quote that is syntactically valid but outside the permitted range; a global conversation list risks mixing private records.
Question 118
A design review identifies a missing capability in an application security project: it must display generated customer notes safely in a browser. Which change meets that goal?
- Use output escaping to prevent XSS
- Add an explicit export approval check
- Minimize personally identifiable information
- Scope database credentials by tenant and operation
Explanation
Correct Answer
A:Context-aware encoding prevents text from being interpreted as active HTML or JavaScript; this behavior directly supports the need to display generated customer notes safely in a browser. An instruction to the model not to write scripts is not a rendering control.
Incorrect Answers
B:A separate authorization or human approval step can gate high-impact operations; despite being useful when a service must prevent unreviewed bulk downloads triggered by an agent's tool plan, it is not a solution to display generated customer notes safely in a browser; the model's confidence in its own plan does not grant export permission.
C:For the alternate objective to avoid transmitting unnecessary customer identifiers with a summarization request, redaction and selective fields reduce exposure before data enters model or logging paths; the feature here must display generated customer notes safely in a browser, and logging every full prompt can defeat otherwise careful minimization.
D:Least-privilege identity limits the damage from a manipulated tool call; this applies to the different goal to prevent a read-only support tool from modifying billing tables, not the requirement to display generated customer notes safely in a browser; a broad administrator token bypasses application intent.
Question 119
During acceptance testing for an agent governance service, one requirement is to stop an unauthenticated user from invoking a dangerous account-management tool. What should the developer implement?
- Require verified identity for privileged actions
- Deploy content moderation and escalation
- Enforce least-privilege tool permissions
- Run adversarial prompt-injection tests
Explanation
Correct Answer
A:Authentication establishes the caller before authorization policies consider requested permissions; this behavior directly supports the need to stop an unauthenticated user from invoking a dangerous account-management tool. Asking the model to remember a user's name is not identity verification.
Incorrect Answers
B:A defined moderation workflow handles uncertain or sensitive material according to business policy; the supported outcome is to route borderline high-risk requests to a review process instead of automatic publication, whereas this scenario requires the ability to stop an unauthenticated user from invoking a dangerous account-management tool; blocking every ambiguous input may be unnecessarily disruptive.
C:This approach serves the separate need to let a support assistant read shipment status without issuing refunds because restricted scopes and read-only interfaces limit impact if a tool request is manipulated; it does not establish the outcome to stop an unauthenticated user from invoking a dangerous account-management tool, and role language in the prompt cannot prevent an overprivileged API token from writing.
D:Purposeful hostile test cases probe whether the trust boundary holds under manipulated evidence; despite being useful when a service must find vulnerabilities in a retrieval-augmented assistant before it accesses production tools, it is not a solution to stop an unauthenticated user from invoking a dangerous account-management tool; ordinary happy-path tests rarely exercise attacker instructions.
Question 120
Engineers are splitting a document processing service into two independently tested functions. Function A must keep deployment behavior stable while evaluating new model releases separately, while function B must constrain a repository coding assistant's allowed tools and execution behavior. Which plan is sound?
- First component: Pin a tested model identifier. Second component: Use settings.json for Claude Code permissions.
- First component: Pin a tested model identifier. Second component: Put repository guidance in CLAUDE.md.
- First component: Track MCP server versions and contracts. Second component: Use settings.json for Claude Code permissions.
- First component: Put repository guidance in CLAUDE.md. Second component: Track MCP server versions and contracts.
Explanation
Correct Answer
A:The first proposal fits its assigned role because explicit model versions support reproducibility and controlled migrations, while the second proposal fits its assigned role because permission settings define configurable controls for Claude Code rather than merely describing preferences; their respective acceptance criteria are to keep deployment behavior stable while evaluating new model releases separately and to constrain a repository coding assistant's allowed tools and execution behavior.
Incorrect Answers
B:The first proposal fits its assigned role because explicit model versions support reproducibility and controlled migrations, while the second proposal serves the different purpose to give Claude Code the project's build, test, and architecture conventions instead of the assigned second role because repository memory files provide persistent instructional context to coding sessions; their respective acceptance criteria are to keep deployment behavior stable while evaluating new model releases separately and to constrain a repository coding assistant's allowed tools and execution behavior.
C:The first proposal serves the different purpose to keep external tool connectors compatible after client upgrades instead of the assigned first role because declared versions and integration tests expose resource or schema changes before deployment, while the second proposal fits its assigned role because permission settings define configurable controls for Claude Code rather than merely describing preferences; their respective acceptance criteria are to keep deployment behavior stable while evaluating new model releases separately and to constrain a repository coding assistant's allowed tools and execution behavior.
D:The first proposal serves the different purpose to give Claude Code the project's build, test, and architecture conventions instead of the assigned first role because repository memory files provide persistent instructional context to coding sessions, while the second proposal serves the different purpose to keep external tool connectors compatible after client upgrades instead of the assigned second role because declared versions and integration tests expose resource or schema changes before deployment; their respective acceptance criteria are to keep deployment behavior stable while evaluating new model releases separately and to constrain a repository coding assistant's allowed tools and execution behavior.