Claude Certified Developer - Foundations CCDV-F Practice Test 4
Question 30
This engineering control is missing: "Use structured task checkpoints with completed actions, constraints and verified external state". The reported condition is: An agent repeatedly reopens the same document after automatic context compaction. What is the most direct failure risk?
- Malformed or out-of-range fields can trigger incorrect actions or crashes.
- The agent can duplicate work or violate earlier requirements after losing context.
- Unrelated user data may contaminate answers or leak into another task.
- Context overload can cause drift, truncation and inconsistent actions.
Explanation
Correct Answer
B:The agent can duplicate work or violate earlier requirements after losing context. This follows from the reported condition: An agent repeatedly reopens the same document after automatic context compaction. The reason is that compaction should preserve durable task state rather than treating a short summary as the entire truth. The appropriate mitigation is: Use structured task checkpoints with completed actions, constraints and verified external state. Evidence of success would be: A resumed task honors the documented checkpoint and does not rerun completed side effects.
Incorrect Answers
A:Malformed or out-of-range fields can trigger incorrect actions or crashes. That exposure calls for validate structured model outputs against strict schema and business rules before use. The scenario here instead risks the agent can duplicate work or violate earlier requirements after losing context.
C: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 the agent can duplicate work or violate earlier requirements after losing context.
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 the agent can duplicate work or violate earlier requirements after losing context.
Question 31
A developer encounters this situation: A business workflow needs durable branching and checkpoints but uses a stateless loop with no persisted progress. What is the MOST appropriate technical response?
- Implement explicit tool-loop controls, errors, iteration limits and observable state in the agent harness.
- Add idempotency and completed-work tracking to subagent/tool handoffs.
- Match the orchestration framework to complexity, durable state and control-flow requirements rather than novelty.
- Prune tool outputs and maintain concise task state or checkpoints to keep context useful.
Explanation
Correct Answer
C:Match the orchestration framework to complexity, durable state and control-flow requirements rather than novelty. This directly addresses the situation: A business workflow needs durable branching and checkpoints but uses a stateless loop with no persisted progress. The technical reason is that frameworks such as LangGraph or Strands add value when branching, persistence or coordination justify their overhead. Without it, overengineering raises maintenance burden, while underengineering loses recovery state on complex flows. A concrete acceptance check is: A restart test preserves workflow state and the chosen implementation remains auditable at the required complexity.
Incorrect Answers
A:Implement explicit tool-loop controls, errors, iteration limits and observable state in the agent harness. This does not repair the current workflow because frameworks such as LangGraph or Strands add value when branching, persistence or coordination justify their overhead. The targeted change is match the orchestration framework to complexity, durable state and control-flow requirements rather than novelty.
B:Add idempotency and completed-work tracking to subagent/tool handoffs. This does not repair the current workflow because frameworks such as LangGraph or Strands add value when branching, persistence or coordination justify their overhead. The targeted change is match the orchestration framework to complexity, durable state and control-flow requirements rather than novelty.
D:Prune tool outputs and maintain concise task state or checkpoints to keep context useful. This does not repair the current workflow because frameworks such as LangGraph or Strands add value when branching, persistence or coordination justify their overhead. The targeted change is match the orchestration framework to complexity, durable state and control-flow requirements rather than novelty.
Question 32
To address the situation: An application assumes a JSON-looking response always parses and never validates types or required fields. The team implements: "Validate structured model outputs against strict schema and business rules before use". Which evidence BEST demonstrates success?
- A long-run evaluation retains the required constraints while remaining within the context budget.
- A held-out retrieval test refuses unsupported assertions and links only to actual evidence.
- A resumed task honors the documented checkpoint and does not rerun completed side effects.
- Invalid values are rejected before side effects and valid cases pass typed parsing.
Explanation
Correct Answer
D:Invalid values are rejected before side effects and valid cases pass typed parsing. This directly tests the outcome of validate structured model outputs against strict schema and business rules before use. in the described case: An application assumes a JSON-looking response always parses and never validates types or required fields. The underlying principle is that syntactic JSON validity is necessary but insufficient for safe application state changes. If the change is ineffective, malformed or out-of-range fields can trigger incorrect actions or crashes. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:A long-run evaluation retains the required constraints while remaining within the context budget. This outcome would validate prune low-value tool outputs and preserve a compact summary of goals, decisions and remaining work, not the requested intervention. The required test result is invalid values are rejected before side effects and valid cases pass typed parsing.
B:A held-out retrieval test refuses unsupported assertions and links only to actual evidence. This outcome would validate check factual claims and citations against accessible source evidence with an explicit uncertainty path, not the requested intervention. The required test result is invalid values are rejected before side effects and valid cases pass typed parsing.
C:A resumed task honors the documented checkpoint and does not rerun completed side effects. This outcome would validate use structured task checkpoints with completed actions, constraints and verified external state, not the requested intervention. The required test result is invalid values are rejected before side effects and valid cases pass typed parsing.
Question 33
To address the situation: A code-executing agent takes untrusted repository text as permission to run shell commands. The team implements: "Pass tool results as lower-trust data and enforce tool authorization in the application layer". Which evidence BEST demonstrates success?
- A malicious tool-result fixture cannot gain permissions or override the declared control policy.
- A fault-injection run terminates predictably and records the failed tool, recovery and final state.
- A multi-step test stays within budget while retaining key constraints and completed steps.
- An intentional risky tool call is blocked by a hook while authorized benign actions continue.
Explanation
Correct Answer
A:A malicious tool-result fixture cannot gain permissions or override the declared control policy. This directly tests the outcome of pass tool results as lower-trust data and enforce tool authorization in the application layer. in the described case: A code-executing agent takes untrusted repository text as permission to run shell commands. The underlying principle is that tool outputs are untrusted observations, not elevated user or system instructions. If the change is ineffective, prompt injection in retrieved results may redirect the agent into unauthorized execution. A configuration checkbox alone is insufficient proof.
Incorrect Answers
B: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 A malicious tool-result fixture cannot gain permissions or override the declared control policy.
C:A multi-step test stays within budget while retaining key constraints and completed steps. This outcome would validate prune tool outputs and maintain concise task state or checkpoints to keep context useful, not the requested intervention. The required test result is A malicious tool-result fixture cannot gain permissions or override the declared control policy.
D: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 malicious tool-result fixture cannot gain permissions or override the declared control policy.
Question 34
A developer encounters this situation: A multi-shot instruction includes contradictory examples that bias model behavior. What is the MOST appropriate technical response?
- Use task difficulty and measured confidence to route work to an appropriate model or escalation path.
- Use clear task instructions and targeted examples when the required schema or decision boundary is non-obvious.
- Choose appropriate thinking or effort settings based on task complexity, latency and budget constraints.
- Evaluate stochastic model output with repeated trials and constrain tasks through validation and clear requirements.
Explanation
Correct Answer
B:Use clear task instructions and targeted examples when the required schema or decision boundary is non-obvious. This directly addresses the situation: A multi-shot instruction includes contradictory examples that bias model behavior. The technical reason is that examples and instruction clarity improve task alignment but must be consistent with each other. Without it, a vague or contradictory prompt can produce inconsistent fields or invalid classifications. A concrete acceptance check is: An unseen held-out sample follows the intended schema and policy without relying on memorized examples.
Incorrect Answers
A:Use task difficulty and measured confidence to route work to an appropriate model or escalation path. This does not repair the current workflow because examples and instruction clarity improve task alignment but must be consistent with each other. The targeted change is use clear task instructions and targeted examples when the required schema or decision boundary is non-obvious.
C:Choose appropriate thinking or effort settings based on task complexity, latency and budget constraints. This does not repair the current workflow because examples and instruction clarity improve task alignment but must be consistent with each other. The targeted change is use clear task instructions and targeted examples when the required schema or decision boundary is non-obvious.
D:Evaluate stochastic model output with repeated trials and constrain tasks through validation and clear requirements. This does not repair the current workflow because examples and instruction clarity improve task alignment but must be consistent with each other. The targeted change is use clear task instructions and targeted examples when the required schema or decision boundary is non-obvious.
Question 35
To address the situation: An integration silently accepts HTML error pages as if they were valid JSON model outputs. The team implements: "Validate HTTP status, content types and JSON response contracts before processing API results". Which evidence BEST demonstrates success?
- Sample traces correlate request IDs and error types without including keys or protected prompt content.
- A contract test sends a supported payload and receives a properly typed Messages response.
- Negative HTTP fixtures produce explicit typed failures and valid JSON remains parseable.
- A worker restart resumes from the recorded checkpoint without replaying completed actions.
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: An integration silently accepts HTML error pages as if they were valid JSON model outputs. 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:Sample traces correlate request IDs and error types without including keys or protected prompt content. This outcome would validate log bounded structured request IDs, latency and failure categories while redacting secrets and sensitive content, not the requested intervention. The required test result is negative HTTP fixtures produce explicit typed failures and valid JSON remains parseable.
B: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 negative HTTP fixtures produce explicit typed failures and valid JSON remains parseable.
D:A worker restart resumes from the recorded checkpoint without replaying completed actions. This outcome would validate persist necessary workflow checkpoints and reconcile completed actions during restarts, not the requested intervention. The required test result is negative HTTP fixtures produce explicit typed failures and valid JSON remains parseable.
Question 36
A developer encounters this situation: An agent has broad database read/write access although its task requires one read-only lookup. What is the MOST appropriate technical response?
- 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.
- Layer input, tool-execution and output checks with human approval for sensitive side effects.
- Enforce least-privilege tool permissions and distinct identities scoped to each workflow.
Explanation
Correct Answer
D:Enforce least-privilege tool permissions and distinct identities scoped to each workflow. This directly addresses the situation: An agent has broad database read/write access although its task requires one read-only lookup. The technical reason is that application authorization constrains the effects of model output even when the model is manipulated. Without it, compromised or confused agents may modify unrelated production records. A concrete acceptance check is: An unauthorized mutation is denied at the API while the intended read action succeeds.
Incorrect Answers
A:Treat retrieved and user-supplied content as untrusted data and enforce tool permissions separately. This does not repair the current workflow because application authorization constrains the effects of model output even when the model is manipulated. The targeted change is enforce least-privilege tool permissions and distinct identities scoped to each workflow.
B:Minimize sensitive input and redact, restrict and retain logs according to approved privacy requirements. This does not repair the current workflow because application authorization constrains the effects of model output even when the model is manipulated. The targeted change is enforce least-privilege tool permissions and distinct identities scoped to each workflow.
C:Layer input, tool-execution and output checks with human approval for sensitive side effects. This does not repair the current workflow because application authorization constrains the effects of model output even when the model is manipulated. The targeted change is enforce least-privilege tool permissions and distinct identities scoped to each workflow.
Question 37
To address the situation: A production app changes to a new model alias without checking structured output compatibility. The team implements: "Pin or deliberately version model selections and run regression tests during model changes". Which evidence BEST demonstrates success?
- An upgrade canary passes contract and task evaluations with an available rollback path.
- Evaluation shows difficult cases are escalated and routine tasks meet cost targets.
- A controlled usage sample yields predictable accounting and an actionable budget alert.
- A representative evaluation records quality, p95 latency and cost before selecting a model.
Explanation
Correct Answer
A: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 production app changes to a new model alias without checking structured output compatibility. 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
B:Evaluation shows difficult cases are escalated and routine tasks meet cost targets. This outcome would validate use task difficulty and measured confidence to route work to an appropriate model or escalation path, not the requested intervention. The required test result is an upgrade canary passes contract and task evaluations with an available rollback path.
C: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.
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.
Question 38
This engineering control is missing: "Parse documented typed content blocks and stop reasons rather than flattening responses into text". The reported condition is: A client app crashes when a valid tool-use content block appears in a Messages response. What is the most direct failure risk?
- A partial or invalid answer can corrupt downstream parsing or display.
- Tool requests and multi-part results may be lost or misinterpreted by a text-only parser.
- Minor refactors can silently break downstream consumers or error handling.
- A restart can lose progress or duplicate external mutations.
Explanation
Correct Answer
B:Tool requests and multi-part results may be lost or misinterpreted by a text-only parser. This follows from the reported condition: A client app crashes when a valid tool-use content block appears in a Messages response. The reason is that the Messages API carries structured content that must be handled by type and state. The appropriate mitigation is: Parse documented typed content blocks and stop reasons rather than flattening responses into text. Evidence of success would be: Fixtures containing text and tool-use blocks are parsed into correct typed application events.
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 tool requests and multi-part results may be lost or misinterpreted by a text-only parser.
C: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 tool requests and multi-part results may be lost or misinterpreted by a text-only parser.
D: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 tool requests and multi-part results may be lost or misinterpreted by a text-only parser.
Question 39
To address the situation: A developer lets Claude Code execute deployment commands without approval or dry-run restrictions. 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.
- Rotated credentials work without code changes and invalid keys produce a bounded clear error.
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 developer lets Claude Code execute deployment commands without approval or dry-run restrictions. 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:Rotated credentials work without code changes and invalid keys produce a bounded clear error. This outcome would validate configure authenticated requests, secret rotation and clear failure handling in the SDK/client, not the requested intervention. The required test result is an unsafe command is intercepted and refused while a harmless build/test command succeeds.
Question 40
This engineering control is missing: "Give clear role, task, constraints and explicit output contract with consistent examples where helpful". The reported condition is: A system prompt instructs a model to answer in JSON but provides no schema or valid example. What is the most direct failure risk?
- Biased or contradictory examples can systematically misclassify unusual inputs.
- Prompt injection may redirect behavior or induce unauthorized disclosure.
- Unrelated user data may contaminate answers or leak into another task.
- The model may choose an unintended format or overlook key business rules.
Explanation
Correct Answer
D:The model may choose an unintended format or overlook key business rules. This follows from the reported condition: A system prompt instructs a model to answer in JSON but provides no schema or valid example. The reason is that specific, noncontradictory instructions reduce interpretation ambiguity and make validation possible. The appropriate mitigation is: Give clear role, task, constraints and explicit output contract with consistent examples where helpful. Evidence of success would be: Unseen examples consistently satisfy the declared fields and constraints.
Incorrect Answers
A:Biased or contradictory examples can systematically misclassify unusual inputs. That exposure calls for curate representative, consistent few-shot examples and evaluate against held-out cases. The scenario here instead risks the model may choose an unintended format or overlook key business rules.
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 the model may choose an unintended format or overlook key business rules.
C: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 the model may choose an unintended format or overlook key business rules.