Claude Certified Developer - Foundations CCDV-F Practice Test 12
Question 110
This engineering control is missing: "Capture privacy-safe model/tool traces and reproduce failures with controlled test fixtures". The reported condition is: An application fails intermittently after a prompt change but developers have no trace of tool calls. What is the most direct failure risk?
- Unrelated user data may contaminate answers or leak into another task.
- Intermittent failures can remain unreproducible or be blamed on the wrong integration layer.
- Context bloat can increase costs, truncation and inconsistent task completion.
- An update may degrade key user journeys without detection despite an impressive demo.
Explanation
Correct Answer
B:Intermittent failures can remain unreproducible or be blamed on the wrong integration layer. This follows from the reported condition: An application fails intermittently after a prompt change but developers have no trace of tool calls. The reason is that debugging agent and API behavior requires visibility into inputs, tool sequence and stop reasons. The appropriate mitigation is: Capture privacy-safe model/tool traces and reproduce failures with controlled test fixtures. Evidence of success would be: A stored failing trace reproduces the issue and a corrected test passes under the same fixture.
Incorrect Answers
A:Unrelated user data may contaminate answers or leak into another task. That exposure calls for isolate contexts by user and task, passing only necessary evidence to each subagent. The scenario here instead risks intermittent failures can remain unreproducible or be blamed on the wrong integration layer.
C:Context bloat can increase costs, truncation and inconsistent task completion. That exposure calls for prune tool outputs and maintain concise task state or checkpoints to keep context useful. The scenario here instead risks intermittent failures can remain unreproducible or be blamed on the wrong integration layer.
D:An update may degrade key user journeys without detection despite an impressive demo. That exposure calls for build a representative held-out evaluation set with measurable correctness criteria and failure categories. The scenario here instead risks intermittent failures can remain unreproducible or be blamed on the wrong integration layer.
Question 111
A developer encounters this situation: A development team changes SDK versions without pinning dependencies or recording compatibility. What is the MOST appropriate technical response?
- Require structured validated outputs or constrained tool schemas before business-side execution.
- Log bounded structured request IDs, latency and failure categories while redacting secrets and sensitive content.
- Pin tested dependencies and use staged upgrades with regression tests and rollback.
- Parse documented typed content blocks and stop reasons rather than flattening responses into text.
Explanation
Correct Answer
C:Pin tested dependencies and use staged upgrades with regression tests and rollback. This directly addresses the situation: A development team changes SDK versions without pinning dependencies or recording compatibility. The technical reason is that reproducible software builds require controlled dependency versions and compatibility gates. Without it, unreviewed library updates can break production API clients unexpectedly. A concrete acceptance check is: A clean rebuild reproduces the approved version set and a tested upgrade can roll back.
Incorrect Answers
A:Require structured validated outputs or constrained tool schemas before business-side execution. This does not repair the current workflow because reproducible software builds require controlled dependency versions and compatibility gates. The targeted change is pin tested dependencies and use staged upgrades with regression tests and rollback.
B:Log bounded structured request IDs, latency and failure categories while redacting secrets and sensitive content. This does not repair the current workflow because reproducible software builds require controlled dependency versions and compatibility gates. The targeted change is pin tested dependencies and use staged upgrades with regression tests and rollback.
D:Parse documented typed content blocks and stop reasons rather than flattening responses into text. This does not repair the current workflow because reproducible software builds require controlled dependency versions and compatibility gates. The targeted change is pin tested dependencies and use staged upgrades with regression tests and rollback.
Question 112
A developer encounters this situation: A cross-functional incident bot chooses tools using only free-form model text without defined tool schemas. What is the MOST appropriate technical response?
- Pass tool results as lower-trust data and enforce tool authorization in the application layer.
- Use a deterministic workflow for fixed tasks and reserve autonomous agent loops for genuinely dynamic decisions.
- Bound agent iterations, tool budgets and stop conditions with a safe fallback or human escalation.
- Keep tool execution and approval policy in deterministic application code rather than relying on model self-restraint.
Explanation
Correct Answer
D:Keep tool execution and approval policy in deterministic application code rather than relying on model self-restraint. This directly addresses the situation: A cross-functional incident bot chooses tools using only free-form model text without defined tool schemas. The technical reason is that the agent's model output is a proposal; the hosting system must validate and enforce authorized actions. Without it, a prompt-injected suggestion could cross a trust boundary if the app executes it without validation. A concrete acceptance check is: An unapproved tool request is rejected by code and logged even when the model asks to run it.
Incorrect Answers
A:Pass tool results as lower-trust data and enforce tool authorization in the application layer. This does not repair the current workflow because the agent's model output is a proposal; the hosting system must validate and enforce authorized actions. The targeted change is keep tool execution and approval policy in deterministic application code rather than relying on model self-restraint.
B:Use a deterministic workflow for fixed tasks and reserve autonomous agent loops for genuinely dynamic decisions. This does not repair the current workflow because the agent's model output is a proposal; the hosting system must validate and enforce authorized actions. The targeted change is keep tool execution and approval policy in deterministic application code rather than relying on model self-restraint.
C:Bound agent iterations, tool budgets and stop conditions with a safe fallback or human escalation. This does not repair the current workflow because the agent's model output is a proposal; the hosting system must validate and enforce authorized actions. The targeted change is keep tool execution and approval policy in deterministic application code rather than relying on model self-restraint.
Question 113
In this situation: A client treats all API failures as retryable and repeatedly sends malformed requests. The developer proposes: Use status-aware retry policies with exponential backoff, jitter and bounded attempts for transient errors. Which principle BEST justifies the approach?
- Rate limits and transient failures require controlled retries; permanent client errors should fail fast.
- Token limits can terminate generation before a logically complete response.
- Model tool requests are distinct content and require client-side orchestration to supply results correctly.
- API integration safety depends on regression tests for behavior at service boundaries.
Explanation
Correct Answer
A:Rate limits and transient failures require controlled retries; permanent client errors should fail fast. In the given situation, a client treats all API failures as retryable and repeatedly sends malformed requests. That consideration supports the measure: Use status-aware retry policies with exponential backoff, jitter and bounded attempts for transient errors. Ignoring it creates this exposure: Retry storms can magnify outages and increase costs without recovering service. Verify the implementation by checking: Fault tests demonstrate bounded retries for transient codes and immediate rejection of invalid requests.
Incorrect Answers
B:Token limits can terminate generation before a logically complete response. This principle relates to validate output length and stop reason; retry or redesign output constraints when truncation occurs. The observed failure instead depends on rate limits and transient failures require controlled retries; permanent client errors should fail fast. The appropriate choice is rate limits and transient failures require controlled retries; permanent client errors should fail fast.
C:Model tool requests are distinct content and require client-side orchestration to supply results correctly. This principle relates to inspect stop reasons and complete the documented tool-use and tool-result exchange before finalizing output. The observed failure instead depends on rate limits and transient failures require controlled retries; permanent client errors should fail fast. The appropriate choice is rate limits and transient failures require controlled retries; permanent client errors should fail fast.
D:API integration safety depends on regression tests for behavior at service boundaries. This principle relates to use version control, code review and automated contract plus failure-mode tests for integration changes. The observed failure instead depends on rate limits and transient failures require controlled retries; permanent client errors should fail fast. The appropriate choice is rate limits and transient failures require controlled retries; permanent client errors should fail fast.
Question 114
In this situation: An engineer assumes token counts equal word counts when sizing Claude context windows. The developer proposes: Budget input and output tokens using the selected model's tokenization and context limits. Which principle BEST justifies the approach?
- Examples and instruction clarity improve task alignment but must be consistent with each other.
- Tokens are model-specific units and all relevant context elements contribute to request size.
- More internal reasoning can help complex decisions but consumes latency or tokens depending on the model and settings.
- Caching can reduce repeated processing of identical eligible context while requiring correct cache boundaries.
Explanation
Correct Answer
B:Tokens are model-specific units and all relevant context elements contribute to request size. In the given situation, an engineer assumes token counts equal word counts when sizing Claude context windows. That consideration supports the measure: Budget input and output tokens using the selected model's tokenization and context limits. Ignoring it creates this exposure: Requests may exceed supported context or be truncated despite apparently short word counts. Verify the implementation by checking: Measured token usage stays within the model's supported window for representative long inputs.
Incorrect Answers
A: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 tokens are model-specific units and all relevant context elements contribute to request size. The appropriate choice is tokens are model-specific units and all relevant context elements contribute to request size.
C:More internal reasoning can help complex decisions but consumes latency or tokens depending on the model and settings. This principle relates to choose appropriate thinking or effort settings based on task complexity, latency and budget constraints. The observed failure instead depends on tokens are model-specific units and all relevant context elements contribute to request size. The appropriate choice is tokens are model-specific units and all relevant context elements contribute to request size.
D:Caching can reduce repeated processing of identical eligible context while requiring correct cache boundaries. This principle relates to apply supported prompt caching or reuse patterns for stable prefix content and monitor cache hits. The observed failure instead depends on tokens are model-specific units and all relevant context elements contribute to request size. The appropriate choice is tokens are model-specific units and all relevant context elements contribute to request size.
Question 115
This engineering control is missing: "Validate structured model outputs against strict schema and business rules before use". The reported condition is: A client deserializes model output directly into a payment request without checking allowed values. What is the most direct failure risk?
- Users may trust fabricated sources or unsupported policy advice.
- Unrelated user data may contaminate answers or leak into another task.
- Malformed or out-of-range fields can trigger incorrect actions or crashes.
- The model may choose an unintended format or overlook key business rules.
Explanation
Correct Answer
C:Malformed or out-of-range fields can trigger incorrect actions or crashes. This follows from the reported condition: A client deserializes model output directly into a payment request without checking allowed values. The reason is that syntactic JSON validity is necessary but insufficient for safe application state changes. The appropriate mitigation is: Validate structured model outputs against strict schema and business rules before use. Evidence of success would be: Invalid values are rejected before side effects and valid cases pass typed parsing.
Incorrect Answers
A:Users may trust fabricated sources or unsupported policy advice. That exposure calls for check factual claims and citations against accessible source evidence with an explicit uncertainty path. The scenario here instead risks malformed or out-of-range fields can trigger incorrect actions or crashes.
B:Unrelated user data may contaminate answers or leak into another task. That exposure calls for isolate contexts by user and task, passing only necessary evidence to each subagent. The scenario here instead risks malformed or out-of-range fields can trigger incorrect actions or crashes.
D:The model may choose an unintended format or overlook key business rules. That exposure calls for give clear role, task, constraints and explicit output contract with consistent examples where helpful. The scenario here instead risks malformed or out-of-range fields can trigger incorrect actions or crashes.
Question 116
A developer encounters this situation: A multi-tenant chat assistant logs raw prompts containing personal data and API keys. What is the MOST appropriate technical response?
- Add supported pre-tool hooks or policy checks that deny dangerous commands and preserve audit evidence.
- Enforce least-privilege tool permissions and distinct identities scoped to each workflow.
- Treat retrieved and user-supplied content as untrusted data and enforce tool permissions separately.
- Minimize sensitive input and redact, restrict and retain logs according to approved privacy requirements.
Explanation
Correct Answer
D:Minimize sensitive input and redact, restrict and retain logs according to approved privacy requirements. This directly addresses the situation: A multi-tenant chat assistant logs raw prompts containing personal data and API keys. The technical reason is that aI application privacy depends on data handling throughout ingestion, prompting, logging and retention. Without it, personal data or credentials may leak through telemetry or unnecessary persistence. A concrete acceptance check is: Log sampling finds no secrets or unauthorized PII and retention tests remove expired records.
Incorrect Answers
A:Add supported pre-tool hooks or policy checks that deny dangerous commands and preserve audit evidence. This does not repair the current workflow because aI application privacy depends on data handling throughout ingestion, prompting, logging and retention. The targeted change is minimize sensitive input and redact, restrict and retain logs according to approved privacy requirements.
B:Enforce least-privilege tool permissions and distinct identities scoped to each workflow. This does not repair the current workflow because aI application privacy depends on data handling throughout ingestion, prompting, logging and retention. The targeted change is minimize sensitive input and redact, restrict and retain logs according to approved privacy requirements.
C:Treat retrieved and user-supplied content as untrusted data and enforce tool permissions separately. This does not repair the current workflow because aI application privacy depends on data handling throughout ingestion, prompting, logging and retention. The targeted change is minimize sensitive input and redact, restrict and retain logs according to approved privacy requirements.
Question 117
To address the situation: A Claude Agent SDK application has hooks but required audit and approval logic lives only in prompt text. The team implements: "Use agent or Claude Code hooks for deterministic validations and approvals at supported execution boundaries". Which evidence BEST demonstrates success?
- An intentional risky tool call is blocked by a hook while authorized benign actions continue.
- A design test confirms data paths, tool permissions and log ownership match the approved deployment constraints.
- A fault-injection run terminates predictably and records the failed tool, recovery and final state.
- A simulated unresolvable task stops within limits and creates a clear escalation record.
Explanation
Correct Answer
A:An intentional risky tool call is blocked by a hook while authorized benign actions continue. This directly tests the outcome of use agent or Claude Code hooks for deterministic validations and approvals at supported execution boundaries. in the described case: A Claude Agent SDK application has hooks but required audit and approval logic lives only in prompt text. The underlying principle is that hooks can apply nonprobabilistic policy checks around tool use when installed in the correct execution lifecycle. If the change is ineffective, safety requirements expressed only as prose can be ignored or reinterpreted by the model. A configuration checkbox alone is insufficient proof.
Incorrect Answers
B:A design test confirms data paths, tool permissions and log ownership match the approved deployment constraints. This outcome would validate choose managed versus self-hosted agent execution by evaluating residency, observability, permissions and operational responsibility, not the requested intervention. The required test result is an intentional risky tool call is blocked by a hook while authorized benign actions continue.
C:A fault-injection run terminates predictably and records the failed tool, recovery and final state. This outcome would validate implement explicit tool-loop controls, errors, iteration limits and observable state in the agent harness, not the requested intervention. The required test result is an intentional risky tool call is blocked by a hook while authorized benign actions continue.
D:A simulated unresolvable task stops within limits and creates a clear escalation record. This outcome would validate bound agent iterations, tool budgets and stop conditions with a safe fallback or human escalation, not the requested intervention. The required test result is an intentional risky tool call is blocked by a hook while authorized benign actions continue.
Question 118
To address the situation: A product team builds a managed agent but needs to keep all data and tool execution within its own boundary. The team implements: "Choose managed versus self-hosted agent execution by evaluating residency, observability, permissions and operational responsibility". Which evidence BEST demonstrates success?
- An intentional risky tool call is blocked by a hook while authorized benign actions continue.
- A design test confirms data paths, tool permissions and log ownership match the approved deployment constraints.
- A malicious tool-result fixture cannot gain permissions or override the declared control policy.
- A simulated unresolvable task stops within limits and creates a clear escalation record.
Explanation
Correct Answer
B:A design test confirms data paths, tool permissions and log ownership match the approved deployment constraints. This directly tests the outcome of choose managed versus self-hosted agent execution by evaluating residency, observability, permissions and operational responsibility. in the described case: A product team builds a managed agent but needs to keep all data and tool execution within its own boundary. The underlying principle is that agent hosting models change who controls execution state, logs and network or data access. If the change is ineffective, a mismatched hosting choice can violate data boundaries or leave critical execution controls unavailable. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:An intentional risky tool call is blocked by a hook while authorized benign actions continue. This outcome would validate use agent or Claude Code hooks for deterministic validations and approvals at supported execution boundaries, not the requested intervention. The required test result is A design test confirms data paths, tool permissions and log ownership match the approved deployment constraints.
C:A malicious tool-result fixture cannot gain permissions or override the declared control policy. This outcome would validate pass tool results as lower-trust data and enforce tool authorization in the application layer, not the requested intervention. The required test result is A design test confirms data paths, tool permissions and log ownership match the approved deployment constraints.
D:A simulated unresolvable task stops within limits and creates a clear escalation record. This outcome would validate bound agent iterations, tool budgets and stop conditions with a safe fallback or human escalation, not the requested intervention. The required test result is A design test confirms data paths, tool permissions and log ownership match the approved deployment constraints.
Question 119
To address the situation: A service trusts network success and never checks the status code or body shape returned by a dependency. The team implements: "Validate HTTP status, content types and JSON response contracts before processing API results". Which evidence BEST demonstrates success?
- A sustained load test shows bounded sockets and stable event-loop response latency.
- Fixtures containing text and tool-use blocks are parsed into correct typed application events.
- Negative HTTP fixtures produce explicit typed failures and valid JSON remains parseable.
- Recorded event fixtures reconstruct the same final message as the nonstreaming response.
Explanation
Correct Answer
C:Negative HTTP fixtures produce explicit typed failures and valid JSON remains parseable. This directly tests the outcome of validate HTTP status, content types and JSON response contracts before processing API results. in the described case: A service trusts network success and never checks the status code or body shape returned by a dependency. The underlying principle is that rEST clients must handle status codes and payload structure as separate error conditions. If the change is ineffective, transient errors can be misinterpreted as valid model data or corrupt application state. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:A sustained load test shows bounded sockets and stable event-loop response latency. This outcome would validate use reusable supported SDK or HTTP clients with connection management and nonblocking I/O, not the requested intervention. The required test result is negative HTTP fixtures produce explicit typed failures and valid JSON remains parseable.
B:Fixtures containing text and tool-use blocks are parsed into correct typed application events. This outcome would validate parse documented typed content blocks and stop reasons rather than flattening responses into text, not the requested intervention. The required test result is negative HTTP fixtures produce explicit typed failures and valid JSON remains parseable.
D:Recorded event fixtures reconstruct the same final message as the nonstreaming response. This outcome would validate process the documented streaming event sequence by event type and finalize only on completion, not the requested intervention. The required test result is negative HTTP fixtures produce explicit typed failures and valid JSON remains parseable.
Question 120
In this situation: A service opens streaming responses but cannot distinguish message start, content delta and final usage events. The developer proposes: Process the documented streaming event sequence by event type and finalize only on completion. Which principle BEST justifies the approach?
- Conversation continuity depends on the application supplying relevant history or state in each request.
- Token limits can terminate generation before a logically complete response.
- The Messages API carries structured content that must be handled by type and state.
- Streaming requires preserving event structure and ordering, including tool and usage metadata.
Explanation
Correct Answer
D:Streaming requires preserving event structure and ordering, including tool and usage metadata. In the given situation, a service opens streaming responses but cannot distinguish message start, content delta and final usage events. That consideration supports the measure: Process the documented streaming event sequence by event type and finalize only on completion. Ignoring it creates this exposure: The UI or tool handler can assemble malformed content and act on partial arguments. Verify the implementation by checking: Recorded event fixtures reconstruct the same final message as the nonstreaming response.
Incorrect Answers
A:Conversation continuity depends on the application supplying relevant history or state in each request. This principle relates to persist and re-supply required prior message context explicitly according to the stateless Messages API pattern. The observed failure instead depends on streaming requires preserving event structure and ordering, including tool and usage metadata. The appropriate choice is streaming requires preserving event structure and ordering, including tool and usage metadata.
B:Token limits can terminate generation before a logically complete response. This principle relates to validate output length and stop reason; retry or redesign output constraints when truncation occurs. The observed failure instead depends on streaming requires preserving event structure and ordering, including tool and usage metadata. The appropriate choice is streaming requires preserving event structure and ordering, including tool and usage metadata.
C:The Messages API carries structured content that must be handled by type and state. This principle relates to parse documented typed content blocks and stop reasons rather than flattening responses into text. The observed failure instead depends on streaming requires preserving event structure and ordering, including tool and usage metadata. The appropriate choice is streaming requires preserving event structure and ordering, including tool and usage metadata.