Question 270
A team maintaining a Python Claude API backend has two different engineering requirements: (1) migrate tool argument fields without breaking older workers, and (2) customize one developer's default Claude Code behavior across local projects. Which TWO independent changes directly meet them? Choose TWO.
- Pin a supported explicit model version where stability is required.
- Use the user's own Claude Code settings file.
- Use stop_sequences and inspect the returned stop_sequence field.
- Version tool input schemas and coordinate dependent client changes.
- Track enabled plugins and their compatible versions as release dependencies.
Explanation
Correct Answers
B:To customize one developer's default Claude Code behavior across local projects as part of a design that must also migrate tool argument fields without breaking older workers, user settings are scoped to one person, so they should not be relied on for enforcing team-wide policy; this is why the action is one of the two required selections.
D:To migrate tool argument fields without breaking older workers as part of a design that must also customize one developer's default Claude Code behavior across local projects, contract versioning prevents producers and consumers from silently disagreeing about required fields or meanings; this is why the action is one of the two required selections.
Incorrect Answers
A:This alternative serves the separate goal to reproduce production behavior across deploys instead of silently adopting a new model release because explicit version selection limits unexpected changes; a release process should evaluate upgrades and retirement timelines deliberately; the required outcomes are instead to migrate tool argument fields without breaking older workers and to customize one developer's default Claude Code behavior across local projects.
C:This alternative serves the separate goal to enforce a caller-defined textual boundary on generation because a stop sequence halts generation at a specified marker, distinct from natural completion and separate from a JSON schema validator; the required outcomes are instead to migrate tool argument fields without breaking older workers and to customize one developer's default Claude Code behavior across local projects.
E:This alternative serves the separate goal to avoid a plugin update unexpectedly changing tools available to a coding agent because plugin capability changes can affect tool names and permissions, so production configuration should be reproducible and reviewed; the required outcomes are instead to migrate tool argument fields without breaking older workers and to customize one developer's default Claude Code behavior across local projects.
Question 271
The team responsible for a structured output service needs to safely render generated text in a browser without executing embedded markup. What is the most direct engineering change?
- Specify the forbidden content alongside an enforceable validation check.
- Map or reject values not in the approved enumeration.
- State explicit priority and conflict resolution for the task constraints.
- Escape or sanitize model text in the output presentation layer.
Explanation
Correct Answer
D:To safely render generated text in a browser without executing embedded markup in this structured output service, generated content is untrusted for HTML rendering; injection into the DOM must not become executable client-side code; the proposed implementation directly supplies that capability.
Incorrect Answers
A:The proposed alternative helps 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; that mechanism does not meet the different requirement to safely render generated text in a browser without executing embedded markup.
B:The proposed alternative helps 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; that mechanism does not meet the different requirement to safely render generated text in a browser without executing embedded markup.
C:The proposed alternative helps to prioritize mandatory legal requirements over optional stylistic preferences because without a priority rule, competing directives can create ambiguous outputs; hard requirements should guide how optional preferences are applied; that mechanism does not meet the different requirement to safely render generated text in a browser without executing embedded markup.
Question 272
In a multi-stage support automation, testing reveals that the system cannot stop two parallel branches from overwriting the same mutable record and cannot handle several independent tool_use blocks in one assistant message. Select the two targeted actions that close these gaps. Choose TWO.
- Consume the agent runtime's streamed event sequence.
- Choose a graph-based orchestration framework when state transitions justify it.
- Inspect the tool_use block, invoke the authorized handler, and return tool_result.
- Use isolated branch state and a controlled reconciliation step.
- Return a separate tool_result for every corresponding tool_use identifier.
Explanation
Correct Answers
D:To stop two parallel branches from overwriting the same mutable record as part of a design that must also handle several independent tool_use blocks in one assistant message, explicit merge rules are required when outputs converge; concurrent mutation without arbitration causes nondeterministic results; this is why the action is one of the two required selections.
E:To handle several independent tool_use blocks in one assistant message as part of a design that must also stop two parallel branches from overwriting the same mutable record, parallel tool execution requires complete, correctly linked results; dropping one identifier leaves the model's outstanding request unresolved; this is why the action is one of the two required selections.
Incorrect Answers
A:This alternative serves the separate goal to deliver intermediate agent events to the client as they occur because event-driven consumption lets the application display progress and inspect tool actions without waiting for the entire multi-step run to finish; the required outcomes are instead to stop two parallel branches from overwriting the same mutable record and to handle several independent tool_use blocks in one assistant message.
B: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 stop two parallel branches from overwriting the same mutable record and to handle several independent tool_use blocks in one assistant message.
C:This alternative serves the separate goal to execute a requested internal business function inside the application's trusted process because client tools are executed by the application, not by merely declaring a schema; every returned result must be matched to its tool-use identifier; the required outcomes are instead to stop two parallel branches from overwriting the same mutable record and to handle several independent tool_use blocks in one assistant message.
Question 273
In a tool-calling Claude workflow, testing reveals that the system cannot invoke a proprietary internal pricing database unavailable through a built-in feature and cannot enforce a mandatory fixed approval step regardless of what instructions the model follows. Select the two targeted actions that close these gaps. Choose TWO.
- Disable the capability at configuration or tool-registration level.
- Implement the approval in application workflow control rather than only in a Skill.
- Write a custom tool whose handler runs in the application.
- Host a restricted client tool in the private application environment.
- Return a concise task-relevant projection from the tool handler.
Explanation
Correct Answers
B:To enforce a mandatory fixed approval step regardless of what instructions the model follows as part of a design that must also invoke a proprietary internal pricing database unavailable through a built-in feature, skills can guide agent behavior, but deterministic policy gates must live in trusted code so they cannot be skipped by model interpretation; this is why the action is one of the two required selections.
C:To invoke a proprietary internal pricing database unavailable through a built-in feature as part of a design that must also enforce a mandatory fixed approval step regardless of what instructions the model follows, custom tools expose application-specific actions while retaining control over authentication, validation, and network access; this is why the action is one of the two required selections.
Incorrect Answers
A:This alternative serves the separate goal to remove an agent's access to an obsolete integration without rewriting all its task prompts because actual registered capabilities define what may execute; changing descriptive prompt text alone does not revoke a previously available tool; the required outcomes are instead to invoke a proprietary internal pricing database unavailable through a built-in feature and to enforce a mandatory fixed approval step regardless of what instructions the model follows.
D: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 invoke a proprietary internal pricing database unavailable through a built-in feature and to enforce a mandatory fixed approval step regardless of what instructions the model follows.
E:This alternative serves the separate goal to reduce context bloat caused by a tool returning a thousand irrelevant fields because tool output is subsequently consumed as model context; minimizing it reduces both token cost and distractions; the required outcomes are instead to invoke a proprietary internal pricing database unavailable through a built-in feature and to enforce a mandatory fixed approval step regardless of what instructions the model follows.
Question 274
A design review for a high-volume Messages API gateway asks for support to detect a changed tool response field before it breaks downstream code, together with a way to recover transient 429 or 5xx responses without creating a retry storm. Select the two appropriate changes. Choose TWO.
- Version prompt files alongside relevant application code.
- Give mutating operations an application-level idempotency key.
- Add automated consumer-provider contract tests.
- Treat stop_reason end_turn as a completed assistant turn.
- Retry eligible failures with capped exponential backoff and jitter.
Explanation
Correct Answers
C:To detect a changed tool response field before it breaks downstream code as part of a design that must also recover transient 429 or 5xx responses without creating a retry storm, schema contracts make integration changes visible and prevent a renamed field from silently corrupting later model context; this is why the action is one of the two required selections.
E:To recover transient 429 or 5xx responses without creating a retry storm as part of a design that must also detect a changed tool response field before it breaks downstream code, backoff spreads retry traffic and respects transient capacity limits; blind immediate repetition worsens overload; this is why the action is one of the two required selections.
Incorrect Answers
A:This alternative serves the separate goal to trace exactly which prompt template was deployed with a code change because prompts change software behavior and should be reviewed and diffed like code, rather than edited anonymously in production; the required outcomes are instead to detect a changed tool response field before it breaks downstream code and to recover transient 429 or 5xx responses without creating a retry storm.
B:This alternative serves the separate goal 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; the required outcomes are instead to detect a changed tool response field before it breaks downstream code and to recover transient 429 or 5xx responses without creating a retry storm.
D:This alternative serves the separate goal to detect that the assistant has naturally finished a response because the completion signal is explicit in the response metadata; it should not be inferred solely from a sentence ending in punctuation; the required outcomes are instead to detect a changed tool response field before it breaks downstream code and to recover transient 429 or 5xx responses without creating a retry storm.
Question 275
A team maintaining a model selection trial has two different engineering requirements: (1) explain a billing increase after lengthy system instructions are added, and (2) prevent constantly changing user text from invalidating a reusable prompt prefix. Which TWO independent changes directly meet them? Choose TWO.
- Check each response block's type before extracting its fields.
- Model the response as conditioned token generation.
- Place caching around stable ordered content before dynamic material.
- Measure input-token usage per request and track the prompt components.
- Track output tokens separately from input tokens.
Explanation
Correct Answers
C:To prevent constantly changing user text from invalidating a reusable prompt prefix as part of a design that must also explain a billing increase after lengthy system instructions are added, cache matching operates over the stable prefix, so volatile material before the breakpoint undermines reuse; this is why the action is one of the two required selections.
D:To explain a billing increase after lengthy system instructions are added as part of a design that must also prevent constantly changing user text from invalidating a reusable prompt prefix, repeated prefixes and conversation history consume billable input, so cost cannot be inferred from output length alone; this is why the action is one of the two required selections.
Incorrect Answers
A:This alternative serves the separate goal 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 required outcomes are instead to explain a billing increase after lengthy system instructions are added and to prevent constantly changing user text from invalidating a reusable prompt prefix.
B:This alternative serves the separate goal to explain why language-model output is generated step by step rather than fetched from a fixed response table because autoregressive decoding selects subsequent tokens based on supplied context and prior output, which creates flexible but non-guaranteed wording; the required outcomes are instead to explain a billing increase after lengthy system instructions are added and to prevent constantly changing user text from invalidating a reusable prompt prefix.
E:This alternative serves the separate goal to identify why verbose generated reports cost more despite unchanged inputs because generation tokens are metered independently and can have different pricing, so response verbosity affects unit economics; the required outcomes are instead to explain a billing increase after lengthy system instructions are added and to prevent constantly changing user text from invalidating a reusable prompt prefix.
Question 276
The technical owner of an agent access-control assessment has to reduce exposure after an API key is suspected compromised. A separate requirement is to demonstrate who approved a privileged tool action and when. Which two-part remediation covers both?
- Perform both steps: (1) Revoke and rotate the affected credential and update dependent services; (2) record authenticated approval events with actor, scope, and request correlation.
- Perform both steps: (1) Apply an input-side policy gate and route flagged cases to a safe path; (2) record authenticated approval events with actor, scope, and request correlation.
- Perform both steps: (1) Apply an input-side policy gate and route flagged cases to a safe path; (2) redact secrets and protect log access with retention controls.
- Perform both steps: (1) Revoke and rotate the affected credential and update dependent services; (2) redact secrets and protect log access with retention controls.
Explanation
Correct Answer
A:The first change enables the team to reduce exposure after an API key is suspected compromised because rotation restores credential control only when the old secret is disabled and consumers move to the replacement safely; the second addresses the separate need 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.
Incorrect Answers
B:The second step meets the requirement 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 first step would only help to identify prohibited requests before an automated agent invokes business tools because early filtering reduces inappropriate work, but later checks remain necessary because tool outputs can also introduce risks, leaving the separate requirement to reduce exposure after an API key is suspected compromised unmet.
C:Both steps target different results—identify prohibited requests before an automated agent invokes business tools and investigate user actions without leaking API keys into operational records—because early filtering reduces inappropriate work, but later checks remain necessary because tool outputs can also introduce risks and logs support accountability only when access and retention are restricted; copying all prompt content into logs creates another exposure surface; the required capabilities are instead to reduce exposure after an API key is suspected compromised and to demonstrate who approved a privileged tool action and when.
D:The first step is appropriate for the requirement to reduce exposure after an API key is suspected compromised because rotation restores credential control only when the old secret is disabled and consumers move to the replacement safely; the other step instead aims to investigate user actions without leaking API keys into operational records because logs support accountability only when access and retention are restricted; copying all prompt content into logs creates another exposure surface, which does not meet the second requirement to demonstrate who approved a privileged tool action and when.
Question 277
An end-to-end test for a multi-tenant support application checks whether it can continue a chat with relevant prior turns despite the API being stateless and connect execution output to the exact tool request Claude made. Which plan should be approved to satisfy both checks?
- Perform both steps: (1) Include the necessary conversation history in each Messages API call; (2) configure an available server-side tool with the required api definition.
- Perform both steps: (1) Read the completed stream's usage and final message metadata; (2) return tool_result blocks containing the corresponding tool_use_id.
- Perform both steps: (1) Read the completed stream's usage and final message metadata; (2) configure an available server-side tool with the required api definition.
- Perform both steps: (1) Include the necessary conversation history in each Messages API call; (2) return tool_result blocks containing the corresponding tool_use_id.
Explanation
Correct Answer
D:The first change enables the team to continue a chat with relevant prior turns despite the API being stateless because a response does not create server-side conversational memory by default; the client supplies retained turns and controls truncation; the second addresses the separate need 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.
Incorrect Answers
A:The first step is appropriate for the requirement to continue a chat with relevant prior turns despite the API being stateless because a response does not create server-side conversational memory by default; the client supplies retained turns and controls truncation; the other step instead aims to use provider-hosted search or execution without implementing the tool body locally because provider-executed tools are handled in Anthropic's environment and differ from client functions that the caller must run, which does not meet the second requirement to connect execution output to the exact tool request Claude made.
B:The second step meets the requirement 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; the first step would only help to account accurately for token consumption when a response is streamed because early text deltas do not necessarily carry authoritative final usage or stop information; accounting must wait for the appropriate terminal event, leaving the separate requirement to continue a chat with relevant prior turns despite the API being stateless unmet.
C:Both steps target different results—account accurately for token consumption when a response is streamed and use provider-hosted search or execution without implementing the tool body locally—because early text deltas do not necessarily carry authoritative final usage or stop information; accounting must wait for the appropriate terminal event and provider-executed tools are handled in Anthropic's environment and differ from client functions that the caller must run; the required capabilities are instead to continue a chat with relevant prior turns despite the API being stateless and to connect execution output to the exact tool request Claude made.
Question 278
The owner of a Claude integration debugging session needs to locate which component of a multi-tool answer introduced the wrong value as well as distinguish an upstream throttling response from a malformed model answer. Which two changes belong in the minimum remediation plan? Choose TWO.
- Check that each tool_use identifier receives one matching tool_result.
- Inspect stop_reason and output limits before changing the parser.
- Inspect the HTTP 429 status and rate-limit metadata before retrying.
- Examine correlated request, tool, and transformation traces stage by stage.
- Trace the API credential and access permissions for the 401 or 403 response.
Explanation
Correct Answers
C:To distinguish an upstream throttling response from a malformed model answer as part of a design that must also locate which component of a multi-tool answer introduced the wrong value, a rate limit is a request-layer capacity problem; the response needs controlled pacing rather than a prompt rewrite; this is why the action is one of the two required selections.
D:To locate which component of a multi-tool answer introduced the wrong value as part of a design that must also distinguish an upstream throttling response from a malformed model answer, structured traces reveal whether retrieval, tool execution, postprocessing, or generation caused the defect; reading only the final text cannot isolate it; this is why the action is one of the two required selections.
Incorrect Answers
A:This alternative serves the separate goal to explain why an agent loop is stuck after a model requested an external function because an unmatched tool call leaves a protocol-level continuation gap, even if the handler actually ran successfully; the required outcomes are instead to locate which component of a multi-tool answer introduced the wrong value and to distinguish an upstream throttling response from a malformed model answer.
B:This alternative serves the separate goal to find why a JSON record unexpectedly ends midway through a field because a max_tokens stop indicates incomplete generation; the parser may be working correctly against a response that was never finished; the required outcomes are instead to locate which component of a multi-tool answer introduced the wrong value and to distinguish an upstream throttling response from a malformed model answer.
E:This alternative serves the separate goal to identify why a request is rejected before any inference happens because unauthorized access fails at the transport or authorization boundary, not because Claude misunderstood the prompt; the required outcomes are instead to locate which component of a multi-tool answer introduced the wrong value and to distinguish an upstream throttling response from a malformed model answer.
Question 279
An architecture review of an autonomous repository maintenance job asks how to handle several independent tool_use blocks in one assistant message. Which action is the best fit?
- Return a separate tool_result for every corresponding tool_use identifier.
- Configure the appropriate Anthropic-executed server tool.
- Retrieve only task-relevant memories into the active context.
- Implement an application-owned Messages API agent loop.
Explanation
Correct Answer
A:To handle several independent tool_use blocks in one assistant message in this autonomous repository maintenance job, parallel tool execution requires complete, correctly linked results; dropping one identifier leaves the model's outstanding request unresolved; the proposed implementation directly supplies that capability.
Incorrect Answers
B:The proposed alternative helps to use a Claude platform-provided capability without operating a local handler because server tools execute on the provider side and have distinct authorization and runtime semantics from client tools the application dispatches; that mechanism does not meet the different requirement to handle several independent tool_use blocks in one assistant message.
C:The proposed alternative helps 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; that mechanism does not meet the different requirement to handle several independent tool_use blocks in one assistant message.
D:The proposed alternative helps 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; that mechanism does not meet the different requirement to handle several independent tool_use blocks in one assistant message.
Question 280
Two acceptance tests block a production inference application: one requires the ability to reuse a long stable instruction or document prefix over repeated requests; the other requires the ability to enforce a caller-defined textual boundary on generation. Which plan clears both tests?
- Perform both steps: (1) Cache an eligible unchanged prefix with cache_control; (2) submit independent requests through the message batches api.
- Perform both steps: (1) Branch on stop_reason tool_use and dispatch the declared calls; (2) submit independent requests through the message batches api.
- Perform both steps: (1) Cache an eligible unchanged prefix with cache_control; (2) use stop_sequences and inspect the returned stop_sequence field.
- Perform both steps: (1) Branch on stop_reason tool_use and dispatch the declared calls; (2) use stop_sequences and inspect the returned stop_sequence field.
Explanation
Correct Answer
C:The first change enables the team to reuse a long stable instruction or document prefix over repeated requests because prompt caching reduces repeated input processing when the prefix matches; changes before the cache boundary can prevent a hit; the second addresses the separate need to enforce a caller-defined textual boundary on generation because a stop sequence halts generation at a specified marker, distinct from natural completion and separate from a JSON schema validator.
Incorrect Answers
A:The first step is appropriate for the requirement to reuse a long stable instruction or document prefix over repeated requests because prompt caching reduces repeated input processing when the prefix matches; changes before the cache boundary can prevent a hit; the other step instead aims to process a large queue of independent, noninteractive requests at a lower-cost asynchronous pace because batch processing is suited to deferred work with eventual result collection and is not a substitute for an interactive low-latency chat endpoint, which does not meet the second requirement to enforce a caller-defined textual boundary on generation.
B:Both steps target different results—recognize that the model is asking the application to execute a client tool and process a large queue of independent, noninteractive requests at a lower-cost asynchronous pace—because a tool-use stop requires host-side handling and a follow-up message containing results, not presenting the call as final prose and batch processing is suited to deferred work with eventual result collection and is not a substitute for an interactive low-latency chat endpoint; the required capabilities are instead to reuse a long stable instruction or document prefix over repeated requests and to enforce a caller-defined textual boundary on generation.
D:The second step meets the requirement to enforce a caller-defined textual boundary on generation because a stop sequence halts generation at a specified marker, distinct from natural completion and separate from a JSON schema validator; the first step would only help to recognize that the model is asking the application to execute a client tool because a tool-use stop requires host-side handling and a follow-up message containing results, not presenting the call as final prose, leaving the separate requirement to reuse a long stable instruction or document prefix over repeated requests unmet.