Claude Certified Developer - Foundations CCDV-F Practice Test 7
Question 60
In this situation: A client app crashes when a valid tool-use content block appears in a Messages response. The developer proposes: Parse documented typed content blocks and stop reasons rather than flattening responses into text. Which principle BEST justifies the approach?
- RAG effectiveness depends on relevant evidence and an explicit boundary between retrieved facts and model inference.
- Reproducible software builds require controlled dependency versions and compatibility gates.
- Observability must preserve operational diagnostics without turning logs into a data-leak channel.
- The Messages API carries structured content that must be handled by type and state.
Explanation
Correct Answer
D:The Messages API carries structured content that must be handled by type and state. In the given situation, a client app crashes when a valid tool-use content block appears in a Messages response. That consideration supports the measure: Parse documented typed content blocks and stop reasons rather than flattening responses into text. Ignoring it creates this exposure: Tool requests and multi-part results may be lost or misinterpreted by a text-only parser. Verify the implementation by checking: Fixtures containing text and tool-use blocks are parsed into correct typed application events.
Incorrect Answers
A:RAG effectiveness depends on relevant evidence and an explicit boundary between retrieved facts and model inference. This principle relates to build retrieval with provenance-aware citations and grounded-answer validation before presenting claims. The observed failure instead depends on the Messages API carries structured content that must be handled by type and state. The appropriate choice is the Messages API carries structured content that must be handled by type and state.
B:Reproducible software builds require controlled dependency versions and compatibility gates. This principle relates to pin tested dependencies and use staged upgrades with regression tests and rollback. The observed failure instead depends on the Messages API carries structured content that must be handled by type and state. The appropriate choice is the Messages API carries structured content that must be handled by type and state.
C:Observability must preserve operational diagnostics without turning logs into a data-leak channel. This principle relates to log bounded structured request IDs, latency and failure categories while redacting secrets and sensitive content. The observed failure instead depends on the Messages API carries structured content that must be handled by type and state. The appropriate choice is the Messages API carries structured content that must be handled by type and state.
Question 61
A developer encounters this situation: A regulated assistant has only a final-output filter and no validation before high-risk tools run. What is the MOST appropriate technical response?
- Layer input, tool-execution and output checks with human approval for sensitive side effects.
- Add supported pre-tool hooks or policy checks that deny dangerous commands and preserve audit evidence.
- Minimize sensitive input and redact, restrict and retain logs according to approved privacy requirements.
- Enforce least-privilege tool permissions and distinct identities scoped to each workflow.
Explanation
Correct Answer
A:Layer input, tool-execution and output checks with human approval for sensitive side effects. This directly addresses the situation: A regulated assistant has only a final-output filter and no validation before high-risk tools run. The technical reason is that safety controls must protect every consequential boundary, not merely the final generated text. Without it, unsafe actions can occur before a downstream moderation filter sees the result. A concrete acceptance check is: Adversarial prompts fail authorization at the tool boundary and produce reviewable audit records.
Incorrect Answers
B:Add supported pre-tool hooks or policy checks that deny dangerous commands and preserve audit evidence. This does not repair the current workflow because safety controls must protect every consequential boundary, not merely the final generated text. The targeted change is layer input, tool-execution and output checks with human approval for sensitive side effects.
C:Minimize sensitive input and redact, restrict and retain logs according to approved privacy requirements. This does not repair the current workflow because safety controls must protect every consequential boundary, not merely the final generated text. The targeted change is layer input, tool-execution and output checks with human approval for sensitive side effects.
D:Enforce least-privilege tool permissions and distinct identities scoped to each workflow. This does not repair the current workflow because safety controls must protect every consequential boundary, not merely the final generated text. The targeted change is layer input, tool-execution and output checks with human approval for sensitive side effects.
Question 62
To address the situation: A checkout assistant parses prose by splitting punctuation and occasionally triggers the wrong operation. The team implements: "Require structured validated outputs or constrained tool schemas before business-side execution". Which evidence BEST demonstrates success?
- Tests with unknown tool names or invalid arguments are rejected without side effects.
- Invalid payloads are rejected without side effects and valid schema-conformant commands execute once.
- A long-session test stays within target token usage while preserving necessary current constraints.
- A simulated timeout/retry results in a single authorized record and a traceable request ID.
Explanation
Correct Answer
B:Invalid payloads are rejected without side effects and valid schema-conformant commands execute once. This directly tests the outcome of require structured validated outputs or constrained tool schemas before business-side execution. in the described case: A checkout assistant parses prose by splitting punctuation and occasionally triggers the wrong operation. The underlying principle is that application-facing output must be parsed and validated against a contract, not inferred from unconstrained prose. If the change is ineffective, malformed responses can become incorrect API mutations or broken user workflows. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:Tests with unknown tool names or invalid arguments are rejected without side effects. This outcome would validate maintain a registered allowlist of tool schemas and validate returned names and arguments before execution, not the requested intervention. The required test result is invalid payloads are rejected without side effects and valid schema-conformant commands execute once.
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 invalid payloads are rejected without side effects and valid schema-conformant commands execute once.
D:A simulated timeout/retry results in a single authorized record and a traceable request ID. This outcome would validate use idempotency keys or a verified deduplication record around side-effecting operations, not the requested intervention. The required test result is invalid payloads are rejected without side effects and valid schema-conformant commands execute once.
Question 63
To address the situation: A job runner replays an LLM-triggered write after network interruption without an operation identifier. The team implements: "Use idempotency keys or a verified deduplication record around side-effecting operations". Which evidence BEST demonstrates success?
- A multi-turn regression test succeeds when required history is supplied and fails safely when it is absent.
- A long-session test stays within target token usage while preserving necessary current constraints.
- A simulated timeout/retry results in a single authorized record and a traceable request ID.
- Cross-tenant negative tests are denied before documents enter model context.
Explanation
Correct Answer
C:A simulated timeout/retry results in a single authorized record and a traceable request ID. This directly tests the outcome of use idempotency keys or a verified deduplication record around side-effecting operations. in the described case: A job runner replays an LLM-triggered write after network interruption without an operation identifier. The underlying principle is that retries are necessary for reliability but should not repeat external mutations when a response is lost. If the change is ineffective, one logical action can produce duplicated invoices, tickets or payments. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:A multi-turn regression test succeeds when required history is supplied and fails safely when it is absent. This outcome would validate persist and re-supply required prior message context explicitly according to the stateless Messages API pattern, not the requested intervention. The required test result is A simulated timeout/retry results in a single authorized record and a traceable request ID.
B: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 simulated timeout/retry results in a single authorized record and a traceable request ID.
D:Cross-tenant negative tests are denied before documents enter model context. This outcome would validate enforce tenant identity, authorization and retrieval filtering before data is supplied to the model, not the requested intervention. The required test result is A simulated timeout/retry results in a single authorized record and a traceable request ID.
Question 64
In this situation: A chat app assumes the Messages API automatically remembers every earlier conversation. The developer proposes: Persist and re-supply required prior message context explicitly according to the stateless Messages API pattern. Which principle BEST justifies the approach?
- API correctness depends on matching the current endpoint contract for messages, model and token limits.
- Model tool requests are distinct content and require client-side orchestration to supply results correctly.
- Reliable distributed workflows separate durable state from transient worker memory.
- Conversation continuity depends on the application supplying relevant history or state in each request.
Explanation
Correct Answer
D:Conversation continuity depends on the application supplying relevant history or state in each request. In the given situation, a chat app assumes the Messages API automatically remembers every earlier conversation. That consideration supports the measure: Persist and re-supply required prior message context explicitly according to the stateless Messages API pattern. Ignoring it creates this exposure: The model may answer without critical prior constraints or invent missing context. Verify the implementation by checking: A multi-turn regression test succeeds when required history is supplied and fails safely when it is absent.
Incorrect Answers
A:API correctness depends on matching the current endpoint contract for messages, model and token limits. This principle relates to use documented Messages API request fields and supported client SDK methods with schema validation. The observed failure instead depends on conversation continuity depends on the application supplying relevant history or state in each request. The appropriate choice is conversation continuity depends on the application supplying relevant history or state in each request.
B: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 conversation continuity depends on the application supplying relevant history or state in each request. The appropriate choice is conversation continuity depends on the application supplying relevant history or state in each request.
C:Reliable distributed workflows separate durable state from transient worker memory. This principle relates to persist necessary workflow checkpoints and reconcile completed actions during restarts. The observed failure instead depends on conversation continuity depends on the application supplying relevant history or state in each request. The appropriate choice is conversation continuity depends on the application supplying relevant history or state in each request.
Question 65
This engineering control is missing: "Separate trusted system/developer instructions from untrusted input and validate any requested tool execution". The reported condition is: A model-facing service accepts untrusted markdown containing instructions to modify system settings. What is the most direct failure risk?
- A hostile document may persuade the model to reveal policy or call disallowed tools.
- One logical action can produce duplicated invoices, tickets or payments.
- Unvalidated tool calls may execute unauthorized operations or crash an integration.
- Users may experience unnecessary blank screens or partial/inconsistent final responses.
Explanation
Correct Answer
A:A hostile document may persuade the model to reveal policy or call disallowed tools. This follows from the reported condition: A model-facing service accepts untrusted markdown containing instructions to modify system settings. The reason is that prompt and data channels have different trust levels, and source documents must not override application rules. The appropriate mitigation is: Separate trusted system/developer instructions from untrusted input and validate any requested tool execution. Evidence of success would be: Prompt-injection tests on uploaded content cannot bypass tool authorization or leak restricted values.
Incorrect Answers
B: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 A hostile document may persuade the model to reveal policy or call disallowed tools.
C:Unvalidated tool calls may execute unauthorized operations or crash an integration. That exposure calls for maintain a registered allowlist of tool schemas and validate returned names and arguments before execution. The scenario here instead risks A hostile document may persuade the model to reveal policy or call disallowed tools.
D:Users may experience unnecessary blank screens or partial/inconsistent final responses. That exposure calls for use supported streaming events with explicit lifecycle, partial-render and finalization handling. The scenario here instead risks A hostile document may persuade the model to reveal policy or call disallowed tools.
Question 66
This engineering control is missing: "Centralize versioned configuration, protected secrets and environment-specific deployment settings". The reported condition is: A production prompt change requires manual edits to three services with no version record. What is the most direct failure risk?
- Tool requests and multi-part results may be lost or misinterpreted by a text-only parser.
- Unreviewed configuration drift can expose keys or create inconsistent model behavior.
- A restart can lose progress or duplicate external mutations.
- Users can receive false completion messages or experience cascading outages and wasted requests.
Explanation
Correct Answer
B:Unreviewed configuration drift can expose keys or create inconsistent model behavior. This follows from the reported condition: A production prompt change requires manual edits to three services with no version record. The reason is that configuration must be controlled independently of application source and securely varied by environment. The appropriate mitigation is: Centralize versioned configuration, protected secrets and environment-specific deployment settings. Evidence of success would be: A canary deploy changes one approved setting with traceable version and no secrets in code.
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 unreviewed configuration drift can expose keys or create inconsistent model behavior.
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 unreviewed configuration drift can expose keys or create inconsistent model behavior.
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 unreviewed configuration drift can expose keys or create inconsistent model behavior.
Question 67
This engineering control is missing: "Authorize tool name, arguments and caller identity before performing any side effect". The reported condition is: An assistant calls a tool not registered in the application's configured allowlist. What is the most direct failure risk?
- A caller could invoke privileged tools or read another user's data.
- The model may hallucinate completion or leak protected information in an error message.
- A compromised conversation could trigger unauthorized transactions or network access.
- Ambiguous or unchecked arguments can invoke an unintended operation or injection path.
Explanation
Correct Answer
C:A compromised conversation could trigger unauthorized transactions or network access. This follows from the reported condition: An assistant calls a tool not registered in the application's configured allowlist. The reason is that tool-use prompts do not replace deterministic authorization in the client or server. The appropriate mitigation is: Authorize tool name, arguments and caller identity before performing any side effect. Evidence of success would be: Unknown or unauthorized calls are denied even when the model proposes them.
Incorrect Answers
A:A caller could invoke privileged tools or read another user's data. That exposure calls for apply authentication, resource authorization and request validation to each MCP tool/resource operation. The scenario here instead risks A compromised conversation could trigger unauthorized transactions or network access.
B:The model may hallucinate completion or leak protected information in an error message. That exposure calls for return typed, bounded, sanitized tool results with explicit errors and retry metadata. The scenario here instead risks A compromised conversation could trigger unauthorized transactions or network access.
D:Ambiguous or unchecked arguments can invoke an unintended operation or injection path. That exposure calls for define precise tool descriptions and validated JSON argument schemas with narrow capabilities. The scenario here instead risks A compromised conversation could trigger unauthorized transactions or network access.
Question 68
This engineering control is missing: "Implement explicit tool-loop controls, errors, iteration limits and observable state in the agent harness". The reported condition is: A Claude Agent SDK workflow allows subagents to call tools without a shared termination budget. What is the most direct failure risk?
- A mismatched hosting choice can violate data boundaries or leave critical execution controls unavailable.
- Runaway iterations can consume tokens, spam APIs and repeat harmful or useless operations.
- Prompt injection in retrieved results may redirect the agent into unauthorized execution.
- Tool failures can leave an agent stuck, silently incomplete or repeatedly calling services.
Explanation
Correct Answer
D:Tool failures can leave an agent stuck, silently incomplete or repeatedly calling services. This follows from the reported condition: A Claude Agent SDK workflow allows subagents to call tools without a shared termination budget. The reason is that an agent orchestration loop must own tool execution and recovery rather than assuming every model step succeeds. The appropriate mitigation is: Implement explicit tool-loop controls, errors, iteration limits and observable state in the agent harness. Evidence of success would be: A fault-injection run terminates predictably and records the failed tool, recovery and final state.
Incorrect Answers
A:A mismatched hosting choice can violate data boundaries or leave critical execution controls unavailable. That exposure calls for choose managed versus self-hosted agent execution by evaluating residency, observability, permissions and operational responsibility. The scenario here instead risks tool failures can leave an agent stuck, silently incomplete or repeatedly calling services.
B:Runaway iterations can consume tokens, spam APIs and repeat harmful or useless operations. That exposure calls for bound agent iterations, tool budgets and stop conditions with a safe fallback or human escalation. The scenario here instead risks tool failures can leave an agent stuck, silently incomplete or repeatedly calling services.
C:Prompt injection in retrieved results may redirect the agent into unauthorized execution. That exposure calls for pass tool results as lower-trust data and enforce tool authorization in the application layer. The scenario here instead risks tool failures can leave an agent stuck, silently incomplete or repeatedly calling services.
Question 69
To address the situation: An agentic coding run forgets the project's test commands and style constraints between sessions. The team implements: "Maintain concise project-level Claude Code instructions and scope file/tool permissions to the repository policy". 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.
- Negative HTTP fixtures produce explicit typed failures and valid JSON remains parseable.
Explanation
Correct Answer
A:A controlled coding task follows project instructions and avoids excluded files while producing a reviewable diff. This directly tests the outcome of maintain concise project-level Claude Code instructions and scope file/tool permissions to the repository policy. in the described case: An agentic coding run forgets the project's test commands and style constraints between sessions. The underlying principle is that coding assistants require explicit repository context and tool boundaries, not assumptions about developer intent. If the change is ineffective, the assistant may change protected files or ignore required tests during code generation. A configuration checkbox alone is insufficient proof.
Incorrect Answers
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 A controlled coding task follows project instructions and avoids excluded files while producing a reviewable diff.
C:An unsafe command is intercepted and refused while a harmless build/test command succeeds. This outcome would validate use Claude Code permissions and supported pre-tool hooks to enforce command approval and safety checks, not the requested intervention. The required test result is A controlled coding task follows project instructions and avoids excluded files while producing a reviewable diff.
D:Negative HTTP fixtures produce explicit typed failures and valid JSON remains parseable. This outcome would validate validate HTTP status, content types and JSON response contracts before processing API results, not the requested intervention. The required test result is A controlled coding task follows project instructions and avoids excluded files while producing a reviewable diff.
Question 70
This engineering control is missing: "Pin or deliberately version model selections and run regression tests during model changes". The reported condition is: A team upgrades Claude models and suddenly sees different tool-call frequency despite unchanged prompts. What is the most direct failure risk?
- Model selection by name alone can overpay or underperform on important workflows.
- Silent model change can break output contracts or downstream user experience.
- Unnecessary repeated context processing raises token cost and time to first response.
- Hard tasks may fail under an underpowered model while easy tasks waste premium capacity.
Explanation
Correct Answer
B:Silent model change can break output contracts or downstream user experience. This follows from the reported condition: A team upgrades Claude models and suddenly sees different tool-call frequency despite unchanged prompts. The reason is that model updates can alter behavior, latency and tool use; compatibility must be tested at release time. The appropriate mitigation is: Pin or deliberately version model selections and run regression tests during model changes. Evidence of success would be: An upgrade canary passes contract and task evaluations with an available rollback path.
Incorrect Answers
A:Model selection by name alone can overpay or underperform on important workflows. That exposure calls for benchmark suitable Claude model tiers for quality, latency and price on the application's actual tasks. The scenario here instead risks silent model change can break output contracts or downstream user experience.
C:Unnecessary repeated context processing raises token cost and time to first response. That exposure calls for apply supported prompt caching or reuse patterns for stable prefix content and monitor cache hits. The scenario here instead risks silent model change can break output contracts or downstream user experience.
D:Hard tasks may fail under an underpowered model while easy tasks waste premium capacity. That exposure calls for use task difficulty and measured confidence to route work to an appropriate model or escalation path. The scenario here instead risks silent model change can break output contracts or downstream user experience.