Question 290
The technical owner of an internal coding-assistant workflow has to build a Claude-powered coding agent with an established runtime for tool orchestration. A separate requirement is to minimize infrastructure ownership for a supported hosted agent execution surface. Which two-part remediation covers both?
- Perform both steps: (1) Attach a post-execution observation hook to the tool lifecycle; (2) alternate model tool-use requests with tool results until completion.
- Perform both steps: (1) Attach a post-execution observation hook to the tool lifecycle; (2) evaluate a managed agent runtime against the deployment requirements.
- Perform both steps: (1) Use the Claude Agent SDK for the agent's execution harness; (2) alternate model tool-use requests with tool results until completion.
- Perform both steps: (1) Use the Claude Agent SDK for the agent's execution harness; (2) evaluate a managed agent runtime against the deployment requirements.
Explanation
Correct Answer
D:The first change enables the team to build a Claude-powered coding agent with an established runtime for tool orchestration because the SDK provides structured primitives for agent sessions and tool execution, reducing the custom loop infrastructure the application must maintain; the second addresses the separate need to minimize infrastructure ownership for a supported hosted agent execution surface because a managed runtime can take on execution infrastructure, but access controls, product availability, and data-handling needs still require evaluation.
Incorrect Answers
A:Both steps target different results—inspect the result of a completed tool call before later model reasoning consumes it and plan another step only after inspecting the result of a requested external operation—because post-tool inspection can record or validate outcomes after execution, but it cannot retroactively prevent side effects from the completed call and the loop returns observations to the model so subsequent decisions are informed by actual tool output rather than imagined execution; the required capabilities are instead to build a Claude-powered coding agent with an established runtime for tool orchestration and to minimize infrastructure ownership for a supported hosted agent execution surface.
B:The second step meets the requirement to minimize infrastructure ownership for a supported hosted agent execution surface because a managed runtime can take on execution infrastructure, but access controls, product availability, and data-handling needs still require evaluation; the first step would only help to inspect the result of a completed tool call before later model reasoning consumes it because post-tool inspection can record or validate outcomes after execution, but it cannot retroactively prevent side effects from the completed call, leaving the separate requirement to build a Claude-powered coding agent with an established runtime for tool orchestration unmet.
C:The first step is appropriate for the requirement to build a Claude-powered coding agent with an established runtime for tool orchestration because the SDK provides structured primitives for agent sessions and tool execution, reducing the custom loop infrastructure the application must maintain; the other step instead aims 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, which does not meet the second requirement to minimize infrastructure ownership for a supported hosted agent execution surface.
Question 291
For a knowledge-grounded assistant, a design is acceptable only if it can prevent a generated status outside a database's accepted code set while also being able to safely render generated text in a browser without executing embedded markup. Which paired implementation is sufficient?
- Perform both steps: (1) Map or reject values not in the approved enumeration; (2) escape or sanitize model text in the output presentation layer.
- Perform both steps: (1) Specify the forbidden content alongside an enforceable validation check; (2) use properly labeled example inputs and outputs instead of mixing speakers.
- Perform both steps: (1) Map or reject values not in the approved enumeration; (2) use properly labeled example inputs and outputs instead of mixing speakers.
- Perform both steps: (1) Specify the forbidden content alongside an enforceable validation check; (2) escape or sanitize model text in the output presentation layer.
Explanation
Correct Answer
A:The first change enables the team to prevent a generated status outside a database's accepted code set because controlled vocabularies need explicit allowed values; a plausible new status label can still break downstream contracts; the second addresses the separate need 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.
Incorrect Answers
B:Both steps target different results—avoid a prohibited output element such as confidential identifiers and maintain label semantics when a few-shot prompt contains dialogue—because negative prompt guidance signals the intended boundary, but a deterministic validator is needed where violating it has consequences and correct role boundaries keep demonstrations interpretable and prevent an example answer from looking like a live instruction; the required capabilities are instead to prevent a generated status outside a database's accepted code set and to safely render generated text in a browser without executing embedded markup.
C:The first step is appropriate for the requirement to prevent a generated status outside a database's accepted code set because controlled vocabularies need explicit allowed values; a plausible new status label can still break downstream contracts; the other step instead aims 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, which does not meet the second requirement to safely render generated text in a browser without executing embedded markup.
D:The second step meets the requirement 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; the first step would only help to avoid a prohibited output element such as confidential identifiers because negative prompt guidance signals the intended boundary, but a deterministic validator is needed where violating it has consequences, leaving the separate requirement to prevent a generated status outside a database's accepted code set unmet.
Question 292
For a TypeScript Claude integration, the missing capability is to restore a known-working prompt and model configuration after quality degrades. What should the developers implement?
- Convert quality expectations into labeled tests and failure thresholds.
- Separate development credentials, data, and tool endpoints from production.
- Specify user-visible degraded responses and recovery paths.
- Keep versioned artifacts and a tested rollback procedure.
Explanation
Correct Answer
D:To restore a known-working prompt and model configuration after quality degrades in this TypeScript Claude integration, model IDs, prompts, schemas, and tool contracts are release components; restoring just the application binary may not restore prior behavior; the proposed implementation directly supplies that capability.
Incorrect Answers
A:The proposed alternative helps to verify that generated categorization meets a business-approved standard because acceptance is meaningful only with representative cases and explicit quality criteria; subjective demo approval cannot establish production fitness; that mechanism does not meet the different requirement to restore a known-working prompt and model configuration after quality degrades.
B:The proposed alternative helps to test experimental prompts and tools without reaching real customer records because environment isolation prevents exploratory code from inheriting real business permissions and improves reproducibility of failures; that mechanism does not meet the different requirement to restore a known-working prompt and model configuration after quality degrades.
C:The proposed alternative helps to preserve an understandable outcome when model generation cannot complete because a fallback requirement defines what customers see when an API call times out or is refused rather than assuming every inference will succeed; that mechanism does not meet the different requirement to restore a known-working prompt and model configuration after quality degrades.
Question 293
While planning a model selection trial, the product owner specifies that it must build bidirectional persistent event communication where the chosen platform supports it. Which solution fulfills the requirement?
- Use a WebSocket protocol only when the target endpoint actually offers one.
- Call the documented HTTPS endpoint with explicit headers and JSON serialization.
- Iterate the SDK or HTTP event stream until its terminal event.
- Use asynchronous client methods and limit in-flight calls.
Explanation
Correct Answer
A:To build bidirectional persistent event communication where the chosen platform supports it in this model selection trial, webSockets can carry two-way events over a long-lived connection; they are not a drop-in replacement for every HTTP or SSE endpoint; the proposed implementation directly supplies that capability.
Incorrect Answers
B:The proposed alternative helps to work in an environment that lacks a compatible Claude SDK because direct REST access remains possible when an SDK is unavailable, but the caller owns wire-format correctness and response parsing; that mechanism does not meet the different requirement to build bidirectional persistent event communication where the chosen platform supports it.
C:The proposed alternative helps to process partial model output as it is delivered over a streaming connection because streaming clients must handle both content deltas and final status rather than assuming the first chunk is the complete response; that mechanism does not meet the different requirement to build bidirectional persistent event communication where the chosen platform supports it.
D:The proposed alternative helps 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; that mechanism does not meet the different requirement to build bidirectional persistent event communication where the chosen platform supports it.
Question 294
A planned upgrade to an operations research assistant has two requirements that must both pass: use a Claude platform-provided capability without operating a local handler; deliver intermediate agent events to the client as they occur. Identify the two direct implementations. Choose TWO.
- Attach a post-execution observation hook to the tool lifecycle.
- Give an agent a bounded objective and a tool-selection loop.
- Evaluate a managed agent runtime against the deployment requirements.
- Configure the appropriate Anthropic-executed server tool.
- Consume the agent runtime's streamed event sequence.
Explanation
Correct Answers
D:To use a Claude platform-provided capability without operating a local handler as part of a design that must also deliver intermediate agent events to the client as they occur, server tools execute on the provider side and have distinct authorization and runtime semantics from client tools the application dispatches; this is why the action is one of the two required selections.
E:To deliver intermediate agent events to the client as they occur as part of a design that must also use a Claude platform-provided capability without operating a local handler, event-driven consumption lets the application display progress and inspect tool actions without waiting for the entire multi-step run to finish; this is why the action is one of the two required selections.
Incorrect Answers
A:This alternative serves the separate goal to inspect the result of a completed tool call before later model reasoning consumes it because post-tool inspection can record or validate outcomes after execution, but it cannot retroactively prevent side effects from the completed call; the required outcomes are instead to use a Claude platform-provided capability without operating a local handler and to deliver intermediate agent events to the client as they occur.
B:This alternative serves the separate goal to pursue an open-ended investigation where the next action depends on intermediate evidence because agentic control lets the model choose among permitted steps as observations arrive; budgets and termination conditions still bound its autonomy; the required outcomes are instead to use a Claude platform-provided capability without operating a local handler and to deliver intermediate agent events to the client as they occur.
C:This alternative serves the separate goal to minimize infrastructure ownership for a supported hosted agent execution surface because a managed runtime can take on execution infrastructure, but access controls, product availability, and data-handling needs still require evaluation; the required outcomes are instead to use a Claude platform-provided capability without operating a local handler and to deliver intermediate agent events to the client as they occur.
Question 295
For a customer-facing AI feature, a design is acceptable only if it can avoid silently treating a broken streaming connection as a complete answer while also being able to handle a safety refusal as a distinct application outcome. Which paired implementation is sufficient?
- Perform both steps: (1) Detect transport interruption and mark incomplete generated content; (2) return tool_result blocks containing the corresponding tool_use_id.
- Perform both steps: (1) Detect transport interruption and mark incomplete generated content; (2) detect refusal and apply the product's allowed fallback or messaging policy.
- Perform both steps: (1) Inspect response.content blocks and metadata through the SDK's typed representation; (2) return tool_result blocks containing the corresponding tool_use_id.
- Perform both steps: (1) Inspect response.content blocks and metadata through the SDK's typed representation; (2) detect refusal and apply the product's allowed fallback or messaging policy.
Explanation
Correct Answer
B:The first change enables the team to avoid silently treating a broken streaming connection as a complete answer because network termination before a final message event can leave a partial response, which needs explicit recovery rather than success handling; the second addresses the separate need to handle a safety refusal as a distinct application outcome because a refusal is not the same as a network failure; blindly retrying identical input may not produce an appropriate user experience.
Incorrect Answers
A:The first step is appropriate for the requirement to avoid silently treating a broken streaming connection as a complete answer because network termination before a final message event can leave a partial response, which needs explicit recovery rather than success handling; the other step instead aims to connect execution output to the exact tool request Claude made because tool correlation preserves call-to-result semantics in the message sequence, especially when several tools were requested together, which does not meet the second requirement to handle a safety refusal as a distinct application outcome.
C:Both steps target different results—avoid assuming a structured SDK response is a plain string and connect execution output to the exact tool request Claude made—because the SDK exposes block types, stop reason, and usage separately; naïve string concatenation can lose tool requests or other content and tool correlation preserves call-to-result semantics in the message sequence, especially when several tools were requested together; the required capabilities are instead to avoid silently treating a broken streaming connection as a complete answer and to handle a safety refusal as a distinct application outcome.
D:The second step meets the requirement to handle a safety refusal as a distinct application outcome because a refusal is not the same as a network failure; blindly retrying identical input may not produce an appropriate user experience; the first step would only help to avoid assuming a structured SDK response is a plain string because the SDK exposes block types, stop reason, and usage separately; naïve string concatenation can lose tool requests or other content, leaving the separate requirement to avoid silently treating a broken streaming connection as a complete answer unmet.
Question 296
A production readiness review of a token-consumption optimization sprint finds that the team cannot yet prevent constantly changing user text from invalidating a reusable prompt prefix or reduce repeated cost for a stable lengthy policy prefix reused many times. Which paired changes directly remedy the two gaps?
- Perform both steps: (1) Evaluate Message Batches instead of synchronous requests; (2) measure or count input and output tokens with the supported tokenizer or api.
- Perform both steps: (1) Evaluate Message Batches instead of synchronous requests; (2) measure cache-write overhead against subsequent cache-read savings.
- Perform both steps: (1) Place caching around stable ordered content before dynamic material; (2) measure cache-write overhead against subsequent cache-read savings.
- Perform both steps: (1) Place caching around stable ordered content before dynamic material; (2) measure or count input and output tokens with the supported tokenizer or api.
Explanation
Correct Answer
C:The first change enables the team to prevent constantly changing user text from invalidating a reusable prompt prefix because cache matching operates over the stable prefix, so volatile material before the breakpoint undermines reuse; the second addresses the separate need 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.
Incorrect Answers
A:Both steps target different results—cut cost for a nightly noninteractive summarization workload and estimate model usage from encoded text rather than counting words—because asynchronous batches can offer discounted processing when the application can tolerate deferred completion and result collection and billing and context consumption track tokens, which do not map one-to-one to English words or characters; the required capabilities are instead to prevent constantly changing user text from invalidating a reusable prompt prefix and to reduce repeated cost for a stable lengthy policy prefix reused many times.
B:The second step meets the requirement 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 first step would only help to cut cost for a nightly noninteractive summarization workload because asynchronous batches can offer discounted processing when the application can tolerate deferred completion and result collection, leaving the separate requirement to prevent constantly changing user text from invalidating a reusable prompt prefix unmet.
D:The first step is appropriate for the requirement to prevent constantly changing user text from invalidating a reusable prompt prefix because cache matching operates over the stable prefix, so volatile material before the breakpoint undermines reuse; the other step instead aims to estimate model usage from encoded text rather than counting words because billing and context consumption track tokens, which do not map one-to-one to English words or characters, which does not meet the second requirement to reduce repeated cost for a stable lengthy policy prefix reused many times.
Question 297
The owner of a document investigation agent needs to keep orchestration runtime and internal tool handlers inside company-managed infrastructure as well as minimize infrastructure ownership for a supported hosted agent execution surface. Which two changes belong in the minimum remediation plan? Choose TWO.
- Enforce explicit completion checks and a maximum iteration budget.
- Evaluate a managed agent runtime against the deployment requirements.
- Implement an application-owned Messages API agent loop.
- Deploy the agent runner in the organization's own environment.
- Attach a post-execution observation hook to the tool lifecycle.
Explanation
Correct Answers
B:To minimize infrastructure ownership for a supported hosted agent execution surface as part of a design that must also keep orchestration runtime and internal tool handlers inside company-managed infrastructure, a managed runtime can take on execution infrastructure, but access controls, product availability, and data-handling needs still require evaluation; this is why the action is one of the two required selections.
D:To keep orchestration runtime and internal tool handlers inside company-managed infrastructure as part of a design that must also minimize infrastructure ownership for a supported hosted agent execution surface, self-hosting puts tool execution, networking, and operational controls under the application's responsibility, subject to its own deployment constraints; this is why the action is one of the two required selections.
Incorrect Answers
A:This alternative serves the separate goal to stop iterative tool use when a success condition or resource budget is reached because bounded loops avoid unending tool calls and uncontrolled spend while making incomplete work visible instead of silently continuing; the required outcomes are instead to keep orchestration runtime and internal tool handlers inside company-managed infrastructure and to minimize infrastructure ownership for a supported hosted agent execution surface.
C:This alternative serves the separate goal to require precise control over message assembly, tool dispatch, and stopping behavior because a custom loop explicitly owns each model call, tool result, state update, and budget decision, trading flexibility for more engineering responsibility; the required outcomes are instead to keep orchestration runtime and internal tool handlers inside company-managed infrastructure and to minimize infrastructure ownership for a supported hosted agent execution surface.
E:This alternative serves the separate goal to inspect the result of a completed tool call before later model reasoning consumes it because post-tool inspection can record or validate outcomes after execution, but it cannot retroactively prevent side effects from the completed call; the required outcomes are instead to keep orchestration runtime and internal tool handlers inside company-managed infrastructure and to minimize infrastructure ownership for a supported hosted agent execution surface.
Question 298
For a high-volume Messages API gateway, the missing capability is to serve many concurrent network-bound Claude requests without blocking worker threads unnecessarily. What should the developers implement?
- Require peer review focused on API, security, and tool-side effects.
- Route Claude requests through a trusted backend service.
- Use asynchronous SDK calls with bounded concurrency.
- Give mutating operations an application-level idempotency key.
Explanation
Correct Answer
C:To serve many concurrent network-bound Claude requests without blocking worker threads unnecessarily in this high-volume Messages API gateway, async I/O can overlap network waits, but it does not remove provider limits or make CPU-heavy postprocessing nonblocking; the proposed implementation directly supplies that capability.
Incorrect Answers
A:The proposed alternative helps to catch unsafe credentials and incorrect tool calls before deployment because human review should check trust boundaries and external actions in addition to style; successful compilation cannot prove these behaviors are safe; that mechanism does not meet the different requirement to serve many concurrent network-bound Claude requests without blocking worker threads unnecessarily.
B:The proposed alternative helps to keep a browser application from exposing the secret used for model calls because a backend controls credentials and access policy while the UI sends user input through an authenticated application endpoint; that mechanism does not meet the different requirement to serve many concurrent network-bound Claude requests without blocking worker threads unnecessarily.
D:The proposed alternative helps to prevent duplicate purchases or tickets if an agent repeats a tool call because idempotency ensures replays of the same intended action do not create duplicate real-world effects even when orchestration retries; that mechanism does not meet the different requirement to serve many concurrent network-bound Claude requests without blocking worker threads unnecessarily.
Question 299
For a long-context summarization workflow, a design is acceptable only if it can require that a generated report have a fixed set of sections while also being able to improve a prompt while preserving performance on previously solved cases. Which paired implementation is sufficient?
- Perform both steps: (1) Validate parsed output against the application's declared schema; (2) revise one prompt component at a time against a regression evaluation set.
- Perform both steps: (1) Name each mandatory field or section and provide formatting constraints; (2) revise one prompt component at a time against a regression evaluation set.
- Perform both steps: (1) Name each mandatory field or section and provide formatting constraints; (2) instruct the application to request clarification for unresolved high-impact ambiguity.
- Perform both steps: (1) Validate parsed output against the application's declared schema; (2) instruct the application to request clarification for unresolved high-impact ambiguity.
Explanation
Correct Answer
B:The first change enables the team to require that a generated report have a fixed set of sections because concrete desired structure is easier to verify than a vague instruction to be professional or comprehensive; the second addresses the separate need 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.
Incorrect Answers
A:The second step meets the requirement 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; the first step would only help to reject model output missing a field that a downstream service requires because parsing proves a string is legal JSON, but schema validation checks required keys, types, and structural constraints, leaving the separate requirement to require that a generated report have a fixed set of sections unmet.
C:The first step is appropriate for the requirement to require that a generated report have a fixed set of sections because concrete desired structure is easier to verify than a vague instruction to be professional or comprehensive; the other step instead aims 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, which does not meet the second requirement to improve a prompt while preserving performance on previously solved cases.
D:Both steps target different results—reject model output missing a field that a downstream service requires and ask for missing essential parameters rather than inventing a consequential choice—because parsing proves a string is legal JSON, but schema validation checks required keys, types, and structural constraints and clarification reduces irreversible guesses when requirements do not uniquely determine a safe action; the required capabilities are instead to require that a generated report have a fixed set of sections and to improve a prompt while preserving performance on previously solved cases.
Question 300
Two approval criteria are still open for an agent access-control assessment: the team must stop frontend users from receiving unrestricted backend tool credentials and reduce exposure after an API key is suspected compromised. Which two implementation actions satisfy them? Choose TWO.
- Use a server-side workload identity or scoped service credential.
- Check resource-level authorization for every sensitive tool request.
- Enforce a pre-tool hook that denies the disallowed call.
- Record authenticated approval events with actor, scope, and request correlation.
- Revoke and rotate the affected credential and update dependent services.
Explanation
Correct Answers
A:To stop frontend users from receiving unrestricted backend tool credentials as part of a design that must also reduce exposure after an API key is suspected compromised, service identities tie privileges to a runtime workload and avoid exposing long-lived secrets to browsers or untrusted users; this is why the action is one of the two required selections.
E:To reduce exposure after an API key is suspected compromised as part of a design that must also stop frontend users from receiving unrestricted backend tool credentials, rotation restores credential control only when the old secret is disabled and consumers move to the replacement safely; this is why the action is one of the two required selections.
Incorrect Answers
B:This alternative serves the separate goal to stop an authenticated user from reading another tenant's records via a tool because proving identity does not grant access to every object; the backend must enforce tenant and resource permissions separately; the required outcomes are instead to stop frontend users from receiving unrestricted backend tool credentials and to reduce exposure after an API key is suspected compromised.
C:This alternative serves the separate goal to stop a coding agent from running commands that match a prohibited destructive pattern because a deterministic hook checks the proposed command before execution, providing a stronger control than asking the agent to self-police; the required outcomes are instead to stop frontend users from receiving unrestricted backend tool credentials and to reduce exposure after an API key is suspected compromised.
D:This alternative serves the separate goal to demonstrate who approved a privileged tool action and when because an audit trail binds authorization to a specific action, making privilege use reviewable without treating model-generated text as proof of consent; the required outcomes are instead to stop frontend users from receiving unrestricted backend tool credentials and to reduce exposure after an API key is suspected compromised.