Question 570
A design review for a high-volume Messages API gateway asks for support to avoid silently treating a broken streaming connection as a complete answer, together with a way to use provider-hosted search or execution without implementing the tool body locally. Select the two appropriate changes. Choose TWO.
- Parse response content by block type and follow current thinking-field rules.
- Handle stop_reason max_tokens as truncation and continue or revise the limit.
- Configure an available server-side tool with the required API definition.
- Detect transport interruption and mark incomplete generated content.
- Enable streaming and consume server-sent events in order.
Explanation
Correct Answers
C:To use provider-hosted search or execution without implementing the tool body locally as part of a design that must also avoid silently treating a broken streaming connection as a complete answer, provider-executed tools are handled in Anthropic's environment and differ from client functions that the caller must run; this is why the action is one of the two required selections.
D:To avoid silently treating a broken streaming connection as a complete answer as part of a design that must also use provider-hosted search or execution without implementing the tool body locally, network termination before a final message event can leave a partial response, which needs explicit recovery rather than success handling; this is why the action is one of the two required selections.
Incorrect Answers
A:This alternative serves the separate goal to handle a response containing reasoning-related blocks without confusing them with ordinary final text because structured content may contain distinct block types and signatures; a parser that assumes only plain text can discard important protocol data; the required outcomes are instead to avoid silently treating a broken streaming connection as a complete answer and to use provider-hosted search or execution without implementing the tool body locally.
B:This alternative serves the separate goal to recover when a response ends because its generation budget was reached because a truncated completion may contain unfinished content, so treating it as a validated final answer risks losing required fields; the required outcomes are instead to avoid silently treating a broken streaming connection as a complete answer and to use provider-hosted search or execution without implementing the tool body locally.
E:This alternative serves the separate goal to show generated text progressively instead of waiting for the full response because streaming transmits partial deltas and completion events, allowing earlier display while requiring the client to assemble content safely; the required outcomes are instead to avoid silently treating a broken streaming connection as a complete answer and to use provider-hosted search or execution without implementing the tool body locally.
Question 571
A team maintaining a latency-sensitive model gateway has two different engineering requirements: (1) choose a cheaper model only when the workload-level economics improve, and (2) avoid overlooking slow tail requests hidden by a good average. Which TWO independent changes directly meet them? Choose TWO.
- Use asynchronous client methods and limit in-flight calls.
- Report p50, p95, and p99 latency by model and operation.
- Measure cache-write overhead against subsequent cache-read savings.
- Compare quality-adjusted cost per accepted result across candidate models.
- Route simple requests to a cheaper evaluated tier and escalate difficult ones.
Explanation
Correct Answers
B:To avoid overlooking slow tail requests hidden by a good average as part of a design that must also choose a cheaper model only when the workload-level economics improve, percentiles expose user experience at the tail and can reveal bottlenecks that a mean response time conceals; this is why the action is one of the two required selections.
D:To choose a cheaper model only when the workload-level economics improve as part of a design that must also avoid overlooking slow tail requests hidden by a good average, a lower token price can be offset by retries, higher failure rates, or excessive output, so accepted-result cost is the useful measure; this is why the action is one of the two required selections.
Incorrect Answers
A:This alternative serves the separate goal to keep a server responsive while several independent model calls wait on network I/O because event-loop based I/O overlaps waits, but rate and resource bounds are still necessary to avoid overload; the required outcomes are instead to choose a cheaper model only when the workload-level economics improve and to avoid overlooking slow tail requests hidden by a good average.
C:This alternative serves the separate goal to reduce repeated cost for a stable lengthy policy prefix reused many times because cache writes may cost extra while hits are cheaper; the reuse frequency determines whether the optimization saves money; the required outcomes are instead to choose a cheaper model only when the workload-level economics improve and to avoid overlooking slow tail requests hidden by a good average.
E:This alternative serves the separate goal to minimize average model cost when most requests are easy but some require deeper reasoning because cascading matches compute to task difficulty but requires a reliable escalation rule and measurement of misrouting; the required outcomes are instead to choose a cheaper model only when the workload-level economics improve and to avoid overlooking slow tail requests hidden by a good average.
Question 572
An operational review of a specialist-agent orchestration service reports distinct failures: it cannot plan another step only after inspecting the result of a requested external operation, and it cannot speed up independent data lookups without causing write-order races. Which two repairs are required? Choose TWO.
- Alternate model tool-use requests with tool results until completion.
- Run side-effect-free tool calls concurrently when their inputs are independent.
- Choose a graph-based orchestration framework when state transitions justify it.
- Define structured inputs, expected outputs, and failure states for each delegate.
- Compact prior progress into an accurate working summary.
Explanation
Correct Answers
A:To plan another step only after inspecting the result of a requested external operation as part of a design that must also speed up independent data lookups without causing write-order races, the loop returns observations to the model so subsequent decisions are informed by actual tool output rather than imagined execution; this is why the action is one of the two required selections.
B:To speed up independent data lookups without causing write-order races as part of a design that must also plan another step only after inspecting the result of a requested external operation, read-only independent calls can safely overlap; mutating operations need explicit ordering or concurrency control; this is why the action is one of the two required selections.
Incorrect Answers
C:This alternative serves the separate goal to coordinate explicit graph transitions among multiple model and tool nodes because graph orchestration clarifies conditional edges and resumability; it adds complexity when a short linear function would suffice; the required outcomes are instead to plan another step only after inspecting the result of a requested external operation and to speed up independent data lookups without causing write-order races.
D:This alternative serves the separate goal to prevent specialists from producing incompatible artifacts for the orchestrator because explicit delegation contracts make multi-agent integration testable; free-form handoffs often obscure whether a child finished its assigned task; the required outcomes are instead to plan another step only after inspecting the result of a requested external operation and to speed up independent data lookups without causing write-order races.
E:This alternative serves the separate goal to continue a long agent run after intermediate observations dominate the context because compaction preserves decisions and unresolved work while reducing token pressure; losing constraints in the summary can still cause errors; the required outcomes are instead to plan another step only after inspecting the result of a requested external operation and to speed up independent data lookups without causing write-order races.
Question 573
An architecture review of a multi-tenant support application asks how to keep a stalled upstream model call from occupying application resources indefinitely. Which action is the best fit?
- Log status, timing, and correlation IDs with sensitive fields redacted.
- Set realistic connection and response timeouts with an explicit failure path.
- Place a valid secret in the documented API authentication header.
- Retry eligible failures with capped exponential backoff and jitter.
Explanation
Correct Answer
B:To keep a stalled upstream model call from occupying application resources indefinitely in this multi-tenant support application, timeout handling caps resource exposure, while logging distinguishes slow provider response from a model-level refusal; the proposed implementation directly supplies that capability.
Incorrect Answers
A:The proposed alternative helps to debug a failed request without exposing the user's confidential document because operational records can identify a failure path without retaining raw secrets or protected prompt content; that mechanism does not meet the different requirement to keep a stalled upstream model call from occupying application resources indefinitely.
C:The proposed alternative helps to authenticate a server-to-server Claude API request because API authentication is a request transport concern; placing a key inside the prompt body neither authenticates the request nor protects it; that mechanism does not meet the different requirement to keep a stalled upstream model call from occupying application resources indefinitely.
D:The proposed alternative helps to recover transient 429 or 5xx responses without creating a retry storm because backoff spreads retry traffic and respects transient capacity limits; blind immediate repetition worsens overload; that mechanism does not meet the different requirement to keep a stalled upstream model call from occupying application resources indefinitely.
Question 574
The technical owner of a model-family migration plan has to prevent a tool_use block from being displayed as if it were natural-language text. A separate requirement is to preserve arrays of typed content blocks when sending multimodal input. Which two-part remediation covers both?
- Perform both steps: (1) Prefer a maintained SDK when its typed methods and retry behavior fit the integration; (2) serialize the documented nested request shape rather than flattening it.
- Perform both steps: (1) Prefer a maintained SDK when its typed methods and retry behavior fit the integration; (2) estimate cost from expected input and output tokens and current model rates.
- Perform both steps: (1) Check each response block's type before extracting its fields; (2) estimate cost from expected input and output tokens and current model rates.
- Perform both steps: (1) Check each response block's type before extracting its fields; (2) serialize the documented nested request shape rather than flattening it.
Explanation
Correct Answer
D:The first change enables the team to prevent a tool_use block from being displayed as if it were natural-language text because typed response objects can contain several block families; assuming every block has a text field causes logic errors; the second addresses the separate need to preserve arrays of typed content blocks when sending multimodal input because typed content and role fields carry protocol meaning that is lost if developers simply concatenate them into plain text.
Incorrect Answers
A:The second step meets the requirement to preserve arrays of typed content blocks when sending multimodal input because typed content and role fields carry protocol meaning that is lost if developers simply concatenate them into plain text; the first step would only help to choose between writing raw REST requests and using an official client library because sDKs wrap the same underlying service API and can simplify serialization, error types, and streaming without removing protocol constraints, leaving the separate requirement to prevent a tool_use block from being displayed as if it were natural-language text unmet.
B:Both steps target different results—choose between writing raw REST requests and using an official client library and forecast spend for a batch of documents with different input sizes—because sDKs wrap the same underlying service API and can simplify serialization, error types, and streaming without removing protocol constraints and workload cost depends on token mix, model choice, and any applicable discounts or caching rather than request count alone; the required capabilities are instead to prevent a tool_use block from being displayed as if it were natural-language text and to preserve arrays of typed content blocks when sending multimodal input.
C:The first step is appropriate for the requirement to prevent a tool_use block from being displayed as if it were natural-language text because typed response objects can contain several block families; assuming every block has a text field causes logic errors; the other step instead aims to forecast spend for a batch of documents with different input sizes because workload cost depends on token mix, model choice, and any applicable discounts or caching rather than request count alone, which does not meet the second requirement to preserve arrays of typed content blocks when sending multimodal input.
Question 575
A team maintaining a prompt design review must meet 2 separate acceptance criteria: (1) avoid a prohibited output element such as confidential identifiers; (2) provide a document's necessary meaning without disclosing irrelevant personal identifiers. Which two implementation actions directly satisfy the stated requirements? Choose TWO.
- Escape or sanitize model text in the output presentation layer.
- Summarize prior decisions and preserve unresolved constraints.
- Minimize or redact sensitive fields before constructing context.
- Specify the forbidden content alongside an enforceable validation check.
- Revise one prompt component at a time against a regression evaluation set.
Explanation
Correct Answers
C:The test to provide a document's necessary meaning without disclosing irrelevant personal identifiers is met because data minimization reduces the sensitive information transmitted for inference while retaining the facts the task legitimately requires; the remaining selection covers the separate need to avoid a prohibited output element such as confidential identifiers.
D:The test to avoid a prohibited output element such as confidential identifiers is met because negative prompt guidance signals the intended boundary, but a deterministic validator is needed where violating it has consequences; the remaining selection covers the separate need to provide a document's necessary meaning without disclosing irrelevant personal identifiers.
Incorrect Answers
A:The action is useful for the separate capability to safely render generated text in a browser without executing embedded markup because generated content is untrusted for HTML rendering; injection into the DOM must not become executable client-side code; however, the required test outcomes are to provide a document's necessary meaning without disclosing irrelevant personal identifiers and to avoid a prohibited output element such as confidential identifiers.
B:The action is useful for the separate capability to maintain the current task after older dialogue exceeds the active token budget because a faithful rolling summary carries forward objectives and commitments while avoiding a full-history replay on each call; however, the required test outcomes are to provide a document's necessary meaning without disclosing irrelevant personal identifiers and to avoid a prohibited output element such as confidential identifiers.
E:The action is useful for the separate capability to improve a prompt while preserving performance on previously solved cases because controlled prompt iteration distinguishes genuine quality gains from regressions or overfitting to one attractive example; however, the required test outcomes are to provide a document's necessary meaning without disclosing irrelevant personal identifiers and to avoid a prohibited output element such as confidential identifiers.
Question 576
In a repository-level Claude Code rollout, a release requirement is to run a Claude Code task from an automated CI job without an interactive terminal. Which implementation addresses that specific requirement?
- Create a project skill with the documented skill metadata and content.
- Use the supported session continuation or resume mechanism.
- Invoke the supported noninteractive or print-mode command interface.
- Place a path-targeted rule in the repository's rules configuration.
Explanation
Correct Answer
C:To run a Claude Code task from an automated CI job without an interactive terminal in this repository-level Claude Code rollout, headless operation outputs results for automation and requires explicit credential, permission, and failure handling in the CI environment; the proposed implementation directly supplies that capability.
Incorrect Answers
A:The proposed alternative helps to make a reusable development procedure available to Claude Code with supporting files because a skill packages guidance or a workflow for reuse across relevant tasks; it is not identical to granting a runtime tool permission; that mechanism does not meet the different requirement to run a Claude Code task from an automated CI job without an interactive terminal.
B:The proposed alternative helps to continue a previously interrupted Claude Code work session because restoring session context reduces lost work while preserving continuity of prior tool activity; opening a new unrelated session does not do the same; that mechanism does not meet the different requirement to run a Claude Code task from an automated CI job without an interactive terminal.
D:The proposed alternative helps to apply a coding convention only when Claude Code edits a particular path because scoped rules keep specialized instructions close to their applicable files, avoiding global instructions that conflict with other modules; that mechanism does not meet the different requirement to run a Claude Code task from an automated CI job without an interactive terminal.
Question 577
The technical owner of a business workflow that calls Claude has to debug a failed request without exposing the user's confidential document. A separate requirement is to make a direct REST request with a declared supported API contract. Which two-part remediation covers both?
- Perform both steps: (1) Log status, timing, and correlation IDs with sensitive fields redacted; (2) configure the max_tokens request parameter appropriately.
- Perform both steps: (1) Set realistic connection and response timeouts with an explicit failure path; (2) configure the max_tokens request parameter appropriately.
- Perform both steps: (1) Log status, timing, and correlation IDs with sensitive fields redacted; (2) supply the required api version header.
- Perform both steps: (1) Set realistic connection and response timeouts with an explicit failure path; (2) supply the required api version header.
Explanation
Correct Answer
C:The first change enables the team to debug a failed request without exposing the user's confidential document because operational records can identify a failure path without retaining raw secrets or protected prompt content; the second addresses the separate need to make a direct REST request with a declared supported API contract because the version header selects the protocol contract supported by the endpoint, preventing accidental dependence on unspecified behavior.
Incorrect Answers
A:The first step is appropriate for the requirement to debug a failed request without exposing the user's confidential document because operational records can identify a failure path without retaining raw secrets or protected prompt content; the other step instead aims to cap the maximum output generated by a Messages API request because a generation limit controls maximum output length, not total cost or correctness; too low a value can truncate useful answers, which does not meet the second requirement to make a direct REST request with a declared supported API contract.
B:Both steps target different results—keep a stalled upstream model call from occupying application resources indefinitely and cap the maximum output generated by a Messages API request—because timeout handling caps resource exposure, while logging distinguishes slow provider response from a model-level refusal and a generation limit controls maximum output length, not total cost or correctness; too low a value can truncate useful answers; the required capabilities are instead to debug a failed request without exposing the user's confidential document and to make a direct REST request with a declared supported API contract.
D:The second step meets the requirement to make a direct REST request with a declared supported API contract because the version header selects the protocol contract supported by the endpoint, preventing accidental dependence on unspecified behavior; the first step would only help to keep a stalled upstream model call from occupying application resources indefinitely because timeout handling caps resource exposure, while logging distinguishes slow provider response from a model-level refusal, leaving the separate requirement to debug a failed request without exposing the user's confidential document unmet.
Question 578
A test for a production prompt pipeline fails because it cannot stop a model from alternating unpredictably between summary and extraction. Which change fixes the identified failure?
- Recheck current plans against a stored objective and constraints.
- State the task, audience, scope, and required deliverable explicitly.
- Use properly labeled example inputs and outputs instead of mixing speakers.
- Instruct the application to request clarification for unresolved high-impact ambiguity.
Explanation
Correct Answer
B:To stop a model from alternating unpredictably between summary and extraction in this production prompt pipeline, specific task wording narrows reasonable interpretations and gives validation rules a clear target without relying on implied intent; the proposed implementation directly supplies that capability.
Incorrect Answers
A:The proposed alternative helps to identify when a long agent discussion begins solving a different problem than the user approved because explicit objective comparison detects drift before tool actions diverge from the original task; extra history alone cannot guarantee alignment; that mechanism does not meet the different requirement to stop a model from alternating unpredictably between summary and extraction.
C:The proposed alternative helps to maintain label semantics when a few-shot prompt contains dialogue because correct role boundaries keep demonstrations interpretable and prevent an example answer from looking like a live instruction; that mechanism does not meet the different requirement to stop a model from alternating unpredictably between summary and extraction.
D:The proposed alternative helps to ask for missing essential parameters rather than inventing a consequential choice because clarification reduces irreversible guesses when requirements do not uniquely determine a safe action; that mechanism does not meet the different requirement to stop a model from alternating unpredictably between summary and extraction.
Question 579
A change request for a tool-using incident triage agent combines two needs: handle several independent tool_use blocks in one assistant message, and stop old agent histories from burying the information needed for the current step. Which implementation pair addresses both, not just one?
- Perform both steps: (1) Return a separate tool_result for every corresponding tool_use identifier; (2) use isolated branch state and a controlled reconciliation step.
- Perform both steps: (1) Alternate model tool-use requests with tool results until completion; (2) retrieve only task-relevant memories into the active context.
- Perform both steps: (1) Return a separate tool_result for every corresponding tool_use identifier; (2) retrieve only task-relevant memories into the active context.
- Perform both steps: (1) Alternate model tool-use requests with tool results until completion; (2) use isolated branch state and a controlled reconciliation step.
Explanation
Correct Answer
C:The first change enables the team to handle several independent tool_use blocks in one assistant message because parallel tool execution requires complete, correctly linked results; dropping one identifier leaves the model's outstanding request unresolved; the second addresses the separate need to stop old agent histories from burying the information needed for the current step because selective retrieval improves signal-to-noise and keeps token use bounded while retaining access to older information when required.
Incorrect Answers
A:The first step is appropriate for the requirement to handle several independent tool_use blocks in one assistant message because parallel tool execution requires complete, correctly linked results; dropping one identifier leaves the model's outstanding request unresolved; the other step instead aims to stop two parallel branches from overwriting the same mutable record because explicit merge rules are required when outputs converge; concurrent mutation without arbitration causes nondeterministic results, which does not meet the second requirement to stop old agent histories from burying the information needed for the current step.
B:The second step meets the requirement to stop old agent histories from burying the information needed for the current step because selective retrieval improves signal-to-noise and keeps token use bounded while retaining access to older information when required; the first step would only help to plan another step only after inspecting the result of a requested external operation because the loop returns observations to the model so subsequent decisions are informed by actual tool output rather than imagined execution, leaving the separate requirement to handle several independent tool_use blocks in one assistant message unmet.
D:Both steps target different results—plan another step only after inspecting the result of a requested external operation and stop two parallel branches from overwriting the same mutable record—because the loop returns observations to the model so subsequent decisions are informed by actual tool output rather than imagined execution and explicit merge rules are required when outputs converge; concurrent mutation without arbitration causes nondeterministic results; the required capabilities are instead to handle several independent tool_use blocks in one assistant message and to stop old agent histories from burying the information needed for the current step.
Question 580
A design review for an enterprise MCP client asks for support to make reference material available for clients to read as context, together with a way to launch a local MCP server as a subprocess managed by a compatible client. Select the two appropriate changes. Choose TWO.
- Implement a narrowly scoped read-only tool handler.
- Expose the manual as an MCP resource rather than a tool.
- Host a restricted client tool in the private application environment.
- Expose the material as an MCP resource with a stable identifier.
- Use the MCP stdio transport with properly framed protocol messages.
Explanation
Correct Answers
D:To make reference material available for clients to read as context as part of a design that must also launch a local MCP server as a subprocess managed by a compatible client, resources represent consumable data, contrasting with tools that invoke an operation or prompts that package reusable instructions; this is why the action is one of the two required selections.
E:To launch a local MCP server as a subprocess managed by a compatible client as part of a design that must also make reference material available for clients to read as context, standard input and output suit local process integration, where protocol output must not be mixed with arbitrary logging noise; this is why the action is one of the two required selections.
Incorrect Answers
A:This alternative serves the separate goal to expose a diagnostic capability without allowing the model to modify records because a restricted read interface supports observation while preventing data mutation, unlike giving a diagnostic agent a general administrative API; the required outcomes are instead to make reference material available for clients to read as context and to launch a local MCP server as a subprocess managed by a compatible client.
B:This alternative serves the separate goal to supply a read-only policy manual to an MCP client without giving it an action endpoint because a resource is contextual data; representing a passive document as an imperative function adds unnecessary execution semantics; the required outcomes are instead to make reference material available for clients to read as context and to launch a local MCP server as a subprocess managed by a compatible client.
C:This alternative serves the separate goal to execute a high-privilege enterprise action that must remain inside a corporate network because a private handler provides local network and IAM controls that a generic provider-executed server tool may not possess; the required outcomes are instead to make reference material available for clients to read as context and to launch a local MCP server as a subprocess managed by a compatible client.