Question 560
Two features of an inference routing system are under review. One feature must spend high-capability tokens only when validation indicates complexity; the other must stop a single customer from consuming the entire API allowance during a runaway workflow. Which plan matches the respective needs?
- First component: Measure cache read tokens. Second component: Set budget alerts and tenant caps.
- First component: Use batch pricing where deadline permits. Second component: Measure cache read tokens.
- First component: Use model routing for simple versus hard cases. Second component: Use batch pricing where deadline permits.
- First component: Use model routing for simple versus hard cases. Second component: Set budget alerts and tenant caps.
Explanation
Correct Answer
D:The first proposal fits its assigned role because conditional routing improves blended cost without discarding an escalation path, while the second proposal fits its assigned role because accounting plus enforced limits bounds exposure to unexpected traffic and agent loops; their respective acceptance criteria are to spend high-capability tokens only when validation indicates complexity and to stop a single customer from consuming the entire API allowance during a runaway workflow.
Incorrect Answers
A:The first proposal serves the different purpose to verify that an optimization actually reuses an earlier prompt prefix instead of the assigned first role because usage fields show how much eligible cached input was read rather than recomputed, while the second proposal fits its assigned role because accounting plus enforced limits bounds exposure to unexpected traffic and agent loops; their respective acceptance criteria are to spend high-capability tokens only when validation indicates complexity and to stop a single customer from consuming the entire API allowance during a runaway workflow.
B:The first proposal serves the different purpose to lower spend for large scheduled classification jobs that do not need immediate responses instead of the assigned first role because asynchronous batch processing can offer a cost-effective throughput path under supported terms, while the second proposal serves the different purpose to verify that an optimization actually reuses an earlier prompt prefix instead of the assigned second role because usage fields show how much eligible cached input was read rather than recomputed; their respective acceptance criteria are to spend high-capability tokens only when validation indicates complexity and to stop a single customer from consuming the entire API allowance during a runaway workflow.
C:The first proposal fits its assigned role because conditional routing improves blended cost without discarding an escalation path, while the second proposal serves the different purpose to lower spend for large scheduled classification jobs that do not need immediate responses instead of the assigned second role because asynchronous batch processing can offer a cost-effective throughput path under supported terms; their respective acceptance criteria are to spend high-capability tokens only when validation indicates complexity and to stop a single customer from consuming the entire API allowance during a runaway workflow.
Question 561
An operations orchestration delivery milestone depends on two separate capabilities. One module must analyze several independent document sections concurrently and combine the results; a second module must investigate an open-ended incident where the next query depends on earlier findings. Which implementation option is appropriate?
- First component: Use a central state record for orchestration. Second component: Use an agentic decision loop.
- First component: Use sequential chaining for dependent subtasks. Second component: Use a central state record for orchestration.
- First component: Use parallel fan-out and a reconciliation step. Second component: Use an agentic decision loop.
- First component: Use parallel fan-out and a reconciliation step. Second component: Use sequential chaining for dependent subtasks.
Explanation
Correct Answer
C:The first proposal fits its assigned role because parallel tasks reduce critical-path latency when they do not depend on one another; a join step resolves conflicting findings, while the second proposal fits its assigned role because a model-directed loop can choose subsequent actions based on tool observations until it reaches a stopping condition; their respective acceptance criteria are to analyze several independent document sections concurrently and combine the results and to investigate an open-ended incident where the next query depends on earlier findings.
Incorrect Answers
A:The first proposal serves the different purpose to resume a multi-step agentic process after worker or network failure instead of the assigned first role because persisted job state tracks completed stages, pending actions, and recoverable checkpoints outside the model context, while the second proposal fits its assigned role because a model-directed loop can choose subsequent actions based on tool observations until it reaches a stopping condition; their respective acceptance criteria are to analyze several independent document sections concurrently and combine the results and to investigate an open-ended incident where the next query depends on earlier findings.
B:The first proposal serves the different purpose to ensure a generated specification is validated before code generation begins instead of the assigned first role because each stage consumes an approved artifact from the previous stage, preserving dependency order and stage-specific checks, while the second proposal serves the different purpose to resume a multi-step agentic process after worker or network failure instead of the assigned second role because persisted job state tracks completed stages, pending actions, and recoverable checkpoints outside the model context; their respective acceptance criteria are to analyze several independent document sections concurrently and combine the results and to investigate an open-ended incident where the next query depends on earlier findings.
D:The first proposal fits its assigned role because parallel tasks reduce critical-path latency when they do not depend on one another; a join step resolves conflicting findings, while the second proposal serves the different purpose to ensure a generated specification is validated before code generation begins instead of the assigned second role because each stage consumes an approved artifact from the previous stage, preserving dependency order and stage-specific checks; their respective acceptance criteria are to analyze several independent document sections concurrently and combine the results and to investigate an open-ended incident where the next query depends on earlier findings.
Question 562
The owner of a privacy controls integration wants to capture which files an approved agent operation actually modified. Which proposal provides the required mechanism?
- Use a pre-tool hook to deny dangerous commands
- Use a post-tool hook to record outcomes
- Fail closed when a required safety hook fails
- Test hook input and exit handling
Explanation
Correct Answer
B:Post-execution events are useful for audit, metrics, and follow-up checks once the tool has run; this behavior directly supports the need to capture which files an approved agent operation actually modified. They cannot serve as the only prevention mechanism for an irreversible action.
Incorrect Answers
A:When an application needs to stop a coding agent from running a destructive deployment command before execution, pre-execution interception provides a deterministic opportunity to reject a proposed tool call; the current capability must instead capture which files an approved agent operation actually modified, while auditing the outcome afterward cannot undo the command.
C:This approach serves the separate need to prevent a tool action from proceeding when its authorization service is unreachable because a fail-closed gate treats missing approval as denial for sensitive operations; it does not establish the outcome to capture which files an approved agent operation actually modified, and fail-open behavior favors availability at the expense of an important security boundary.
D:Hook contracts specify the event, supplied data, and supported control response; integration tests verify expected enforcement; despite being useful when a service must ensure a policy block is interpreted correctly by the Claude Code runtime, it is not a solution to capture which files an approved agent operation actually modified; a script printing a warning does not necessarily block the tool.
Question 563
A credential management review requires two independent, explicitly defined outcomes: the first workstream must display generated customer notes safely in a browser; a second must stop an injected wiki page from asking an assistant to export credentials. Which TWO actions directly provide these capabilities? Choose TWO.
- Use output escaping to prevent XSS
- Validate tool arguments server-side
- Limit external network egress for agents
- Treat tool and retrieval text as untrusted
- Scope database credentials by tenant and operation
Explanation
Correct Answers
A:Context-aware encoding prevents text from being interpreted as active HTML or JavaScript; this directly supports task 1 to display generated customer notes safely in a browser, not the separate task or tasks to stop an injected wiki page from asking an assistant to export credentials; an instruction to the model not to write scripts is not a rendering control.
D:Lower-trust content is evidence only; control decisions remain with authenticated policy and tool gates; this directly supports task 2 to stop an injected wiki page from asking an assistant to export credentials, not the separate task or tasks to display generated customer notes safely in a browser; a model can be persuaded by source text unless boundaries are enforced.
Incorrect Answers
B:Backend authorization checks must bind the requested operation to the caller's entitlements; this implements the different outcome to block a generated database query that targets another tenant's records rather than the required tasks to stop an injected wiki page from asking an assistant to export credentials and to display generated customer notes safely in a browser, and well-formed arguments are not proof of permission, so it is not a direct solution to any of the assigned workstreams.
C:Network policy restricts which services a tool process can contact; this implements the different outcome to prevent a compromised tool step from sending internal files to arbitrary destinations rather than the required tasks to stop an injected wiki page from asking an assistant to export credentials and to display generated customer notes safely in a browser, and a natural-language prohibition cannot enforce packet-level isolation, so it is not a direct solution to any of the assigned workstreams.
E:Least-privilege identity limits the damage from a manipulated tool call; this implements the different outcome to prevent a read-only support tool from modifying billing tables rather than the required tasks to stop an injected wiki page from asking an assistant to export credentials and to display generated customer notes safely in a browser, and a broad administrator token bypasses application intent, so it is not a direct solution to any of the assigned workstreams.
Question 564
The owner of a Claude Code repository integration wants to run Claude Code inside a CI job and capture its output without interactive prompts. Which proposal provides the required mechanism?
- Review and resume a saved session
- Configure permissions in Claude Code settings
- Connect an MCP server to Claude Code
- Use headless invocation for automation
Explanation
Correct Answer
D:Noninteractive execution lets scripts integrate agent work into existing pipelines with controlled formats; this behavior directly supports the need to run Claude Code inside a CI job and capture its output without interactive prompts. Treating interactive terminal output as a stable machine interface is fragile.
Incorrect Answers
A:Session continuation can reestablish conversational state without restarting the task from scratch; this applies to the different goal to continue an interrupted refactor while retaining relevant prior decisions, not the requirement to run Claude Code inside a CI job and capture its output without interactive prompts; the developer still needs to recheck whether repository files changed in the meantime.
B:When an application needs to deny destructive commands regardless of what a generated plan proposes, explicit allow and deny rules establish executable tool policy rather than advisory prose; the current capability must instead run Claude Code inside a CI job and capture its output without interactive prompts, while a markdown warning can be ignored or misinterpreted by the agent.
C:An MCP integration declares external capabilities and their transport while access remains controlled by the server; the supported outcome is to expose approved project-specific actions without copying credentials into prompts, whereas this scenario requires the ability to run Claude Code inside a CI job and capture its output without interactive prompts; a server connection does not automatically make every operation safe or authorized.
Question 565
The owner of an inference routing integration wants to implement an interactive collaboration channel requiring messages in both directions. Which proposal provides the required mechanism?
- Use the official SDK for standard requests
- Use the Messages count_tokens capability
- Choose WebSockets for bidirectional realtime exchange
- Send the correct API authentication header
Explanation
Correct Answer
C:Persistent two-way channels fit interactive event exchange where the client also sends messages during a session; this behavior directly supports the need to implement an interactive collaboration channel requiring messages in both directions. Standard response streaming alone is not a general bidirectional messaging protocol.
Incorrect Answers
A:For the alternate objective to simplify authentication, serialization, and response typing in a Python service, maintained client libraries wrap the HTTP API and expose structured response objects; the feature here must implement an interactive collaboration channel requiring messages in both directions, and SDK convenience does not eliminate the need for correct retry and error handling.
B:Token counting helps check input budgets before generation and cost planning; this applies to the different goal to estimate model-token input demand before launching a large processing job, not the requirement to implement an interactive collaboration channel requiring messages in both directions; word or byte count is not a reliable substitute across diverse content.
D:The API validates the provided credential before accepting a request; the supported outcome is to avoid unauthenticated model requests from a backend worker, whereas this scenario requires the ability to implement an interactive collaboration channel requiring messages in both directions; embedding a secret in a user prompt does not authenticate an HTTP call.
Question 566
A customer platform group is preparing a production change intended to keep an interrupted invoice-creation request from generating duplicate invoices. Which technique matches that intent?
- Keep secrets out of source control
- Validate JSON before deserialization
- Avoid retrying non-idempotent writes blindly
- Use exponential backoff with jitter
Explanation
Correct Answer
C:Retries of side-effecting actions need idempotency keys or transaction reconciliation; this behavior directly supports the need to keep an interrupted invoice-creation request from generating duplicate invoices. Network timeouts do not prove the first write failed.
Incorrect Answers
A:This approach serves the separate need to prevent API credentials from being exposed through shared repository history because secret stores or environment injection keep production tokens out of committed code; it does not establish the outcome to keep an interrupted invoice-creation request from generating duplicate invoices, and deleting a secret from the latest commit may not remove it from earlier revisions.
B:A parser and schema validator catch missing types and invalid syntax before side effects; despite being useful when a service must reject a malformed tool argument payload before calling a payroll service, it is not a solution to keep an interrupted invoice-creation request from generating duplicate invoices; model-generated text is not trustworthy merely because it looks structured.
D:Increasing randomized delays reduce contention and respect service throttling signals; this applies to the different goal to recover from transient 429 responses without synchronized retry storms, not the requirement to keep an interrupted invoice-creation request from generating duplicate invoices; immediate identical retries can extend an overload event.
Question 567
During acceptance testing for a Claude Code repository service, one requirement is to establish a discoverable set of build and test conventions for a new Claude Code workspace. What should the developer implement?
- Use headless invocation for automation
- Use a project-level CLAUDE.md file
- Review and resume a saved session
- Create a reusable Skill
- Run repository initialization to create project guidance
Explanation
Correct Answer
E:Repository initialization can generate or prepare project instruction material that the team subsequently reviews; this behavior directly supports the need to establish a discoverable set of build and test conventions for a new Claude Code workspace. The resulting instructions are not a substitute for checking the actual build commands.
Incorrect Answers
A:Noninteractive execution lets scripts integrate agent work into existing pipelines with controlled formats; this applies to the different goal to run Claude Code inside a CI job and capture its output without interactive prompts, not the requirement to establish a discoverable set of build and test conventions for a new Claude Code workspace; treating interactive terminal output as a stable machine interface is fragile.
B:When an application needs to share coding conventions with every collaborator entering the same repository, a checked-in memory file supplies persistent project context across relevant coding sessions; the current capability must instead establish a discoverable set of build and test conventions for a new Claude Code workspace, while a personal user-level instruction file does not automatically impose a shared team standard.
C:Session continuation can reestablish conversational state without restarting the task from scratch; the supported outcome is to continue an interrupted refactor while retaining relevant prior decisions, whereas this scenario requires the ability to establish a discoverable set of build and test conventions for a new Claude Code workspace; the developer still needs to recheck whether repository files changed in the meantime.
D:This approach serves the separate need to make a specialised review procedure available as task-specific instructions and assets because a Skill packages a repeatable capability that Claude can load when relevant to the work; it does not establish the outcome to establish a discoverable set of build and test conventions for a new Claude Code workspace, and a one-off chat turn is not a maintainable shared workflow definition.
Question 568
A technical specification for an inference routing application assigns two jobs to separate modules: module A must contain cumulative token and tool cost across a recursive research session, and module B must verify that an optimization actually reuses an earlier prompt prefix. Which two-part solution is appropriate?
- First component: Set maximum step counts for agents. Second component: Use model routing for simple versus hard cases.
- First component: Use model routing for simple versus hard cases. Second component: Track input and output usage separately.
- First component: Track input and output usage separately. Second component: Measure cache read tokens.
- First component: Set maximum step counts for agents. Second component: Measure cache read tokens.
Explanation
Correct Answer
D:The first proposal fits its assigned role because a bound on iterations prevents repeated generation and calls from growing without limit, while the second proposal fits its assigned role because usage fields show how much eligible cached input was read rather than recomputed; their respective acceptance criteria are to contain cumulative token and tool cost across a recursive research session and to verify that an optimization actually reuses an earlier prompt prefix.
Incorrect Answers
A:The first proposal fits its assigned role because a bound on iterations prevents repeated generation and calls from growing without limit, while the second proposal serves the different purpose to spend high-capability tokens only when validation indicates complexity instead of the assigned second role because conditional routing improves blended cost without discarding an escalation path; their respective acceptance criteria are to contain cumulative token and tool cost across a recursive research session and to verify that an optimization actually reuses an earlier prompt prefix.
B:The first proposal serves the different purpose to spend high-capability tokens only when validation indicates complexity instead of the assigned first role because conditional routing improves blended cost without discarding an escalation path, while the second proposal serves the different purpose to forecast cost for an application that sends long documents but returns brief classifications instead of the assigned second role because metering by token category reveals the main cost driver and supports realistic forecasts; their respective acceptance criteria are to contain cumulative token and tool cost across a recursive research session and to verify that an optimization actually reuses an earlier prompt prefix.
C:The first proposal serves the different purpose to forecast cost for an application that sends long documents but returns brief classifications instead of the assigned first role because metering by token category reveals the main cost driver and supports realistic forecasts, while the second proposal fits its assigned role because usage fields show how much eligible cached input was read rather than recomputed; their respective acceptance criteria are to contain cumulative token and tool cost across a recursive research session and to verify that an optimization actually reuses an earlier prompt prefix.
Question 569
A prompt engineering team owns two independent components. The first must prevent a specialist's exhaustive document scan from contaminating the coordinator's working context; the second must fit a large knowledge base into the context of a customer answer. Which paired plan fulfills both?
- First component: Reserve space for the model's output. Second component: Separate long-term memory from active scratchpad.
- First component: Use scoped subagent contexts. Second component: Reserve space for the model's output.
- First component: Anchor summaries to source identifiers. Second component: Reserve space for the model's output.
- First component: Separate long-term memory from active scratchpad. Second component: Prioritize high-signal retrieved passages.
- First component: Use scoped subagent contexts. Second component: Prioritize high-signal retrieved passages.
Explanation
Correct Answer
E:The first proposal fits its assigned role because isolated workers return concise findings while retaining intermediate detail within their own window, while the second proposal fits its assigned role because ranking by relevance and authority places the most useful evidence ahead of incidental matches; their respective acceptance criteria are to prevent a specialist's exhaustive document scan from contaminating the coordinator's working context and to fit a large knowledge base into the context of a customer answer.
Incorrect Answers
A:The first proposal serves the different purpose to avoid using the entire context budget on retrieved input before generating a response instead of the assigned first role because input assembly must leave room for the requested completion and any needed reasoning, while the second proposal serves the different purpose to prevent outdated user preferences from being treated as current task instructions instead of the assigned second role because explicit storage and freshness rules govern what is retained and when it is reintroduced; their respective acceptance criteria are to prevent a specialist's exhaustive document scan from contaminating the coordinator's working context and to fit a large knowledge base into the context of a customer answer.
B:The first proposal fits its assigned role because isolated workers return concise findings while retaining intermediate detail within their own window, while the second proposal serves the different purpose to avoid using the entire context budget on retrieved input before generating a response instead of the assigned second role because input assembly must leave room for the requested completion and any needed reasoning; their respective acceptance criteria are to prevent a specialist's exhaustive document scan from contaminating the coordinator's working context and to fit a large knowledge base into the context of a customer answer.
C:The first proposal serves the different purpose to enable a reviewer to reconstruct evidence after context has been compacted instead of the assigned first role because stable document IDs and passage references preserve provenance beyond the shortened working memory, while the second proposal serves the different purpose to avoid using the entire context budget on retrieved input before generating a response instead of the assigned second role because input assembly must leave room for the requested completion and any needed reasoning; their respective acceptance criteria are to prevent a specialist's exhaustive document scan from contaminating the coordinator's working context and to fit a large knowledge base into the context of a customer answer.
D:The first proposal serves the different purpose to prevent outdated user preferences from being treated as current task instructions instead of the assigned first role because explicit storage and freshness rules govern what is retained and when it is reintroduced, while the second proposal fits its assigned role because ranking by relevance and authority places the most useful evidence ahead of incidental matches; their respective acceptance criteria are to prevent a specialist's exhaustive document scan from contaminating the coordinator's working context and to fit a large knowledge base into the context of a customer answer.
Question 570
The acceptance criteria for a production API change state that it must return an answer to a short user request through a backend service. Which implementation aligns with that criterion?
- Handle a refusal stop_reason safely
- Handle the max_tokens stop_reason
- Send tool_result content back to Claude
- Call the Messages API with explicit model and max_tokens
- Differentiate client and server tool execution
Explanation
Correct Answer
D:A message request identifies the target model, a message list, and an output-token ceiling; this behavior directly supports the need to return an answer to a short user request through a backend service. The API is not a stateful chat session unless prior turns are supplied.
Incorrect Answers
A:A refusal is a deliberate non-completion path that requires a defined application response; this applies to the different goal to avoid parsing safety refusals as valid JSON business records, not the requirement to return an answer to a short user request through a backend service; repeatedly increasing the token limit does not resolve a content refusal.
B:When an application needs to recover a response that ended because its output budget was exhausted, the finish reason identifies truncation, so a caller may need a continuation or a revised token budget; the current capability must instead return an answer to a short user request through a backend service, while treating that response as a complete answer can hide missing fields.
C:A result block tied to the tool call returns the external observation to the model for synthesis; the supported outcome is to produce a user-facing answer after a successful inventory lookup, whereas this scenario requires the ability to return an answer to a short user request through a backend service; a function's return value in server memory is invisible until included in the next request.
E:The integration owns execution of client tools, while supported server tools are performed by the provider; despite being useful when a service must avoid assuming a custom local database function runs inside Anthropic infrastructure, it is not a solution to return an answer to a short user request through a backend service; tool names alone do not determine who executes the action.