Claude Certified Developer - Foundations CCDV-F Practice Test 34
Question 330
This engineering control is missing: "Add supported pre-tool hooks or policy checks that deny dangerous commands and preserve audit evidence". The reported condition is: An autonomous code assistant executes a file-deletion command without a policy gate. What is the most direct failure risk?
- A leaked key can enable unauthorized API usage and uncontrolled cost or data access.
- A prompt-based warning may fail to stop a harmful command from running.
- Unsafe actions can occur before a downstream moderation filter sees the result.
- Compromised or confused agents may modify unrelated production records.
Explanation
Correct Answer
B:A prompt-based warning may fail to stop a harmful command from running. This follows from the reported condition: An autonomous code assistant executes a file-deletion command without a policy gate. The reason is that deterministic hooks provide an enforceable checkpoint around risky tool execution. The appropriate mitigation is: Add supported pre-tool hooks or policy checks that deny dangerous commands and preserve audit evidence. Evidence of success would be: A harmless command passes, a dangerous simulated action is blocked, and the event is logged.
Incorrect Answers
A:A leaked key can enable unauthorized API usage and uncontrolled cost or data access. That exposure calls for store Claude credentials in a managed secret store, rotate them, and scope access per deployment or tenant. The scenario here instead risks A prompt-based warning may fail to stop a harmful command from running.
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 A prompt-based warning may fail to stop a harmful command from running.
D:Compromised or confused agents may modify unrelated production records. That exposure calls for enforce least-privilege tool permissions and distinct identities scoped to each workflow. The scenario here instead risks A prompt-based warning may fail to stop a harmful command from running.
Question 331
To address the situation: An agent has broad database read/write access although its task requires one read-only lookup. The team implements: "Enforce least-privilege tool permissions and distinct identities scoped to each workflow". Which evidence BEST demonstrates success?
- Secret scanning finds no embedded keys, rotated credentials work, and revoked credentials fail.
- Adversarial prompts fail authorization at the tool boundary and produce reviewable audit records.
- An unauthorized mutation is denied at the API while the intended read action succeeds.
- Log sampling finds no secrets or unauthorized PII and retention tests remove expired records.
Explanation
Correct Answer
C:An unauthorized mutation is denied at the API while the intended read action succeeds. This directly tests the outcome of enforce least-privilege tool permissions and distinct identities scoped to each workflow. in the described case: An agent has broad database read/write access although its task requires one read-only lookup. The underlying principle is that application authorization constrains the effects of model output even when the model is manipulated. If the change is ineffective, compromised or confused agents may modify unrelated production records. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:Secret scanning finds no embedded keys, rotated credentials work, and revoked credentials fail. This outcome would validate store Claude credentials in a managed secret store, rotate them, and scope access per deployment or tenant, not the requested intervention. The required test result is an unauthorized mutation is denied at the API while the intended read action succeeds.
B:Adversarial prompts fail authorization at the tool boundary and produce reviewable audit records. This outcome would validate layer input, tool-execution and output checks with human approval for sensitive side effects, not the requested intervention. The required test result is an unauthorized mutation is denied at the API while the intended read action succeeds.
D:Log sampling finds no secrets or unauthorized PII and retention tests remove expired records. This outcome would validate minimize sensitive input and redact, restrict and retain logs according to approved privacy requirements, not the requested intervention. The required test result is an unauthorized mutation is denied at the API while the intended read action succeeds.
Question 332
In this situation: A workspace assistant uses a shared tool token to fetch records across organizations. The developer proposes: Enforce tenant identity, authorization and retrieval filtering before data is supplied to the model. Which principle BEST justifies the approach?
- LLM integrations are distributed systems and must expose genuine downstream failure states.
- Model tool requests are distinct content and require client-side orchestration to supply results correctly.
- Request context should contain only task-relevant content while respecting model context and token constraints.
- Data separation belongs in storage and tool access controls rather than relying on prompt instructions.
Explanation
Correct Answer
D:Data separation belongs in storage and tool access controls rather than relying on prompt instructions. In the given situation, a workspace assistant uses a shared tool token to fetch records across organizations. That consideration supports the measure: Enforce tenant identity, authorization and retrieval filtering before data is supplied to the model. Ignoring it creates this exposure: A user may retrieve another tenant's confidential content through search or tool access. Verify the implementation by checking: Cross-tenant negative tests are denied before documents enter model context.
Incorrect Answers
A:LLM integrations are distributed systems and must expose genuine downstream failure states. This principle relates to design timeouts, bounded retry, graceful degradation and explicit failure responses for Claude-dependent features. The observed failure instead depends on data separation belongs in storage and tool access controls rather than relying on prompt instructions. The appropriate choice is data separation belongs in storage and tool access controls rather than relying on prompt instructions.
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 data separation belongs in storage and tool access controls rather than relying on prompt instructions. The appropriate choice is data separation belongs in storage and tool access controls rather than relying on prompt instructions.
C:Request context should contain only task-relevant content while respecting model context and token constraints. This principle relates to control prompt assembly with relevant retrieval, truncation rules and context-budget measurements. The observed failure instead depends on data separation belongs in storage and tool access controls rather than relying on prompt instructions. The appropriate choice is data separation belongs in storage and tool access controls rather than relying on prompt instructions.
Question 333
A developer encounters this situation: An agent summarizes previous findings poorly and repeatedly reopens the same documents. What is the MOST appropriate technical response?
- Prune tool outputs and maintain concise task state or checkpoints to keep context useful.
- Add idempotency and completed-work tracking to subagent/tool handoffs.
- Keep tool execution and approval policy in deterministic application code rather than relying on model self-restraint.
- Match the orchestration framework to complexity, durable state and control-flow requirements rather than novelty.
Explanation
Correct Answer
A:Prune tool outputs and maintain concise task state or checkpoints to keep context useful. This directly addresses the situation: An agent summarizes previous findings poorly and repeatedly reopens the same documents. The technical reason is that agent memory should preserve decision-relevant state rather than an unbounded history of low-value observations. Without it, context bloat can increase costs, truncation and inconsistent task completion. A concrete acceptance check is: A multi-step test stays within budget while retaining key constraints and completed steps.
Incorrect Answers
B:Add idempotency and completed-work tracking to subagent/tool handoffs. This does not repair the current workflow because agent memory should preserve decision-relevant state rather than an unbounded history of low-value observations. The targeted change is prune tool outputs and maintain concise task state or checkpoints to keep context useful.
C:Keep tool execution and approval policy in deterministic application code rather than relying on model self-restraint. This does not repair the current workflow because agent memory should preserve decision-relevant state rather than an unbounded history of low-value observations. The targeted change is prune tool outputs and maintain concise task state or checkpoints to keep context useful.
D:Match the orchestration framework to complexity, durable state and control-flow requirements rather than novelty. This does not repair the current workflow because agent memory should preserve decision-relevant state rather than an unbounded history of low-value observations. The targeted change is prune tool outputs and maintain concise task state or checkpoints to keep context useful.
Question 334
In this situation: An agent may call a user-facing tool several times with the same arguments after a timeout. The developer proposes: Add idempotency and completed-work tracking to subagent/tool handoffs. Which principle BEST justifies the approach?
- Tool outputs are untrusted observations, not elevated user or system instructions.
- At-least-once execution patterns require deduplication when actions have external side effects.
- Agent memory should preserve decision-relevant state rather than an unbounded history of low-value observations.
- The agent's model output is a proposal; the hosting system must validate and enforce authorized actions.
Explanation
Correct Answer
B:At-least-once execution patterns require deduplication when actions have external side effects. In the given situation, an agent may call a user-facing tool several times with the same arguments after a timeout. That consideration supports the measure: Add idempotency and completed-work tracking to subagent/tool handoffs. Ignoring it creates this exposure: Retries or duplicate delegations can create multiple charges or inconsistent records. Verify the implementation by checking: A forced retry produces one intended side effect and a visible record of reconciliation.
Incorrect Answers
A:Tool outputs are untrusted observations, not elevated user or system instructions. This principle relates to pass tool results as lower-trust data and enforce tool authorization in the application layer. The observed failure instead depends on at-least-once execution patterns require deduplication when actions have external side effects. The appropriate choice is at-least-once execution patterns require deduplication when actions have external side effects.
C:Agent memory should preserve decision-relevant state rather than an unbounded history of low-value observations. This principle relates to prune tool outputs and maintain concise task state or checkpoints to keep context useful. The observed failure instead depends on at-least-once execution patterns require deduplication when actions have external side effects. The appropriate choice is at-least-once execution patterns require deduplication when actions have external side effects.
D:The agent's model output is a proposal; the hosting system must validate and enforce authorized actions. This principle relates to keep tool execution and approval policy in deterministic application code rather than relying on model self-restraint. The observed failure instead depends on at-least-once execution patterns require deduplication when actions have external side effects. The appropriate choice is at-least-once execution patterns require deduplication when actions have external side effects.
Question 335
To address the situation: A realtime application adds a websocket even though only one short reply is required per request. The team implements: "Select request/response HTTP, streaming, or persistent connections based on the real interaction pattern". Which evidence BEST demonstrates success?
- Rotated credentials work without code changes and invalid keys produce a bounded clear error.
- A benchmark shows required accuracy within agreed latency and token budgets for each task class.
- A representative interaction meets reliability/latency targets with no orphaned connection state.
- A load test shows bounded parallelism, proper cancellation and stable latency under normal traffic.
Explanation
Correct Answer
C:A representative interaction meets reliability/latency targets with no orphaned connection state. This directly tests the outcome of select request/response HTTP, streaming, or persistent connections based on the real interaction pattern. in the described case: A realtime application adds a websocket even though only one short reply is required per request. The underlying principle is that connection models should match directional and state requirements rather than be chosen for novelty. If the change is ineffective, unnecessary persistent sockets add complexity, while polling can waste resources and lose events. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A: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 A representative interaction meets reliability/latency targets with no orphaned connection state.
B:A benchmark shows required accuracy within agreed latency and token budgets for each task class. This outcome would validate choose appropriate thinking or effort settings based on task complexity, latency and budget constraints, not the requested intervention. The required test result is A representative interaction meets reliability/latency targets with no orphaned connection state.
D:A load test shows bounded parallelism, proper cancellation and stable latency under normal traffic. This outcome would validate use asynchronous SDK or REST calls with bounded concurrency and correct cleanup of pending tasks, not the requested intervention. The required test result is A representative interaction meets reliability/latency targets with no orphaned connection state.
Question 336
In this situation: An AI service fails open by returning an invented success result after a dependency times out. The developer proposes: Design timeouts, bounded retry, graceful degradation and explicit failure responses for Claude-dependent features. Which principle BEST justifies the approach?
- Retries are necessary for reliability but should not repeat external mutations when a response is lost.
- Configuration must be controlled independently of application source and securely varied by environment.
- Request context should contain only task-relevant content while respecting model context and token constraints.
- LLM integrations are distributed systems and must expose genuine downstream failure states.
Explanation
Correct Answer
D:LLM integrations are distributed systems and must expose genuine downstream failure states. In the given situation, an AI service fails open by returning an invented success result after a dependency times out. That consideration supports the measure: Design timeouts, bounded retry, graceful degradation and explicit failure responses for Claude-dependent features. Ignoring it creates this exposure: Users can receive false completion messages or experience cascading outages and wasted requests. Verify the implementation by checking: Fault injection yields a truthful limited-service response without executing duplicate actions.
Incorrect Answers
A:Retries are necessary for reliability but should not repeat external mutations when a response is lost. This principle relates to use idempotency keys or a verified deduplication record around side-effecting operations. The observed failure instead depends on LLM integrations are distributed systems and must expose genuine downstream failure states. The appropriate choice is LLM integrations are distributed systems and must expose genuine downstream failure states.
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 LLM integrations are distributed systems and must expose genuine downstream failure states. The appropriate choice is LLM integrations are distributed systems and must expose genuine downstream failure states.
C:Request context should contain only task-relevant content while respecting model context and token constraints. This principle relates to control prompt assembly with relevant retrieval, truncation rules and context-budget measurements. The observed failure instead depends on LLM integrations are distributed systems and must expose genuine downstream failure states. The appropriate choice is LLM integrations are distributed systems and must expose genuine downstream failure states.
Question 337
A developer encounters this situation: A knowledge assistant's latency spikes because unchanged system context is reprocessed on every turn. What is the MOST appropriate technical response?
- Apply supported prompt caching or reuse patterns for stable prefix content and monitor cache hits.
- Use clear task instructions and targeted examples when the required schema or decision boundary is non-obvious.
- Track input/output tokens and model, cache and batch usage per operation with privacy-safe reporting.
- Use asynchronous SDK or REST calls with bounded concurrency and correct cleanup of pending tasks.
Explanation
Correct Answer
A:Apply supported prompt caching or reuse patterns for stable prefix content and monitor cache hits. This directly addresses the situation: A knowledge assistant's latency spikes because unchanged system context is reprocessed on every turn. The technical reason is that caching can reduce repeated processing of identical eligible context while requiring correct cache boundaries. Without it, unnecessary repeated context processing raises token cost and time to first response. A concrete acceptance check is: Usage metrics show cache reads or reduced eligible prefix processing without mixing user-specific data.
Incorrect Answers
B:Use clear task instructions and targeted examples when the required schema or decision boundary is non-obvious. This does not repair the current workflow because caching can reduce repeated processing of identical eligible context while requiring correct cache boundaries. The targeted change is apply supported prompt caching or reuse patterns for stable prefix content and monitor cache hits.
C:Track input/output tokens and model, cache and batch usage per operation with privacy-safe reporting. This does not repair the current workflow because caching can reduce repeated processing of identical eligible context while requiring correct cache boundaries. The targeted change is apply supported prompt caching or reuse patterns for stable prefix content and monitor cache hits.
D:Use asynchronous SDK or REST calls with bounded concurrency and correct cleanup of pending tasks. This does not repair the current workflow because caching can reduce repeated processing of identical eligible context while requiring correct cache boundaries. The targeted change is apply supported prompt caching or reuse patterns for stable prefix content and monitor cache hits.
Question 338
To address the situation: An application uses its most capable model for every trivial intent classification and exceeds budget. The team implements: "Benchmark suitable Claude model tiers for quality, latency and price on the application's actual tasks". Which evidence BEST demonstrates success?
- A load test shows bounded parallelism, proper cancellation and stable latency under normal traffic.
- A representative evaluation records quality, p95 latency and cost before selecting a model.
- Evaluation shows difficult cases are escalated and routine tasks meet cost targets.
- A benchmark shows required accuracy within agreed latency and token budgets for each task class.
Explanation
Correct Answer
B:A representative evaluation records quality, p95 latency and cost before selecting a model. This directly tests the outcome of benchmark suitable Claude model tiers for quality, latency and price on the application's actual tasks. in the described case: An application uses its most capable model for every trivial intent classification and exceeds budget. The underlying principle is that opus, Sonnet and Haiku are positioned for different capability/speed/cost trade-offs that require measurement. If the change is ineffective, model selection by name alone can overpay or underperform on important workflows. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:A load test shows bounded parallelism, proper cancellation and stable latency under normal traffic. This outcome would validate use asynchronous SDK or REST calls with bounded concurrency and correct cleanup of pending tasks, not the requested intervention. The required test result is A representative evaluation records quality, p95 latency and cost before selecting a model.
C: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 A representative evaluation records quality, p95 latency and cost before selecting a model.
D:A benchmark shows required accuracy within agreed latency and token budgets for each task class. This outcome would validate choose appropriate thinking or effort settings based on task complexity, latency and budget constraints, not the requested intervention. The required test result is A representative evaluation records quality, p95 latency and cost before selecting a model.
Question 339
This engineering control is missing: "Use a deterministic workflow for fixed tasks and reserve autonomous agent loops for genuinely dynamic decisions". The reported condition is: A billing reconciliation follows a fixed approval sequence but engineers propose an unconstrained autonomous agent. What is the most direct failure risk?
- A prompt-injected suggestion could cross a trust boundary if the app executes it without validation.
- Runaway iterations can consume tokens, spam APIs and repeat harmful or useless operations.
- An unnecessary agent can introduce variable actions, cost and approval gaps into a fixed business process.
- Tool failures can leave an agent stuck, silently incomplete or repeatedly calling services.
Explanation
Correct Answer
C:An unnecessary agent can introduce variable actions, cost and approval gaps into a fixed business process. This follows from the reported condition: A billing reconciliation follows a fixed approval sequence but engineers propose an unconstrained autonomous agent. The reason is that workflows provide predictable control flow while autonomous agents trade flexibility for added uncertainty and oversight needs. The appropriate mitigation is: Use a deterministic workflow for fixed tasks and reserve autonomous agent loops for genuinely dynamic decisions. Evidence of success would be: The workflow produces consistent step traces and enforces the required approval order on representative invoices.
Incorrect Answers
A:A prompt-injected suggestion could cross a trust boundary if the app executes it without validation. That exposure calls for keep tool execution and approval policy in deterministic application code rather than relying on model self-restraint. The scenario here instead risks an unnecessary agent can introduce variable actions, cost and approval gaps into a fixed business process.
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 an unnecessary agent can introduce variable actions, cost and approval gaps into a fixed business process.
D:Tool failures can leave an agent stuck, silently incomplete or repeatedly calling services. That exposure calls for implement explicit tool-loop controls, errors, iteration limits and observable state in the agent harness. The scenario here instead risks an unnecessary agent can introduce variable actions, cost and approval gaps into a fixed business process.
Question 340
A developer encounters this situation: A TypeScript API server blocks an event loop while waiting for multiple Claude calls. What is the MOST appropriate technical response?
- Use task difficulty and measured confidence to route work to an appropriate model or escalation path.
- Track input/output tokens and model, cache and batch usage per operation with privacy-safe reporting.
- Configure authenticated requests, secret rotation and clear failure handling in the SDK/client.
- Use asynchronous SDK or REST calls with bounded concurrency and correct cleanup of pending tasks.
Explanation
Correct Answer
D:Use asynchronous SDK or REST calls with bounded concurrency and correct cleanup of pending tasks. This directly addresses the situation: A TypeScript API server blocks an event loop while waiting for multiple Claude calls. The technical reason is that nonblocking request handling improves throughput only when concurrency remains controlled and resource-safe. Without it, serial calls increase latency, while unconstrained fan-out exhausts limits and connections. A concrete acceptance check is: A load test shows bounded parallelism, proper cancellation and stable latency under normal traffic.
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 nonblocking request handling improves throughput only when concurrency remains controlled and resource-safe. The targeted change is use asynchronous SDK or REST calls with bounded concurrency and correct cleanup of pending tasks.
B:Track input/output tokens and model, cache and batch usage per operation with privacy-safe reporting. This does not repair the current workflow because nonblocking request handling improves throughput only when concurrency remains controlled and resource-safe. The targeted change is use asynchronous SDK or REST calls with bounded concurrency and correct cleanup of pending tasks.
C:Configure authenticated requests, secret rotation and clear failure handling in the SDK/client. This does not repair the current workflow because nonblocking request handling improves throughput only when concurrency remains controlled and resource-safe. The targeted change is use asynchronous SDK or REST calls with bounded concurrency and correct cleanup of pending tasks.