Claude Certified Developer - Foundations CCDV-F Practice Test 20
Question 190
This engineering control is missing: "Validate HTTP status, content types and JSON response contracts before processing API results". The reported condition is: A service trusts network success and never checks the status code or body shape returned by a dependency. What is the most direct failure risk?
- Minor refactors can silently break downstream consumers or error handling.
- Transient errors can be misinterpreted as valid model data or corrupt application state.
- One logical action can produce duplicated invoices, tickets or payments.
- Credentials or personal data can be exposed in log storage, or incidents can be impossible to trace.
Explanation
Correct Answer
B:Transient errors can be misinterpreted as valid model data or corrupt application state. This follows from the reported condition: A service trusts network success and never checks the status code or body shape returned by a dependency. The reason is that rEST clients must handle status codes and payload structure as separate error conditions. The appropriate mitigation is: Validate HTTP status, content types and JSON response contracts before processing API results. Evidence of success would be: Negative HTTP fixtures produce explicit typed failures and valid JSON remains parseable.
Incorrect Answers
A:Minor refactors can silently break downstream consumers or error handling. That exposure calls for use version control, code review and automated contract plus failure-mode tests for integration changes. The scenario here instead risks transient errors can be misinterpreted as valid model data or corrupt application state.
C:One logical action can produce duplicated invoices, tickets or payments. That exposure calls for use idempotency keys or a verified deduplication record around side-effecting operations. The scenario here instead risks transient errors can be misinterpreted as valid model data or corrupt application state.
D:Credentials or personal data can be exposed in log storage, or incidents can be impossible to trace. That exposure calls for log bounded structured request IDs, latency and failure categories while redacting secrets and sensitive content. The scenario here instead risks transient errors can be misinterpreted as valid model data or corrupt application state.
Question 191
A developer encounters this situation: A support app mixes stale search snippets with current knowledge and presents unsupported confidence. What is the MOST appropriate technical response?
- Use documented Messages API request fields and supported client SDK methods with schema validation.
- Require structured validated outputs or constrained tool schemas before business-side execution.
- Build retrieval with provenance-aware citations and grounded-answer validation before presenting claims.
- Use supported streaming events with explicit lifecycle, partial-render and finalization handling.
Explanation
Correct Answer
C:Build retrieval with provenance-aware citations and grounded-answer validation before presenting claims. This directly addresses the situation: A support app mixes stale search snippets with current knowledge and presents unsupported confidence. The technical reason is that rAG effectiveness depends on relevant evidence and an explicit boundary between retrieved facts and model inference. Without it, users may act on invented or outdated instructions when retrieval provenance is missing. A concrete acceptance check is: A held-out query returns a supported answer citing only documents actually retrieved for that query.
Incorrect Answers
A:Use documented Messages API request fields and supported client SDK methods with schema validation. This does not repair the current workflow because rAG effectiveness depends on relevant evidence and an explicit boundary between retrieved facts and model inference. The targeted change is build retrieval with provenance-aware citations and grounded-answer validation before presenting claims.
B:Require structured validated outputs or constrained tool schemas before business-side execution. This does not repair the current workflow because rAG effectiveness depends on relevant evidence and an explicit boundary between retrieved facts and model inference. The targeted change is build retrieval with provenance-aware citations and grounded-answer validation before presenting claims.
D:Use supported streaming events with explicit lifecycle, partial-render and finalization handling. This does not repair the current workflow because rAG effectiveness depends on relevant evidence and an explicit boundary between retrieved facts and model inference. The targeted change is build retrieval with provenance-aware citations and grounded-answer validation before presenting claims.
Question 192
This engineering control is missing: "Maintain a registered allowlist of tool schemas and validate returned names and arguments before execution". The reported condition is: An engineer assumes model tool definitions make permissions safe without enforcing requested arguments. What is the most direct failure risk?
- Unreviewed library updates can break production API clients unexpectedly.
- Jobs can be lost or cost more when the wrong execution mode is used.
- The UI or tool handler can assemble malformed content and act on partial arguments.
- Unvalidated tool calls may execute unauthorized operations or crash an integration.
Explanation
Correct Answer
D:Unvalidated tool calls may execute unauthorized operations or crash an integration. This follows from the reported condition: An engineer assumes model tool definitions make permissions safe without enforcing requested arguments. The reason is that tool descriptions guide model behavior but actual invocation authority remains in client code. The appropriate mitigation is: Maintain a registered allowlist of tool schemas and validate returned names and arguments before execution. Evidence of success would be: Tests with unknown tool names or invalid arguments are rejected without side effects.
Incorrect Answers
A:Unreviewed library updates can break production API clients unexpectedly. That exposure calls for pin tested dependencies and use staged upgrades with regression tests and rollback. The scenario here instead risks unvalidated tool calls may execute unauthorized operations or crash an integration.
B:Jobs can be lost or cost more when the wrong execution mode is used. That exposure calls for select supported batch processing where appropriate and monitor batch lifecycle and individual results. The scenario here instead risks unvalidated tool calls may execute unauthorized operations or crash an integration.
C:The UI or tool handler can assemble malformed content and act on partial arguments. That exposure calls for process the documented streaming event sequence by event type and finalize only on completion. The scenario here instead risks unvalidated tool calls may execute unauthorized operations or crash an integration.
Question 193
In this situation: A multistep research task performs poorly because reasoning effort is overly constrained. The developer proposes: Choose appropriate thinking or effort settings based on task complexity, latency and budget constraints. Which principle BEST justifies the approach?
- More internal reasoning can help complex decisions but consumes latency or tokens depending on the model and settings.
- Examples and instruction clarity improve task alignment but must be consistent with each other.
- Nonblocking request handling improves throughput only when concurrency remains controlled and resource-safe.
- Generative models can vary their output even for similar inputs; application correctness needs explicit checks.
Explanation
Correct Answer
A:More internal reasoning can help complex decisions but consumes latency or tokens depending on the model and settings. In the given situation, a multistep research task performs poorly because reasoning effort is overly constrained. That consideration supports the measure: Choose appropriate thinking or effort settings based on task complexity, latency and budget constraints. Ignoring it creates this exposure: Overspending on trivial tasks or under-allocating difficult analysis can harm cost and quality. Verify the implementation by checking: A benchmark shows required accuracy within agreed latency and token budgets for each task class.
Incorrect Answers
B:Examples and instruction clarity improve task alignment but must be consistent with each other. This principle relates to use clear task instructions and targeted examples when the required schema or decision boundary is non-obvious. The observed failure instead depends on more internal reasoning can help complex decisions but consumes latency or tokens depending on the model and settings. The appropriate choice is more internal reasoning can help complex decisions but consumes latency or tokens depending on the model and settings.
C:Nonblocking request handling improves throughput only when concurrency remains controlled and resource-safe. This principle relates to use asynchronous SDK or REST calls with bounded concurrency and correct cleanup of pending tasks. The observed failure instead depends on more internal reasoning can help complex decisions but consumes latency or tokens depending on the model and settings. The appropriate choice is more internal reasoning can help complex decisions but consumes latency or tokens depending on the model and settings.
D:Generative models can vary their output even for similar inputs; application correctness needs explicit checks. This principle relates to evaluate stochastic model output with repeated trials and constrain tasks through validation and clear requirements. The observed failure instead depends on more internal reasoning can help complex decisions but consumes latency or tokens depending on the model and settings. The appropriate choice is more internal reasoning can help complex decisions but consumes latency or tokens depending on the model and settings.
Question 194
This engineering control is missing: "Use reusable supported SDK or HTTP clients with connection management and nonblocking I/O". The reported condition is: A Node service uses synchronous blocking operations during bursts of Claude streaming responses. What is the most direct failure risk?
- Tool requests and multi-part results may be lost or misinterpreted by a text-only parser.
- Throughput and reliability can collapse as concurrent requests increase.
- Transient errors can be misinterpreted as valid model data or corrupt application state.
- Users may act on invented or outdated instructions when retrieval provenance is missing.
Explanation
Correct Answer
B:Throughput and reliability can collapse as concurrent requests increase. This follows from the reported condition: A Node service uses synchronous blocking operations during bursts of Claude streaming responses. The reason is that resource-conscious client design prevents connection exhaustion and event-loop stalls in API services. The appropriate mitigation is: Use reusable supported SDK or HTTP clients with connection management and nonblocking I/O. Evidence of success would be: A sustained load test shows bounded sockets and stable event-loop response latency.
Incorrect Answers
A:Tool requests and multi-part results may be lost or misinterpreted by a text-only parser. That exposure calls for parse documented typed content blocks and stop reasons rather than flattening responses into text. The scenario here instead risks throughput and reliability can collapse as concurrent requests increase.
C:Transient errors can be misinterpreted as valid model data or corrupt application state. That exposure calls for validate HTTP status, content types and JSON response contracts before processing API results. The scenario here instead risks throughput and reliability can collapse as concurrent requests increase.
D:Users may act on invented or outdated instructions when retrieval provenance is missing. That exposure calls for build retrieval with provenance-aware citations and grounded-answer validation before presenting claims. The scenario here instead risks throughput and reliability can collapse as concurrent requests increase.
Question 195
To address the situation: A repository refactor uses a privileged terminal tool with no pre-command validation or reviewer gate. The team implements: "Use Claude Code permissions and supported pre-tool hooks to enforce command approval and safety checks". Which evidence BEST demonstrates success?
- A controlled coding task follows project instructions and avoids excluded files while producing a reviewable diff.
- A bounded patch passes tests and review without unrelated file modifications.
- An unsafe command is intercepted and refused while a harmless build/test command succeeds.
- Cross-user and subagent tests confirm no unauthorized context appears in model input or outputs.
Explanation
Correct Answer
C:An unsafe command is intercepted and refused while a harmless build/test command succeeds. This directly tests the outcome of use Claude Code permissions and supported pre-tool hooks to enforce command approval and safety checks. in the described case: A repository refactor uses a privileged terminal tool with no pre-command validation or reviewer gate. The underlying principle is that deterministic approval boundaries prevent autonomous coding suggestions from becoming unreviewed operational changes. If the change is ineffective, a generated command could delete files, leak secrets or deploy unapproved code. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:A controlled coding task follows project instructions and avoids excluded files while producing a reviewable diff. This outcome would validate maintain concise project-level Claude Code instructions and scope file/tool permissions to the repository policy, not the requested intervention. The required test result is an unsafe command is intercepted and refused while a harmless build/test command succeeds.
B:A bounded patch passes tests and review without unrelated file modifications. This outcome would validate review Claude Code changes as small diffs and run targeted tests before accepting or committing them, not the requested intervention. The required test result is an unsafe command is intercepted and refused while a harmless build/test command succeeds.
D:Cross-user and subagent tests confirm no unauthorized context appears in model input or outputs. This outcome would validate isolate contexts by user and task, passing only necessary evidence to each subagent, not the requested intervention. The required test result is an unsafe command is intercepted and refused while a harmless build/test command succeeds.
Question 196
A developer encounters this situation: A Claude Agent SDK application has hooks but required audit and approval logic lives only in prompt text. What is the MOST appropriate technical response?
- Keep tool execution and approval policy in deterministic application code rather than relying on model self-restraint.
- Pass tool results as lower-trust data and enforce tool authorization in the application layer.
- Choose managed versus self-hosted agent execution by evaluating residency, observability, permissions and operational responsibility.
- Use agent or Claude Code hooks for deterministic validations and approvals at supported execution boundaries.
Explanation
Correct Answer
D:Use agent or Claude Code hooks for deterministic validations and approvals at supported execution boundaries. This directly addresses the situation: A Claude Agent SDK application has hooks but required audit and approval logic lives only in prompt text. The technical reason is that hooks can apply nonprobabilistic policy checks around tool use when installed in the correct execution lifecycle. Without it, safety requirements expressed only as prose can be ignored or reinterpreted by the model. A concrete acceptance check is: An intentional risky tool call is blocked by a hook while authorized benign actions continue.
Incorrect Answers
A:Keep tool execution and approval policy in deterministic application code rather than relying on model self-restraint. This does not repair the current workflow because hooks can apply nonprobabilistic policy checks around tool use when installed in the correct execution lifecycle. The targeted change is use agent or Claude Code hooks for deterministic validations and approvals at supported execution boundaries.
B:Pass tool results as lower-trust data and enforce tool authorization in the application layer. This does not repair the current workflow because hooks can apply nonprobabilistic policy checks around tool use when installed in the correct execution lifecycle. The targeted change is use agent or Claude Code hooks for deterministic validations and approvals at supported execution boundaries.
C:Choose managed versus self-hosted agent execution by evaluating residency, observability, permissions and operational responsibility. This does not repair the current workflow because hooks can apply nonprobabilistic policy checks around tool use when installed in the correct execution lifecycle. The targeted change is use agent or Claude Code hooks for deterministic validations and approvals at supported execution boundaries.
Question 197
A developer encounters this situation: A team has no usage attribution after introducing multiple Claude models into one tenant. What is the MOST appropriate technical response?
- Capture provider request IDs, token usage and model metadata in privacy-safe telemetry.
- Inspect stop reasons and complete the documented tool-use and tool-result exchange before finalizing output.
- Separate trusted system/developer instructions from untrusted input and validate any requested tool execution.
- Persist and re-supply required prior message context explicitly according to the stateless Messages API pattern.
Explanation
Correct Answer
A:Capture provider request IDs, token usage and model metadata in privacy-safe telemetry. This directly addresses the situation: A team has no usage attribution after introducing multiple Claude models into one tenant. The technical reason is that operational auditing needs identifiers and metering to diagnose failures and allocate model costs. Without it, an incident cannot be traced and usage budgets can drift unnoticed. A concrete acceptance check is: A test call yields correlated request metadata and measured token consumption without leaking prompt content.
Incorrect Answers
B:Inspect stop reasons and complete the documented tool-use and tool-result exchange before finalizing output. This does not repair the current workflow because operational auditing needs identifiers and metering to diagnose failures and allocate model costs. The targeted change is capture provider request IDs, token usage and model metadata in privacy-safe telemetry.
C:Separate trusted system/developer instructions from untrusted input and validate any requested tool execution. This does not repair the current workflow because operational auditing needs identifiers and metering to diagnose failures and allocate model costs. The targeted change is capture provider request IDs, token usage and model metadata in privacy-safe telemetry.
D:Persist and re-supply required prior message context explicitly according to the stateless Messages API pattern. This does not repair the current workflow because operational auditing needs identifiers and metering to diagnose failures and allocate model costs. The targeted change is capture provider request IDs, token usage and model metadata in privacy-safe telemetry.
Question 198
This engineering control is missing: "Use documented Messages API request fields and supported client SDK methods with schema validation". The reported condition is: A service changes SDK versions but still uses an outdated Messages payload shape. What is the most direct failure risk?
- Tool-dependent tasks may end incomplete or return an unfulfilled action description.
- Requests can be rejected or interpreted differently when fields are malformed.
- The model may answer without critical prior constraints or invent missing context.
- Users can receive false completion messages or experience cascading outages and wasted requests.
Explanation
Correct Answer
B:Requests can be rejected or interpreted differently when fields are malformed. This follows from the reported condition: A service changes SDK versions but still uses an outdated Messages payload shape. The reason is that aPI correctness depends on matching the current endpoint contract for messages, model and token limits. The appropriate mitigation is: Use documented Messages API request fields and supported client SDK methods with schema validation. Evidence of success would be: A contract test sends a supported payload and receives a properly typed Messages response.
Incorrect Answers
A:Tool-dependent tasks may end incomplete or return an unfulfilled action description. That exposure calls for inspect stop reasons and complete the documented tool-use and tool-result exchange before finalizing output. The scenario here instead risks requests can be rejected or interpreted differently when fields are malformed.
C:The model may answer without critical prior constraints or invent missing context. That exposure calls for persist and re-supply required prior message context explicitly according to the stateless Messages API pattern. The scenario here instead risks requests can be rejected or interpreted differently when fields are malformed.
D:Users can receive false completion messages or experience cascading outages and wasted requests. That exposure calls for design timeouts, bounded retry, graceful degradation and explicit failure responses for Claude-dependent features. The scenario here instead risks requests can be rejected or interpreted differently when fields are malformed.
Question 199
In this situation: An enterprise agent must call a proprietary inventory service across multiple clients and runtimes. The developer proposes: Use a reusable Skill for procedural guidance and a scoped tool/MCP server for external system actions. Which principle BEST justifies the approach?
- Customization should add needed control or interoperability, not unnecessary maintenance complexity.
- Tool outputs must be accurate and safe observations; they are not trusted instructions or silent successes.
- Skills package instructions while tools and MCP servers expose executable capabilities and data interfaces.
- Tool-use prompts do not replace deterministic authorization in the client or server.
Explanation
Correct Answer
C:Skills package instructions while tools and MCP servers expose executable capabilities and data interfaces. In the given situation, an enterprise agent must call a proprietary inventory service across multiple clients and runtimes. That consideration supports the measure: Use a reusable Skill for procedural guidance and a scoped tool/MCP server for external system actions. Ignoring it creates this exposure: Treating an instruction document as a network integration can create brittle or unauthorized behavior. Verify the implementation by checking: A test confirms the Skill guides a workflow and the tool separately enforces real data access.
Incorrect Answers
A:Customization should add needed control or interoperability, not unnecessary maintenance complexity. This principle relates to choose built-in tools, Skills, custom functions or MCP integration based on reuse, ownership and capability requirements. The observed failure instead depends on skills package instructions while tools and MCP servers expose executable capabilities and data interfaces. The appropriate choice is skills package instructions while tools and MCP servers expose executable capabilities and data interfaces.
B:Tool outputs must be accurate and safe observations; they are not trusted instructions or silent successes. This principle relates to return typed, bounded, sanitized tool results with explicit errors and retry metadata. The observed failure instead depends on skills package instructions while tools and MCP servers expose executable capabilities and data interfaces. The appropriate choice is skills package instructions while tools and MCP servers expose executable capabilities and data interfaces.
D:Tool-use prompts do not replace deterministic authorization in the client or server. This principle relates to authorize tool name, arguments and caller identity before performing any side effect. The observed failure instead depends on skills package instructions while tools and MCP servers expose executable capabilities and data interfaces. The appropriate choice is skills package instructions while tools and MCP servers expose executable capabilities and data interfaces.
Question 200
This engineering control is missing: "Persist and re-supply required prior message context explicitly according to the stateless Messages API pattern". The reported condition is: A chat app assumes the Messages API automatically remembers every earlier conversation. What is the most direct failure risk?
- A partial or invalid answer can corrupt downstream parsing or display.
- An incident cannot be traced and usage budgets can drift unnoticed.
- A restart can lose progress or duplicate external mutations.
- The model may answer without critical prior constraints or invent missing context.
Explanation
Correct Answer
D:The model may answer without critical prior constraints or invent missing context. This follows from the reported condition: A chat app assumes the Messages API automatically remembers every earlier conversation. The reason is that conversation continuity depends on the application supplying relevant history or state in each request. The appropriate mitigation is: Persist and re-supply required prior message context explicitly according to the stateless Messages API pattern. Evidence of success would be: A multi-turn regression test succeeds when required history is supplied and fails safely when it is absent.
Incorrect Answers
A:A partial or invalid answer can corrupt downstream parsing or display. That exposure calls for validate output length and stop reason; retry or redesign output constraints when truncation occurs. The scenario here instead risks the model may answer without critical prior constraints or invent missing context.
B:An incident cannot be traced and usage budgets can drift unnoticed. That exposure calls for capture provider request IDs, token usage and model metadata in privacy-safe telemetry. The scenario here instead risks the model may answer without critical prior constraints or invent missing context.
C:A restart can lose progress or duplicate external mutations. That exposure calls for persist necessary workflow checkpoints and reconcile completed actions during restarts. The scenario here instead risks the model may answer without critical prior constraints or invent missing context.