Claude Certified Developer - Foundations CCDV-F Practice Test 21
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.
Question 201
This engineering control is missing: "Control prompt assembly with relevant retrieval, truncation rules and context-budget measurements". The reported condition is: An application sends every chat exchange and entire knowledge base on every turn regardless of task. What is the most direct failure risk?
- Excessive context raises costs, latency and the likelihood of truncating critical instructions.
- An incident cannot be traced and usage budgets can drift unnoticed.
- Users may act on invented or outdated instructions when retrieval provenance is missing.
- One logical action can produce duplicated invoices, tickets or payments.
Explanation
Correct Answer
A:Excessive context raises costs, latency and the likelihood of truncating critical instructions. This follows from the reported condition: An application sends every chat exchange and entire knowledge base on every turn regardless of task. The reason is that request context should contain only task-relevant content while respecting model context and token constraints. The appropriate mitigation is: Control prompt assembly with relevant retrieval, truncation rules and context-budget measurements. Evidence of success would be: A long-session test stays within target token usage while preserving necessary current constraints.
Incorrect Answers
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 excessive context raises costs, latency and the likelihood of truncating critical instructions.
C: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 excessive context raises costs, latency and the likelihood of truncating critical instructions.
D: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 excessive context raises costs, latency and the likelihood of truncating critical instructions.
Question 202
In this situation: A content moderation layer operates only after an agent has already executed a financial action. The developer proposes: Layer input, tool-execution and output checks with human approval for sensitive side effects. Which principle BEST justifies the approach?
- AI application privacy depends on data handling throughout ingestion, prompting, logging and retention.
- Safety controls must protect every consequential boundary, not merely the final generated text.
- Deterministic hooks provide an enforceable checkpoint around risky tool execution.
- Application authorization constrains the effects of model output even when the model is manipulated.
Explanation
Correct Answer
B:Safety controls must protect every consequential boundary, not merely the final generated text. In the given situation, a content moderation layer operates only after an agent has already executed a financial action. That consideration supports the measure: Layer input, tool-execution and output checks with human approval for sensitive side effects. Ignoring it creates this exposure: Unsafe actions can occur before a downstream moderation filter sees the result. Verify the implementation by checking: Adversarial prompts fail authorization at the tool boundary and produce reviewable audit records.
Incorrect Answers
A:AI application privacy depends on data handling throughout ingestion, prompting, logging and retention. This principle relates to minimize sensitive input and redact, restrict and retain logs according to approved privacy requirements. The observed failure instead depends on safety controls must protect every consequential boundary, not merely the final generated text. The appropriate choice is safety controls must protect every consequential boundary, not merely the final generated text.
C:Deterministic hooks provide an enforceable checkpoint around risky tool execution. This principle relates to add supported pre-tool hooks or policy checks that deny dangerous commands and preserve audit evidence. The observed failure instead depends on safety controls must protect every consequential boundary, not merely the final generated text. The appropriate choice is safety controls must protect every consequential boundary, not merely the final generated text.
D:Application authorization constrains the effects of model output even when the model is manipulated. This principle relates to enforce least-privilege tool permissions and distinct identities scoped to each workflow. The observed failure instead depends on safety controls must protect every consequential boundary, not merely the final generated text. The appropriate choice is safety controls must protect every consequential boundary, not merely the final generated text.
Question 203
This engineering control is missing: "Isolate contexts by user and task, passing only necessary evidence to each subagent". The reported condition is: A system mixes unrelated customer cases in one agent conversation memory. What is the most direct failure risk?
- The agent can duplicate work or violate earlier requirements after losing context.
- Prompt injection may redirect behavior or induce unauthorized disclosure.
- Unrelated user data may contaminate answers or leak into another task.
- Context overload can cause drift, truncation and inconsistent actions.
Explanation
Correct Answer
C:Unrelated user data may contaminate answers or leak into another task. This follows from the reported condition: A system mixes unrelated customer cases in one agent conversation memory. The reason is that context boundaries reduce distraction and unauthorized exposure between independent workstreams. The appropriate mitigation is: Isolate contexts by user and task, passing only necessary evidence to each subagent. Evidence of success would be: Cross-user and subagent tests confirm no unauthorized context appears in model input or outputs.
Incorrect Answers
A:The agent can duplicate work or violate earlier requirements after losing context. That exposure calls for use structured task checkpoints with completed actions, constraints and verified external state. The scenario here instead risks unrelated user data may contaminate answers or leak into another task.
B:Prompt injection may redirect behavior or induce unauthorized disclosure. That exposure calls for separate trusted instruction layers from untrusted task data, and mark data boundaries explicitly. The scenario here instead risks unrelated user data may contaminate answers or leak into another task.
D:Context overload can cause drift, truncation and inconsistent actions. That exposure calls for prune low-value tool outputs and preserve a compact summary of goals, decisions and remaining work. The scenario here instead risks unrelated user data may contaminate answers or leak into another task.
Question 204
To address the situation: A support application waits for a complete long response before showing the first sentence. The team implements: "Use supported streaming events with explicit lifecycle, partial-render and finalization handling". Which evidence BEST demonstrates success?
- A contract test sends a supported payload and receives a properly typed Messages response.
- A held-out query returns a supported answer citing only documents actually retrieved for that query.
- A long-session test stays within target token usage while preserving necessary current constraints.
- A streaming test shows progressive output and a complete, properly finalized message.
Explanation
Correct Answer
D:A streaming test shows progressive output and a complete, properly finalized message. This directly tests the outcome of use supported streaming events with explicit lifecycle, partial-render and finalization handling. in the described case: A support application waits for a complete long response before showing the first sentence. The underlying principle is that streaming can improve perceived latency only if the application consumes and renders events correctly. If the change is ineffective, users may experience unnecessary blank screens or partial/inconsistent final responses. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:A contract test sends a supported payload and receives a properly typed Messages response. This outcome would validate use documented Messages API request fields and supported client SDK methods with schema validation, not the requested intervention. The required test result is A streaming test shows progressive output and a complete, properly finalized message.
B:A held-out query returns a supported answer citing only documents actually retrieved for that query. This outcome would validate build retrieval with provenance-aware citations and grounded-answer validation before presenting claims, not the requested intervention. The required test result is A streaming test shows progressive output and a complete, properly finalized message.
C:A long-session test stays within target token usage while preserving necessary current constraints. This outcome would validate control prompt assembly with relevant retrieval, truncation rules and context-budget measurements, not the requested intervention. The required test result is A streaming test shows progressive output and a complete, properly finalized message.
Question 205
A developer encounters this situation: A product team builds a managed agent but needs to keep all data and tool execution within its own boundary. What is the MOST appropriate technical response?
- Choose managed versus self-hosted agent execution by evaluating residency, observability, permissions and operational responsibility.
- Pass tool results as lower-trust data and enforce tool authorization in the application layer.
- Use agent or Claude Code hooks for deterministic validations and approvals at supported execution boundaries.
- Prune tool outputs and maintain concise task state or checkpoints to keep context useful.
Explanation
Correct Answer
A:Choose managed versus self-hosted agent execution by evaluating residency, observability, permissions and operational responsibility. This directly addresses the situation: A product team builds a managed agent but needs to keep all data and tool execution within its own boundary. The technical reason is that agent hosting models change who controls execution state, logs and network or data access. Without it, a mismatched hosting choice can violate data boundaries or leave critical execution controls unavailable. A concrete acceptance check is: A design test confirms data paths, tool permissions and log ownership match the approved deployment constraints.
Incorrect Answers
B:Pass tool results as lower-trust data and enforce tool authorization in the application layer. This does not repair the current workflow because agent hosting models change who controls execution state, logs and network or data access. The targeted change is choose managed versus self-hosted agent execution by evaluating residency, observability, permissions and operational responsibility.
C:Use agent or Claude Code hooks for deterministic validations and approvals at supported execution boundaries. This does not repair the current workflow because agent hosting models change who controls execution state, logs and network or data access. The targeted change is choose managed versus self-hosted agent execution by evaluating residency, observability, permissions and operational responsibility.
D:Prune tool outputs and maintain concise task state or checkpoints to keep context useful. This does not repair the current workflow because agent hosting models change who controls execution state, logs and network or data access. The targeted change is choose managed versus self-hosted agent execution by evaluating residency, observability, permissions and operational responsibility.
Question 206
This engineering control is missing: "Validate HTTP status, content types and JSON response contracts before processing API results". The reported condition is: An integration silently accepts HTML error pages as if they were valid JSON model outputs. What is the most direct failure risk?
- Unreviewed configuration drift can expose keys or create inconsistent model behavior.
- Transient errors can be misinterpreted as valid model data or corrupt application state.
- A restart can lose progress or duplicate external mutations.
- Retry storms can magnify outages and increase costs without recovering service.
Explanation
Correct Answer
B:Transient errors can be misinterpreted as valid model data or corrupt application state. This follows from the reported condition: An integration silently accepts HTML error pages as if they were valid JSON model outputs. 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:Unreviewed configuration drift can expose keys or create inconsistent model behavior. That exposure calls for centralize versioned configuration, protected secrets and environment-specific deployment settings. The scenario here instead risks transient errors can be misinterpreted as valid model data or corrupt application state.
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 transient errors can be misinterpreted as valid model data or corrupt application state.
D:Retry storms can magnify outages and increase costs without recovering service. That exposure calls for use status-aware retry policies with exponential backoff, jitter and bounded attempts for transient errors. The scenario here instead risks transient errors can be misinterpreted as valid model data or corrupt application state.
Question 207
A developer encounters this situation: A chat app assumes the Messages API automatically remembers every earlier conversation. What is the MOST appropriate technical response?
- Capture provider request IDs, token usage and model metadata in privacy-safe telemetry.
- Use supported streaming events with explicit lifecycle, partial-render and finalization handling.
- Persist and re-supply required prior message context explicitly according to the stateless Messages API pattern.
- Process the documented streaming event sequence by event type and finalize only on completion.
Explanation
Correct Answer
C:Persist and re-supply required prior message context explicitly according to the stateless Messages API pattern. This directly addresses the situation: A chat app assumes the Messages API automatically remembers every earlier conversation. The technical reason is that conversation continuity depends on the application supplying relevant history or state in each request. Without it, the model may answer without critical prior constraints or invent missing context. A concrete acceptance check is: A multi-turn regression test succeeds when required history is supplied and fails safely when it is absent.
Incorrect Answers
A:Capture provider request IDs, token usage and model metadata in privacy-safe telemetry. This does not repair the current workflow because conversation continuity depends on the application supplying relevant history or state in each request. The targeted change is persist and re-supply required prior message context explicitly according to the stateless Messages API pattern.
B:Use supported streaming events with explicit lifecycle, partial-render and finalization handling. This does not repair the current workflow because conversation continuity depends on the application supplying relevant history or state in each request. The targeted change is persist and re-supply required prior message context explicitly according to the stateless Messages API pattern.
D:Process the documented streaming event sequence by event type and finalize only on completion. This does not repair the current workflow because conversation continuity depends on the application supplying relevant history or state in each request. The targeted change is persist and re-supply required prior message context explicitly according to the stateless Messages API pattern.
Question 208
In this situation: An API-backed chatbot reaches token limits because irrelevant transcripts are appended indefinitely. The developer proposes: Control prompt assembly with relevant retrieval, truncation rules and context-budget measurements. Which principle BEST justifies the approach?
- Streaming can improve perceived latency only if the application consumes and renders events correctly.
- Application-facing output must be parsed and validated against a contract, not inferred from unconstrained prose.
- Rate limits and transient failures require controlled retries; permanent client errors should fail fast.
- Request context should contain only task-relevant content while respecting model context and token constraints.
Explanation
Correct Answer
D:Request context should contain only task-relevant content while respecting model context and token constraints. In the given situation, an API-backed chatbot reaches token limits because irrelevant transcripts are appended indefinitely. That consideration supports the measure: Control prompt assembly with relevant retrieval, truncation rules and context-budget measurements. Ignoring it creates this exposure: Excessive context raises costs, latency and the likelihood of truncating critical instructions. Verify the implementation by checking: A long-session test stays within target token usage while preserving necessary current constraints.
Incorrect Answers
A:Streaming can improve perceived latency only if the application consumes and renders events correctly. This principle relates to use supported streaming events with explicit lifecycle, partial-render and finalization handling. The observed failure instead depends on request context should contain only task-relevant content while respecting model context and token constraints. The appropriate choice is request context should contain only task-relevant content while respecting model context and token constraints.
B:Application-facing output must be parsed and validated against a contract, not inferred from unconstrained prose. This principle relates to require structured validated outputs or constrained tool schemas before business-side execution. The observed failure instead depends on request context should contain only task-relevant content while respecting model context and token constraints. The appropriate choice is request context should contain only task-relevant content while respecting model context and token constraints.
C:Rate limits and transient failures require controlled retries; permanent client errors should fail fast. This principle relates to use status-aware retry policies with exponential backoff, jitter and bounded attempts for transient errors. The observed failure instead depends on request context should contain only task-relevant content while respecting model context and token constraints. The appropriate choice is request context should contain only task-relevant content while respecting model context and token constraints.
Question 209
This engineering control is missing: "Use version control, code review and automated contract plus failure-mode tests for integration changes". The reported condition is: A CI pipeline deploys an integration even though tests for timeout and malformed JSON were skipped. What is the most direct failure risk?
- Minor refactors can silently break downstream consumers or error handling.
- Unreviewed library updates can break production API clients unexpectedly.
- Throughput and reliability can collapse as concurrent requests increase.
- Retry storms can magnify outages and increase costs without recovering service.
Explanation
Correct Answer
A:Minor refactors can silently break downstream consumers or error handling. This follows from the reported condition: A CI pipeline deploys an integration even though tests for timeout and malformed JSON were skipped. The reason is that aPI integration safety depends on regression tests for behavior at service boundaries. The appropriate mitigation is: Use version control, code review and automated contract plus failure-mode tests for integration changes. Evidence of success would be: CI rejects malformed responses in tests and approves only validated changes.
Incorrect Answers
B: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 minor refactors can silently break downstream consumers or error handling.
C:Throughput and reliability can collapse as concurrent requests increase. That exposure calls for use reusable supported SDK or HTTP clients with connection management and nonblocking I/O. The scenario here instead risks minor refactors can silently break downstream consumers or error handling.
D:Retry storms can magnify outages and increase costs without recovering service. That exposure calls for use status-aware retry policies with exponential backoff, jitter and bounded attempts for transient errors. The scenario here instead risks minor refactors can silently break downstream consumers or error handling.
Question 210
To address the situation: A team upgrades Claude models and suddenly sees different tool-call frequency despite unchanged prompts. The team implements: "Pin or deliberately version model selections and run regression tests during model changes". Which evidence BEST demonstrates success?
- A controlled usage sample yields predictable accounting and an actionable budget alert.
- An upgrade canary passes contract and task evaluations with an available rollback path.
- Usage metrics show cache reads or reduced eligible prefix processing without mixing user-specific data.
- A representative evaluation records quality, p95 latency and cost before selecting a model.
Explanation
Correct Answer
B:An upgrade canary passes contract and task evaluations with an available rollback path. This directly tests the outcome of pin or deliberately version model selections and run regression tests during model changes. in the described case: A team upgrades Claude models and suddenly sees different tool-call frequency despite unchanged prompts. The underlying principle is that model updates can alter behavior, latency and tool use; compatibility must be tested at release time. If the change is ineffective, silent model change can break output contracts or downstream user experience. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:A controlled usage sample yields predictable accounting and an actionable budget alert. This outcome would validate track input/output tokens and model, cache and batch usage per operation with privacy-safe reporting, not the requested intervention. The required test result is an upgrade canary passes contract and task evaluations with an available rollback path.
C:Usage metrics show cache reads or reduced eligible prefix processing without mixing user-specific data. This outcome would validate apply supported prompt caching or reuse patterns for stable prefix content and monitor cache hits, not the requested intervention. The required test result is an upgrade canary passes contract and task evaluations with an available rollback path.
D:A representative evaluation records quality, p95 latency and cost before selecting a model. This outcome would validate benchmark suitable Claude model tiers for quality, latency and price on the application's actual tasks, not the requested intervention. The required test result is an upgrade canary passes contract and task evaluations with an available rollback path.