Claude Certified Developer - Foundations CCDV-F Practice Test 58
Question 570
To address the situation: A service changes SDK versions but still uses an outdated Messages payload shape. The team implements: "Use documented Messages API request fields and supported client SDK methods with schema validation". Which evidence BEST demonstrates success?
- A test call yields correlated request metadata and measured token consumption without leaking prompt content.
- A contract test sends a supported payload and receives a properly typed Messages response.
- Fault tests demonstrate bounded retries for transient codes and immediate rejection of invalid requests.
- A long-session test stays within target token usage while preserving necessary current constraints.
Explanation
Correct Answer
B:A contract test sends a supported payload and receives a properly typed Messages response. This directly tests the outcome of use documented Messages API request fields and supported client SDK methods with schema validation. in the described case: A service changes SDK versions but still uses an outdated Messages payload shape. The underlying principle is that aPI correctness depends on matching the current endpoint contract for messages, model and token limits. If the change is ineffective, requests can be rejected or interpreted differently when fields are malformed. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:A test call yields correlated request metadata and measured token consumption without leaking prompt content. This outcome would validate capture provider request IDs, token usage and model metadata in privacy-safe telemetry, not the requested intervention. The required test result is A contract test sends a supported payload and receives a properly typed Messages response.
C:Fault tests demonstrate bounded retries for transient codes and immediate rejection of invalid requests. This outcome would validate use status-aware retry policies with exponential backoff, jitter and bounded attempts for transient errors, not the requested intervention. The required test result is A contract test sends a supported payload and receives a properly typed Messages response.
D: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 contract test sends a supported payload and receives a properly typed Messages response.
Question 571
In this situation: A service logs entire Claude API requests including confidential customer text and bearer keys. The developer proposes: Log bounded structured request IDs, latency and failure categories while redacting secrets and sensitive content. Which principle BEST justifies the approach?
- REST clients must handle status codes and payload structure as separate error conditions.
- Configuration must be controlled independently of application source and securely varied by environment.
- Observability must preserve operational diagnostics without turning logs into a data-leak channel.
- Rate limits and transient failures require controlled retries; permanent client errors should fail fast.
Explanation
Correct Answer
C:Observability must preserve operational diagnostics without turning logs into a data-leak channel. In the given situation, a service logs entire Claude API requests including confidential customer text and bearer keys. That consideration supports the measure: Log bounded structured request IDs, latency and failure categories while redacting secrets and sensitive content. Ignoring it creates this exposure: Credentials or personal data can be exposed in log storage, or incidents can be impossible to trace. Verify the implementation by checking: Sample traces correlate request IDs and error types without including keys or protected prompt content.
Incorrect Answers
A:REST clients must handle status codes and payload structure as separate error conditions. This principle relates to validate HTTP status, content types and JSON response contracts before processing API results. The observed failure instead depends on observability must preserve operational diagnostics without turning logs into a data-leak channel. The appropriate choice is observability must preserve operational diagnostics without turning logs into a data-leak channel.
B:Configuration must be controlled independently of application source and securely varied by environment. This principle relates to centralize versioned configuration, protected secrets and environment-specific deployment settings. The observed failure instead depends on observability must preserve operational diagnostics without turning logs into a data-leak channel. The appropriate choice is observability must preserve operational diagnostics without turning logs into a data-leak channel.
D: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 observability must preserve operational diagnostics without turning logs into a data-leak channel. The appropriate choice is observability must preserve operational diagnostics without turning logs into a data-leak channel.
Question 572
To address the situation: An API gateway retries requests after client timeouts and creates duplicate downstream business records. The team implements: "Use idempotency keys or a verified deduplication record around side-effecting operations". Which evidence BEST demonstrates success?
- Fault injection yields a truthful limited-service response without executing duplicate actions.
- Cross-tenant negative tests are denied before documents enter model context.
- Fault tests demonstrate bounded retries for transient codes and immediate rejection of invalid requests.
- A simulated timeout/retry results in a single authorized record and a traceable request ID.
Explanation
Correct Answer
D: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: An API gateway retries requests after client timeouts and creates duplicate downstream business records. 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:Fault injection yields a truthful limited-service response without executing duplicate actions. This outcome would validate design timeouts, bounded retry, graceful degradation and explicit failure responses for Claude-dependent features, 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: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.
C:Fault tests demonstrate bounded retries for transient codes and immediate rejection of invalid requests. This outcome would validate use status-aware retry policies with exponential backoff, jitter and bounded attempts for transient errors, 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 573
A developer encounters this situation: A client deserializes model output directly into a payment request without checking allowed values. What is the MOST appropriate technical response?
- Validate structured model outputs against strict schema and business rules before use.
- Curate representative, consistent few-shot examples and evaluate against held-out cases.
- Check factual claims and citations against accessible source evidence with an explicit uncertainty path.
- Prune low-value tool outputs and preserve a compact summary of goals, decisions and remaining work.
Explanation
Correct Answer
A:Validate structured model outputs against strict schema and business rules before use. This directly addresses the situation: A client deserializes model output directly into a payment request without checking allowed values. The technical reason is that syntactic JSON validity is necessary but insufficient for safe application state changes. Without it, malformed or out-of-range fields can trigger incorrect actions or crashes. A concrete acceptance check is: Invalid values are rejected before side effects and valid cases pass typed parsing.
Incorrect Answers
B:Curate representative, consistent few-shot examples and evaluate against held-out cases. This does not repair the current workflow because syntactic JSON validity is necessary but insufficient for safe application state changes. The targeted change is validate structured model outputs against strict schema and business rules before use.
C:Check factual claims and citations against accessible source evidence with an explicit uncertainty path. This does not repair the current workflow because syntactic JSON validity is necessary but insufficient for safe application state changes. The targeted change is validate structured model outputs against strict schema and business rules before use.
D:Prune low-value tool outputs and preserve a compact summary of goals, decisions and remaining work. This does not repair the current workflow because syntactic JSON validity is necessary but insufficient for safe application state changes. The targeted change is validate structured model outputs against strict schema and business rules before use.
Question 574
This engineering control is missing: "Enforce least-privilege tool permissions and distinct identities scoped to each workflow". The reported condition is: A support chatbot can invoke administrative APIs using a shared production service account. What is the most direct failure risk?
- A prompt-based warning may fail to stop a harmful command from running.
- Compromised or confused agents may modify unrelated production records.
- Unsafe actions can occur before a downstream moderation filter sees the result.
- Personal data or credentials may leak through telemetry or unnecessary persistence.
Explanation
Correct Answer
B:Compromised or confused agents may modify unrelated production records. This follows from the reported condition: A support chatbot can invoke administrative APIs using a shared production service account. The reason is that application authorization constrains the effects of model output even when the model is manipulated. The appropriate mitigation is: Enforce least-privilege tool permissions and distinct identities scoped to each workflow. Evidence of success would be: An unauthorized mutation is denied at the API while the intended read action succeeds.
Incorrect Answers
A:A prompt-based warning may fail to stop a harmful command from running. That exposure calls for add supported pre-tool hooks or policy checks that deny dangerous commands and preserve audit evidence. The scenario here instead risks compromised or confused agents may modify unrelated production records.
C:Unsafe actions can occur before a downstream moderation filter sees the result. That exposure calls for layer input, tool-execution and output checks with human approval for sensitive side effects. The scenario here instead risks compromised or confused agents may modify unrelated production records.
D:Personal data or credentials may leak through telemetry or unnecessary persistence. That exposure calls for minimize sensitive input and redact, restrict and retain logs according to approved privacy requirements. The scenario here instead risks compromised or confused agents may modify unrelated production records.
Question 575
In this situation: Repeated requests include the same long immutable instructions and reference catalog but use no prompt caching. The developer proposes: Apply supported prompt caching or reuse patterns for stable prefix content and monitor cache hits. Which principle BEST justifies the approach?
- Cost attribution requires measured usage and explicit prices rather than assumptions about response length.
- Model updates can alter behavior, latency and tool use; compatibility must be tested at release time.
- Caching can reduce repeated processing of identical eligible context while requiring correct cache boundaries.
- Different requests require different capability budgets; selective routing balances efficiency and quality.
Explanation
Correct Answer
C:Caching can reduce repeated processing of identical eligible context while requiring correct cache boundaries. In the given situation, repeated requests include the same long immutable instructions and reference catalog but use no prompt caching. That consideration supports the measure: Apply supported prompt caching or reuse patterns for stable prefix content and monitor cache hits. Ignoring it creates this exposure: Unnecessary repeated context processing raises token cost and time to first response. Verify the implementation by checking: Usage metrics show cache reads or reduced eligible prefix processing without mixing user-specific data.
Incorrect Answers
A:Cost attribution requires measured usage and explicit prices rather than assumptions about response length. This principle relates to track input/output tokens and model, cache and batch usage per operation with privacy-safe reporting. The observed failure instead depends on caching can reduce repeated processing of identical eligible context while requiring correct cache boundaries. The appropriate choice is caching can reduce repeated processing of identical eligible context while requiring correct cache boundaries.
B:Model updates can alter behavior, latency and tool use; compatibility must be tested at release time. This principle relates to pin or deliberately version model selections and run regression tests during model changes. The observed failure instead depends on caching can reduce repeated processing of identical eligible context while requiring correct cache boundaries. The appropriate choice is caching can reduce repeated processing of identical eligible context while requiring correct cache boundaries.
D:Different requests require different capability budgets; selective routing balances efficiency and quality. This principle relates to use task difficulty and measured confidence to route work to an appropriate model or escalation path. The observed failure instead depends on caching can reduce repeated processing of identical eligible context while requiring correct cache boundaries. The appropriate choice is caching can reduce repeated processing of identical eligible context while requiring correct cache boundaries.
Question 576
In this situation: A client handles a tool-use stop reason as if Claude had finished a normal text response. The developer proposes: Inspect stop reasons and complete the documented tool-use and tool-result exchange before finalizing output. Which principle BEST justifies the approach?
- Reproducible software builds require controlled dependency versions and compatibility gates.
- Batch APIs can improve throughput and cost for nonurgent independent workloads but require asynchronous completion handling.
- Streaming requires preserving event structure and ordering, including tool and usage metadata.
- Model tool requests are distinct content and require client-side orchestration to supply results correctly.
Explanation
Correct Answer
D:Model tool requests are distinct content and require client-side orchestration to supply results correctly. In the given situation, a client handles a tool-use stop reason as if Claude had finished a normal text response. That consideration supports the measure: Inspect stop reasons and complete the documented tool-use and tool-result exchange before finalizing output. Ignoring it creates this exposure: Tool-dependent tasks may end incomplete or return an unfulfilled action description. Verify the implementation by checking: A test tool request executes only after authorization and a matching result lets the assistant finish.
Incorrect Answers
A: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 model tool requests are distinct content and require client-side orchestration to supply results correctly. The appropriate choice is model tool requests are distinct content and require client-side orchestration to supply results correctly.
B:Batch APIs can improve throughput and cost for nonurgent independent workloads but require asynchronous completion handling. This principle relates to select supported batch processing where appropriate and monitor batch lifecycle and individual results. The observed failure instead depends on model tool requests are distinct content and require client-side orchestration to supply results correctly. The appropriate choice is model tool requests are distinct content and require client-side orchestration to supply results correctly.
C:Streaming requires preserving event structure and ordering, including tool and usage metadata. This principle relates to process the documented streaming event sequence by event type and finalize only on completion. The observed failure instead depends on model tool requests are distinct content and require client-side orchestration to supply results correctly. The appropriate choice is model tool requests are distinct content and require client-side orchestration to supply results correctly.
Question 577
To address the situation: A Claude Agent SDK workflow allows subagents to call tools without a shared termination budget. The team implements: "Implement explicit tool-loop controls, errors, iteration limits and observable state in the agent harness". Which evidence BEST demonstrates success?
- 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 adversarial research input cannot invoke payment tools, while an authorized approval path still works.
- A malicious tool-result fixture cannot gain permissions or override the declared control policy.
Explanation
Correct Answer
A:A fault-injection run terminates predictably and records the failed tool, recovery and final state. This directly tests the outcome of implement explicit tool-loop controls, errors, iteration limits and observable state in the agent harness. in the described case: A Claude Agent SDK workflow allows subagents to call tools without a shared termination budget. The underlying principle is that an agent orchestration loop must own tool execution and recovery rather than assuming every model step succeeds. If the change is ineffective, tool failures can leave an agent stuck, silently incomplete or repeatedly calling services. A configuration checkbox alone is insufficient proof.
Incorrect Answers
B: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 fault-injection run terminates predictably and records the failed tool, recovery and final state.
C:An adversarial research input cannot invoke payment tools, while an authorized approval path still works. This outcome would validate separate specialized subagents or phases and restrict high-impact actions behind explicit verified authorization, not the requested intervention. The required test result is A fault-injection run terminates predictably and records the failed tool, recovery and final state.
D: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 fault-injection run terminates predictably and records the failed tool, recovery and final state.
Question 578
This engineering control is missing: "Separate trusted system/developer instructions from untrusted input and validate any requested tool execution". The reported condition is: A file-summarization feature treats uploaded customer text as equivalent to developer policy. What is the most direct failure risk?
- One logical action can produce duplicated invoices, tickets or payments.
- A hostile document may persuade the model to reveal policy or call disallowed tools.
- Jobs can be lost or cost more when the wrong execution mode is used.
- Users can receive false completion messages or experience cascading outages and wasted requests.
Explanation
Correct Answer
B:A hostile document may persuade the model to reveal policy or call disallowed tools. This follows from the reported condition: A file-summarization feature treats uploaded customer text as equivalent to developer policy. 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
A: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:Jobs can be lost or cost more when the wrong execution mode is used. That exposure calls for select supported batch processing where appropriate and monitor batch lifecycle and individual results. The scenario here instead risks A hostile document may persuade the model to reveal policy or call disallowed tools.
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 A hostile document may persuade the model to reveal policy or call disallowed tools.
Question 579
This engineering control is missing: "Isolate contexts by user and task, passing only necessary evidence to each subagent". The reported condition is: A specialist subagent is given privileged billing history that its task does not require. What is the most direct failure risk?
- Malformed or out-of-range fields can trigger incorrect actions or crashes.
- Users may trust fabricated sources or unsupported policy advice.
- Unrelated user data may contaminate answers or leak into another task.
- The agent can duplicate work or violate earlier requirements after losing context.
Explanation
Correct Answer
C:Unrelated user data may contaminate answers or leak into another task. This follows from the reported condition: A specialist subagent is given privileged billing history that its task does not require. 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: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 unrelated user data may contaminate answers or leak into another task.
B: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 unrelated user data may contaminate answers or leak into another task.
D: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.
Question 580
To address the situation: A business workflow needs durable branching and checkpoints but uses a stateless loop with no persisted progress. The team implements: "Match the orchestration framework to complexity, durable state and control-flow requirements rather than novelty". Which evidence BEST demonstrates success?
- An adversarial research input cannot invoke payment tools, while an authorized approval path still works.
- A multi-step test stays within budget while retaining key constraints and completed steps.
- The workflow produces consistent step traces and enforces the required approval order on representative invoices.
- A restart test preserves workflow state and the chosen implementation remains auditable at the required complexity.
Explanation
Correct Answer
D:A restart test preserves workflow state and the chosen implementation remains auditable at the required complexity. This directly tests the outcome of match the orchestration framework to complexity, durable state and control-flow requirements rather than novelty. in the described case: A business workflow needs durable branching and checkpoints but uses a stateless loop with no persisted progress. The underlying principle is that frameworks such as LangGraph or Strands add value when branching, persistence or coordination justify their overhead. If the change is ineffective, overengineering raises maintenance burden, while underengineering loses recovery state on complex flows. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:An adversarial research input cannot invoke payment tools, while an authorized approval path still works. This outcome would validate separate specialized subagents or phases and restrict high-impact actions behind explicit verified authorization, not the requested intervention. The required test result is A restart test preserves workflow state and the chosen implementation remains auditable at the required complexity.
B: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 restart test preserves workflow state and the chosen implementation remains auditable at the required complexity.
C:The workflow produces consistent step traces and enforces the required approval order on representative invoices. This outcome would validate use a deterministic workflow for fixed tasks and reserve autonomous agent loops for genuinely dynamic decisions, not the requested intervention. The required test result is A restart test preserves workflow state and the chosen implementation remains auditable at the required complexity.