Claude Certified Developer - Foundations CCDV-F Practice Test 15
Question 140
This engineering control is missing: "Bound agent iterations, tool budgets and stop conditions with a safe fallback or human escalation". The reported condition is: A chatbot loops through tools indefinitely when a web retrieval returns unhelpful content. What is the most direct failure risk?
- A compromised research context could trigger unauthorized payment changes if tools share excessive authority.
- Retries or duplicate delegations can create multiple charges or inconsistent records.
- Prompt injection in retrieved results may redirect the agent into unauthorized execution.
- Runaway iterations can consume tokens, spam APIs and repeat harmful or useless operations.
Explanation
Correct Answer
D:Runaway iterations can consume tokens, spam APIs and repeat harmful or useless operations. This follows from the reported condition: A chatbot loops through tools indefinitely when a web retrieval returns unhelpful content. The reason is that autonomous tool loops require termination criteria and explicit limits for predictable operational cost and safety. The appropriate mitigation is: Bound agent iterations, tool budgets and stop conditions with a safe fallback or human escalation. Evidence of success would be: A simulated unresolvable task stops within limits and creates a clear escalation record.
Incorrect Answers
A:A compromised research context could trigger unauthorized payment changes if tools share excessive authority. That exposure calls for separate specialized subagents or phases and restrict high-impact actions behind explicit verified authorization. The scenario here instead risks runaway iterations can consume tokens, spam APIs and repeat harmful or useless operations.
B:Retries or duplicate delegations can create multiple charges or inconsistent records. That exposure calls for add idempotency and completed-work tracking to subagent/tool handoffs. The scenario here instead risks runaway iterations can consume tokens, spam APIs and repeat harmful or useless operations.
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 runaway iterations can consume tokens, spam APIs and repeat harmful or useless operations.
Question 141
In this situation: A Python client serializes network requests even though they are independent and I/O-bound. The developer proposes: Use asynchronous SDK or REST calls with bounded concurrency and correct cleanup of pending tasks. Which principle BEST justifies the approach?
- Nonblocking request handling improves throughput only when concurrency remains controlled and resource-safe.
- Connection models should match directional and state requirements rather than be chosen for novelty.
- Claude API access depends on correctly scoped credentials and explicit authentication failures.
- Caching can reduce repeated processing of identical eligible context while requiring correct cache boundaries.
Explanation
Correct Answer
A:Nonblocking request handling improves throughput only when concurrency remains controlled and resource-safe. In the given situation, a Python client serializes network requests even though they are independent and I/O-bound. That consideration supports the measure: Use asynchronous SDK or REST calls with bounded concurrency and correct cleanup of pending tasks. Ignoring it creates this exposure: Serial calls increase latency, while unconstrained fan-out exhausts limits and connections. Verify the implementation by checking: A load test shows bounded parallelism, proper cancellation and stable latency under normal traffic.
Incorrect Answers
B:Connection models should match directional and state requirements rather than be chosen for novelty. This principle relates to select request/response HTTP, streaming, or persistent connections based on the real interaction pattern. The observed failure instead depends on nonblocking request handling improves throughput only when concurrency remains controlled and resource-safe. The appropriate choice is nonblocking request handling improves throughput only when concurrency remains controlled and resource-safe.
C:Claude API access depends on correctly scoped credentials and explicit authentication failures. This principle relates to configure authenticated requests, secret rotation and clear failure handling in the SDK/client. The observed failure instead depends on nonblocking request handling improves throughput only when concurrency remains controlled and resource-safe. The appropriate choice is nonblocking request handling improves throughput only when concurrency remains controlled and resource-safe.
D:Caching can reduce repeated processing of identical eligible context while requiring correct cache boundaries. This principle relates to apply supported prompt caching or reuse patterns for stable prefix content and monitor cache hits. The observed failure instead depends on nonblocking request handling improves throughput only when concurrency remains controlled and resource-safe. The appropriate choice is nonblocking request handling improves throughput only when concurrency remains controlled and resource-safe.
Question 142
This engineering control is missing: "Use agent or Claude Code hooks for deterministic validations and approvals at supported execution boundaries". The reported condition is: A Claude Agent SDK application has hooks but required audit and approval logic lives only in prompt text. What is the most direct failure risk?
- A mismatched hosting choice can violate data boundaries or leave critical execution controls unavailable.
- Safety requirements expressed only as prose can be ignored or reinterpreted by the model.
- Tool failures can leave an agent stuck, silently incomplete or repeatedly calling services.
- Runaway iterations can consume tokens, spam APIs and repeat harmful or useless operations.
Explanation
Correct Answer
B:Safety requirements expressed only as prose can be ignored or reinterpreted by the model. This follows from the reported condition: A Claude Agent SDK application has hooks but required audit and approval logic lives only in prompt text. The reason is that hooks can apply nonprobabilistic policy checks around tool use when installed in the correct execution lifecycle. The appropriate mitigation is: Use agent or Claude Code hooks for deterministic validations and approvals at supported execution boundaries. Evidence of success would be: An intentional risky tool call is blocked by a hook while authorized benign actions continue.
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 safety requirements expressed only as prose can be ignored or reinterpreted by the model.
C: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 safety requirements expressed only as prose can be ignored or reinterpreted by the model.
D: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 safety requirements expressed only as prose can be ignored or reinterpreted by the model.
Question 143
In this situation: A high-stakes architecture review uses a speed-optimized model without testing whether quality meets requirements. The developer proposes: Benchmark suitable Claude model tiers for quality, latency and price on the application's actual tasks. Which principle BEST justifies the approach?
- Generative models can vary their output even for similar inputs; application correctness needs explicit checks.
- Model updates can alter behavior, latency and tool use; compatibility must be tested at release time.
- Opus, Sonnet and Haiku are positioned for different capability/speed/cost trade-offs that require measurement.
- Different requests require different capability budgets; selective routing balances efficiency and quality.
Explanation
Correct Answer
C:Opus, Sonnet and Haiku are positioned for different capability/speed/cost trade-offs that require measurement. In the given situation, a high-stakes architecture review uses a speed-optimized model without testing whether quality meets requirements. That consideration supports the measure: Benchmark suitable Claude model tiers for quality, latency and price on the application's actual tasks. Ignoring it creates this exposure: Model selection by name alone can overpay or underperform on important workflows. Verify the implementation by checking: A representative evaluation records quality, p95 latency and cost before selecting a model.
Incorrect Answers
A:Generative models can vary their output even for similar inputs; application correctness needs explicit checks. This principle relates to evaluate stochastic model output with repeated trials and constrain tasks through validation and clear requirements. The observed failure instead depends on opus, Sonnet and Haiku are positioned for different capability/speed/cost trade-offs that require measurement. The appropriate choice is opus, Sonnet and Haiku are positioned for different capability/speed/cost trade-offs that require measurement.
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 opus, Sonnet and Haiku are positioned for different capability/speed/cost trade-offs that require measurement. The appropriate choice is opus, Sonnet and Haiku are positioned for different capability/speed/cost trade-offs that require measurement.
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 opus, Sonnet and Haiku are positioned for different capability/speed/cost trade-offs that require measurement. The appropriate choice is opus, Sonnet and Haiku are positioned for different capability/speed/cost trade-offs that require measurement.
Question 144
A developer encounters this situation: A bidirectional event stream needs persistent state but is implemented with repeated manual HTTP polling. What is the MOST appropriate technical response?
- Use asynchronous SDK or REST calls with bounded concurrency and correct cleanup of pending tasks.
- Use clear task instructions and targeted examples when the required schema or decision boundary is non-obvious.
- Understand the SDK as a wrapper around documented API operations and preserve typed errors/usage metadata.
- Select request/response HTTP, streaming, or persistent connections based on the real interaction pattern.
Explanation
Correct Answer
D:Select request/response HTTP, streaming, or persistent connections based on the real interaction pattern. This directly addresses the situation: A bidirectional event stream needs persistent state but is implemented with repeated manual HTTP polling. The technical reason is that connection models should match directional and state requirements rather than be chosen for novelty. Without it, unnecessary persistent sockets add complexity, while polling can waste resources and lose events. A concrete acceptance check is: A representative interaction meets reliability/latency targets with no orphaned connection state.
Incorrect Answers
A:Use asynchronous SDK or REST calls with bounded concurrency and correct cleanup of pending tasks. This does not repair the current workflow because connection models should match directional and state requirements rather than be chosen for novelty. The targeted change is select request/response HTTP, streaming, or persistent connections based on the real interaction pattern.
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 connection models should match directional and state requirements rather than be chosen for novelty. The targeted change is select request/response HTTP, streaming, or persistent connections based on the real interaction pattern.
C:Understand the SDK as a wrapper around documented API operations and preserve typed errors/usage metadata. This does not repair the current workflow because connection models should match directional and state requirements rather than be chosen for novelty. The targeted change is select request/response HTTP, streaming, or persistent connections based on the real interaction pattern.
Question 145
To address the situation: A development agent runs a destructive repository operation without a deterministic pre-execution check. The team implements: "Use agent or Claude Code hooks for deterministic validations and approvals at supported execution boundaries". Which evidence BEST demonstrates success?
- An intentional risky tool call is blocked by a hook while authorized benign actions continue.
- A fault-injection run terminates predictably and records the failed tool, recovery and final state.
- A malicious tool-result fixture cannot gain permissions or override the declared control policy.
- The workflow produces consistent step traces and enforces the required approval order on representative invoices.
Explanation
Correct Answer
A:An intentional risky tool call is blocked by a hook while authorized benign actions continue. This directly tests the outcome of use agent or Claude Code hooks for deterministic validations and approvals at supported execution boundaries. in the described case: A development agent runs a destructive repository operation without a deterministic pre-execution check. The underlying principle is that hooks can apply nonprobabilistic policy checks around tool use when installed in the correct execution lifecycle. If the change is ineffective, safety requirements expressed only as prose can be ignored or reinterpreted by the model. 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 an intentional risky tool call is blocked by a hook while authorized benign actions continue.
C: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 an intentional risky tool call is blocked by a hook while authorized benign actions continue.
D: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 an intentional risky tool call is blocked by a hook while authorized benign actions continue.
Question 146
To address the situation: A customer agent sends a tool result containing raw stack traces and secrets directly back to the model. The team implements: "Return typed, bounded, sanitized tool results with explicit errors and retry metadata". Which evidence BEST demonstrates success?
- Invalid tool arguments fail safely and valid documented requests map to one expected operation.
- An injected API error yields a truthful sanitized failure and no false success statement.
- Unknown or unauthorized calls are denied even when the model proposes them.
- Cross-tenant negative requests are denied while appropriately scoped calls succeed.
Explanation
Correct Answer
B:An injected API error yields a truthful sanitized failure and no false success statement. This directly tests the outcome of return typed, bounded, sanitized tool results with explicit errors and retry metadata. in the described case: A customer agent sends a tool result containing raw stack traces and secrets directly back to the model. The underlying principle is that tool outputs must be accurate and safe observations; they are not trusted instructions or silent successes. If the change is ineffective, the model may hallucinate completion or leak protected information in an error message. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:Invalid tool arguments fail safely and valid documented requests map to one expected operation. This outcome would validate define precise tool descriptions and validated JSON argument schemas with narrow capabilities, not the requested intervention. The required test result is an injected API error yields a truthful sanitized failure and no false success statement.
C:Unknown or unauthorized calls are denied even when the model proposes them. This outcome would validate authorize tool name, arguments and caller identity before performing any side effect, not the requested intervention. The required test result is an injected API error yields a truthful sanitized failure and no false success statement.
D:Cross-tenant negative requests are denied while appropriately scoped calls succeed. This outcome would validate apply authentication, resource authorization and request validation to each MCP tool/resource operation, not the requested intervention. The required test result is an injected API error yields a truthful sanitized failure and no false success statement.
Question 147
To address the situation: A multi-tenant chat assistant logs raw prompts containing personal data and API keys. The team implements: "Minimize sensitive input and redact, restrict and retain logs according to approved privacy requirements". Which evidence BEST demonstrates success?
- A harmless command passes, a dangerous simulated action is blocked, and the event is logged.
- Red-team fixtures cannot cross tool authorization boundaries or extract secrets.
- Log sampling finds no secrets or unauthorized PII and retention tests remove expired records.
- Secret scanning finds no embedded keys, rotated credentials work, and revoked credentials fail.
Explanation
Correct Answer
C:Log sampling finds no secrets or unauthorized PII and retention tests remove expired records. This directly tests the outcome of minimize sensitive input and redact, restrict and retain logs according to approved privacy requirements. in the described case: A multi-tenant chat assistant logs raw prompts containing personal data and API keys. The underlying principle is that aI application privacy depends on data handling throughout ingestion, prompting, logging and retention. If the change is ineffective, personal data or credentials may leak through telemetry or unnecessary persistence. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:A harmless command passes, a dangerous simulated action is blocked, and the event is logged. This outcome would validate add supported pre-tool hooks or policy checks that deny dangerous commands and preserve audit evidence, not the requested intervention. The required test result is log sampling finds no secrets or unauthorized PII and retention tests remove expired records.
B:Red-team fixtures cannot cross tool authorization boundaries or extract secrets. This outcome would validate treat retrieved and user-supplied content as untrusted data and enforce tool permissions separately, not the requested intervention. The required test result is log sampling finds no secrets or unauthorized PII and retention tests remove expired records.
D: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 log sampling finds no secrets or unauthorized PII and retention tests remove expired records.
Question 148
In this situation: A cross-functional incident bot chooses tools using only free-form model text without defined tool schemas. The developer proposes: Keep tool execution and approval policy in deterministic application code rather than relying on model self-restraint. Which principle BEST justifies the approach?
- Workflows provide predictable control flow while autonomous agents trade flexibility for added uncertainty and oversight needs.
- Decomposing specialized responsibilities creates clear tool permissions and reduces cross-task privilege confusion.
- 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
D:The agent's model output is a proposal; the hosting system must validate and enforce authorized actions. In the given situation, a cross-functional incident bot chooses tools using only free-form model text without defined tool schemas. That consideration supports the measure: Keep tool execution and approval policy in deterministic application code rather than relying on model self-restraint. Ignoring it creates this exposure: A prompt-injected suggestion could cross a trust boundary if the app executes it without validation. Verify the implementation by checking: An unapproved tool request is rejected by code and logged even when the model asks to run it.
Incorrect Answers
A:Workflows provide predictable control flow while autonomous agents trade flexibility for added uncertainty and oversight needs. This principle relates to use a deterministic workflow for fixed tasks and reserve autonomous agent loops for genuinely dynamic decisions. The observed failure instead depends on the agent's model output is a proposal; the hosting system must validate and enforce authorized actions. The appropriate choice is the agent's model output is a proposal; the hosting system must validate and enforce authorized actions.
B:Decomposing specialized responsibilities creates clear tool permissions and reduces cross-task privilege confusion. This principle relates to separate specialized subagents or phases and restrict high-impact actions behind explicit verified authorization. The observed failure instead depends on the agent's model output is a proposal; the hosting system must validate and enforce authorized actions. The appropriate choice is the agent's model output is a proposal; the hosting system must validate and enforce authorized actions.
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 the agent's model output is a proposal; the hosting system must validate and enforce authorized actions. The appropriate choice is the agent's model output is a proposal; the hosting system must validate and enforce authorized actions.
Question 149
This engineering control is missing: "Log bounded structured request IDs, latency and failure categories while redacting secrets and sensitive content". The reported condition is: A service logs entire Claude API requests including confidential customer text and bearer keys. What is the most direct failure risk?
- Credentials or personal data can be exposed in log storage, or incidents can be impossible to trace.
- 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.
- Tool-dependent tasks may end incomplete or return an unfulfilled action description.
Explanation
Correct Answer
A:Credentials or personal data can be exposed in log storage, or incidents can be impossible to trace. This follows from the reported condition: A service logs entire Claude API requests including confidential customer text and bearer keys. The reason is that observability must preserve operational diagnostics without turning logs into a data-leak channel. The appropriate mitigation is: Log bounded structured request IDs, latency and failure categories while redacting secrets and sensitive content. Evidence of success would be: Sample traces correlate request IDs and error types without including keys or protected prompt content.
Incorrect Answers
B: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 credentials or personal data can be exposed in log storage, or incidents can be impossible to trace.
C:Unreviewed configuration drift can expose keys or create inconsistent model behavior. That exposure calls for centralize versioned configuration, protected secrets and environment-specific deployment settings. The scenario here instead risks credentials or personal data can be exposed in log storage, or incidents can be impossible to trace.
D:Tool-dependent tasks may end incomplete or return an unfulfilled action description. That exposure calls for inspect stop reasons and complete the documented tool-use and tool-result exchange before finalizing output. The scenario here instead risks credentials or personal data can be exposed in log storage, or incidents can be impossible to trace.
Question 150
To address the situation: A specialist subagent is given privileged billing history that its task does not require. The team implements: "Isolate contexts by user and task, passing only necessary evidence to each subagent". Which evidence BEST demonstrates success?
- Invalid values are rejected before side effects and valid cases pass typed parsing.
- Cross-user and subagent tests confirm no unauthorized context appears in model input or outputs.
- A resumed task honors the documented checkpoint and does not rerun completed side effects.
- A long-run evaluation retains the required constraints while remaining within the context budget.
Explanation
Correct Answer
B:Cross-user and subagent tests confirm no unauthorized context appears in model input or outputs. This directly tests the outcome of isolate contexts by user and task, passing only necessary evidence to each subagent. in the described case: A specialist subagent is given privileged billing history that its task does not require. The underlying principle is that context boundaries reduce distraction and unauthorized exposure between independent workstreams. If the change is ineffective, unrelated user data may contaminate answers or leak into another task. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:Invalid values are rejected before side effects and valid cases pass typed parsing. This outcome would validate validate structured model outputs against strict schema and business rules before use, not the requested intervention. The required test result is cross-user and subagent tests confirm no unauthorized context appears in model input or outputs.
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 cross-user and subagent tests confirm no unauthorized context appears in model input or outputs.
D: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 cross-user and subagent tests confirm no unauthorized context appears in model input or outputs.