Question 340
An optimization once worked but token charges rise after a tool schema update. How should the implementation handle this need?
- Read cache diagnostics when hit rate falls
- Remove unnecessary cache breakpoints
- Include cache reads and writes in cost calculations
- Move unchanged long instructions into a shared prefix
Explanation
Correct Answer
A:Cache usage metrics and prefix comparisons reveal the changed content causing misses, subject to this requirement: increasing the context window will not restore a mismatched cache prefix.
Incorrect Answers
B:Simpler eligible breakpoint design reduces confusion and aligns with documented limits; here, the controlling capability is that cache usage metrics and prefix comparisons reveal the changed content causing misses, but arbitrary markers cannot create savings if prefixes keep changing.
C:Cache creation and cache retrieval have distinct billing treatment that affects economics; the missing capability is more specific: cache usage metrics and prefix comparisons reveal the changed content causing misses; treating every token as an uncached input misstates true spend.
D:Stable prefix design allows eligible prompt caching to amortize repeated input processing; by comparison, the intended solution relies on this: cache usage metrics and prefix comparisons reveal the changed content causing misses; putting request-specific content before a cache checkpoint defeats reuse.
Question 341
A developer sees different tool permissions between their laptop and CI despite using the same repository. Which change would satisfy the constraint?
- Check effective settings across scopes
- Keep secrets out of settings files committed to Git
- Document required environment variables
- Use local settings for workstation-only behavior
Explanation
Correct Answer
A:Resolving effective configuration reveals higher-priority policy and machine-specific overrides; notably, reading only one settings file can miss the operative restriction.
Incorrect Answers
B:Secrets belong in protected secret stores or environment injection rather than tracked source; in contrast, resolving effective configuration reveals higher-priority policy and machine-specific overrides, while repository history can preserve credentials even after a later edit deletes them.
C:An explicit configuration contract makes setup repeatable without embedding secret values; this addresses a separate concern, not the fact that resolving effective configuration reveals higher-priority policy and machine-specific overrides; copying the original developer's entire environment is neither secure nor maintainable.
D:Local configuration can hold machine-specific client preferences outside shared version control; here, the controlling capability is that resolving effective configuration reveals higher-priority policy and machine-specific overrides, but committing private machine policy could surprise teammates.
Question 342
An extracted invoice total should match its line items within an approved rounding tolerance. What is the right implementation response?
- Parse generated JSON with a real parser
- Include source spans for extracted values
- Cross-check numerical fields with deterministic logic
- Return an explicit unknown for missing evidence
Explanation
Correct Answer
C:Code verifies arithmetic consistency after the model proposes the values; the important constraint is that model confidence does not establish accounting correctness.
Incorrect Answers
A:Standard JSON parsing catches syntactic errors instead of relying on visual plausibility; the needed capability is different—code verifies arithmetic consistency after the model proposes the values—and successfully parsed JSON can still violate expected business types.
B:Provenance fields or offsets let reviewers inspect the original supporting text, whereas the requirement calls for another behavior: code verifies arithmetic consistency after the model proposes the values; a fluent explanation without a source is not independently verifiable.
D:A nullable or unknown state avoids inventing a plausible but unsupported date; the requirement instead turns on this behavior: code verifies arithmetic consistency after the model proposes the values; guessing a value would convert absence of evidence into false data.
Question 343
A sales assistant needs a returning account's consented product preferences across separate visits. What should the team do at this decision point?
- Use a compensating action for a committed write
- Use ephemeral scratch context for one run
- Use keyed long-term memory for approved facts
- Use retrieval from a source repository
Explanation
Correct Answer
C:Stored records indexed by authorized account ID can be retrieved for later tasks; in production, access controls and deletion policy must govern persistence.
Incorrect Answers
A:A compensating operation undoes a completed business change when atomic rollback spans unavailable services; here, the controlling capability is that stored records indexed by authorized account ID can be retrieved for later tasks, but compensation must itself be auditable and may require authorized human review.
B:Transient context supports local reasoning without creating long-term customer state; the missing capability is more specific: stored records indexed by authorized account ID can be retrieved for later tasks; it should not be mistaken for durable memory across new sessions.
D:Fetching current documentation from a maintained source avoids depending on recollected assertions; the needed capability is different—stored records indexed by authorized account ID can be retrieved for later tasks—and retrieved snippets still need source and version checks before action.
Question 344
Three unrelated pull requests need separate reviews that can run without cross-contamination. Which choice should be used here?
- Split by independent artifact
- Split by security boundary
- Use typed PydanticAI-style dependencies
- Split by sequential expertise
Explanation
Correct Answer
A:Artifact-level workers can process distinct diffs in parallel and return scoped results, although shared global context might cause one change set to bias another.
Incorrect Answers
B:Isolation by trust zone prevents a public-facing worker from gaining private data access; however, the critical mechanism here is that artifact-level workers can process distinct diffs in parallel and return scoped results, and worker separation without separate credentials or tool allowlists is superficial.
C:A typed framework aligns model interactions with application data models and testable dependencies; the requirement instead turns on this behavior: artifact-level workers can process distinct diffs in parallel and return scoped results; types validate shape, not the truth of every generated factual assertion.
D:A staged handoff gives each specialist the prior approved artifact it needs; this cannot substitute for the behavior that artifact-level workers can process distinct diffs in parallel and return scoped results, because parallelizing dependent expert roles would force the implementer to guess requirements.
Question 345
A repository agent may edit files, but every proposed shell action must be screened against a compliance policy. Which development approach should be selected?
- Combine MCP resources with a summarization prompt
- Use a built-in server tool for a supported commodity task
- Combine a Skill with a read-only tool
- Combine a deterministic hook with a coding agent
Explanation
Correct Answer
D:A hook enforces the external check while the model handles the flexible development task; without correct hook wiring and tool permissions, guidance alone is insufficient.
Incorrect Answers
A:Resources supply source data while a prompt governs how it should be analyzed; here, the controlling capability is that a hook enforces the external check while the model handles the flexible development task, but neither component independently guarantees the summary is factually faithful.
B:A built-in server tool uses the platform's execution flow and supported result types; the missing capability is more specific: a hook enforces the external check while the model handles the flexible development task; it does not grant custom private database access.
C:The Skill supplies the workflow while the tool supplies authorized external facts; by comparison, the intended solution relies on this: a hook enforces the external check while the model handles the flexible development task; instruction packages and executable integrations solve different needs.
Question 346
A production backend sends customer information to the Claude API across untrusted networks. How should the implementation handle this need?
- Use connection reuse for frequent calls
- Use HTTP request-response for discrete inference
- Use HTTPS for remote model requests
- Use request timeouts for bounded waits
Explanation
Correct Answer
C:TLS protects data in transit against passive interception and many tampering threats; encryption does not substitute for caller authentication or payload minimization.
Incorrect Answers
A:Persistent connections reduce repeated connection setup overhead; the missing capability is more specific: TLS protects data in transit against passive interception and many tampering threats; pool sizing still has to respect concurrency and upstream rate limits.
B:Standard HTTPS requests fit isolated generation operations without long-lived bidirectional connections; by comparison, the intended solution relies on this: TLS protects data in transit against passive interception and many tampering threats; opening a persistent socket adds state and lifecycle complexity where it is unnecessary.
D:Client networking deadlines convert unbounded waits into controlled failures, whereas the requirement calls for another behavior: TLS protects data in transit against passive interception and many tampering threats; a model token cap does not constrain socket wait times.
Question 347
A Claude application needs supported provider-managed web search and wants to avoid operating its own crawler. What should be implemented to solve this problem?
- Use a Skill for reusable procedures
- Use a sandbox for model-requested code execution
- Use a custom client tool for a private business operation
- Use a built-in server tool for a supported commodity task
Explanation
Correct Answer
D:A built-in server tool uses the platform's execution flow and supported result types, although it does not grant custom private database access.
Incorrect Answers
A:Skills package instructional workflows that an agent can reuse within supported clients; the missing capability is more specific: a built-in server tool uses the platform's execution flow and supported result types; they are guidance, not network APIs or execution permissions.
B:Process and network isolation contain potential side effects of generated programs; by comparison, the intended solution relies on this: a built-in server tool uses the platform's execution flow and supported result types; a model's internal safety judgment is not an OS permission boundary.
C:A user-defined tool schema plus local dispatcher safely bridges the model to that system; the needed capability is different—a built-in server tool uses the platform's execution flow and supported result types—and the developer must operate the function and enforce its permissions.
Question 348
A customer asks a pronoun-based question about a policy discussed two turns earlier. Which of the following would work as specified?
- Send tool_result in a following user message
- Restart with a concise summary when context is exhausted
- Continue after max_tokens when appropriate
- Resubmit relevant history for a follow-up
Explanation
Correct Answer
D:The stateless API needs the prior context supplied again or reconstructed by the app; separate requests do not automatically share private conversational state.
Incorrect Answers
A:The reply associates content with the tool_use identifier in the continued message history; here, the controlling capability is that the stateless API needs the prior context supplied again or reconstructed by the app, but a standalone text string is not the protocol-level tool result envelope.
B:Compaction retains goals, commitments, and key evidence in less context before the next call; the missing capability is more specific: the stateless API needs the prior context supplied again or reconstructed by the app; summarization can lose details, so critical structured state remains in application storage.
C:The application treats a truncated completion differently from an intentional end and safely continues if possible; by comparison, the intended solution relies on this: the stateless API needs the prior context supplied again or reconstructed by the app; delivering a partial JSON document as complete would break downstream parsing.
Question 349
A shared MCP service is upgrading a tool schema used by multiple coding clients. Which approach best meets this requirement?
- Return structured errors from tools
- Validate operations in the server handler
- Version and test server interfaces
- Use stdio for a local subprocess integration
Explanation
Correct Answer
C:Compatibility tests and versioned rollout protect consumers from unexpected protocol or field changes; notably, unreviewed changes can break integrations even when the server starts successfully.
Incorrect Answers
A:Explicit error signaling distinguishes tool failure from an empty successful result; however, the critical mechanism here is that compatibility tests and versioned rollout protect consumers from unexpected protocol or field changes, and swallowing errors can cause a model to hallucinate completion.
B:Server handlers enforce identity, scope, and business rules before accessing protected systems; the requirement instead turns on this behavior: compatibility tests and versioned rollout protect consumers from unexpected protocol or field changes; trusting the caller's description is not a security control.
D:Standard input and output suit tightly coupled local client-server interactions; in contrast, compatibility tests and versioned rollout protect consumers from unexpected protocol or field changes, while the server's standard output must remain protocol-clean instead of mixing human debug prints.
Question 350
The investigative tools have resolved the question and the service must return a concise conclusion. Which production safeguard is most relevant?
- Finish with a user-facing answer after the last action
- Escalate after repeated inconclusive tool results
- Observe a tool result before choosing the next action
- Use a light direct API integration
Explanation
Correct Answer
A:The model synthesizes a final response once no additional client tool request is needed; notably, a raw tool result is not automatically a contextualized customer answer.
Incorrect Answers
B:Bounded fallback returns uncertainty and a trace for human follow-up rather than fabricating certainty; in contrast, the model synthesizes a final response once no additional client tool request is needed, while extra iterations are not justified once the cost and confidence guardrails trigger.
C:Alternating action and observation permits evidence-driven choices rather than a fully predetermined plan; this addresses a separate concern, not the fact that the model synthesizes a final response once no additional client tool request is needed; every loop must check for stop conditions and tool failures.
D:A direct client minimizes abstraction and makes the request path easy to inspect; here, the controlling capability is that the model synthesizes a final response once no additional client tool request is needed, but it will need explicit orchestration if tool calls and branching emerge later.