Claude Certified Developer - Foundations CCDV-F Practice Test 35
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.
Question 341
In this situation: A service trusts network success and never checks the status code or body shape returned by a dependency. The developer proposes: Validate HTTP status, content types and JSON response contracts before processing API results. Which principle BEST justifies the approach?
- REST clients must handle status codes and payload structure as separate error conditions.
- API integration safety depends on regression tests for behavior at service boundaries.
- RAG effectiveness depends on relevant evidence and an explicit boundary between retrieved facts and model inference.
- Configuration must be controlled independently of application source and securely varied by environment.
Explanation
Correct Answer
A:REST clients must handle status codes and payload structure as separate error conditions. In the given situation, a service trusts network success and never checks the status code or body shape returned by a dependency. That consideration supports the measure: Validate HTTP status, content types and JSON response contracts before processing API results. Ignoring it creates this exposure: Transient errors can be misinterpreted as valid model data or corrupt application state. Verify the implementation by checking: Negative HTTP fixtures produce explicit typed failures and valid JSON remains parseable.
Incorrect Answers
B:API integration safety depends on regression tests for behavior at service boundaries. This principle relates to use version control, code review and automated contract plus failure-mode tests for integration changes. The observed failure instead depends on REST clients must handle status codes and payload structure as separate error conditions. The appropriate choice is REST clients must handle status codes and payload structure as separate error conditions.
C: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 REST clients must handle status codes and payload structure as separate error conditions. The appropriate choice is REST clients must handle status codes and payload structure as separate error conditions.
D: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 REST clients must handle status codes and payload structure as separate error conditions. The appropriate choice is REST clients must handle status codes and payload structure as separate error conditions.
Question 342
In this situation: A product team ships an assistant but has no safe behavior for outages or overloaded model calls. The developer proposes: Design timeouts, bounded retry, graceful degradation and explicit failure responses for Claude-dependent features. Which principle BEST justifies the approach?
- RAG effectiveness depends on relevant evidence and an explicit boundary between retrieved facts and model inference.
- LLM integrations are distributed systems and must expose genuine downstream failure states.
- Application-facing output must be parsed and validated against a contract, not inferred from unconstrained prose.
- Conversation continuity depends on the application supplying relevant history or state in each request.
Explanation
Correct Answer
B:LLM integrations are distributed systems and must expose genuine downstream failure states. In the given situation, a product team ships an assistant but has no safe behavior for outages or overloaded model calls. 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: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 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:Application-facing output must be parsed and validated against a contract, not inferred from unconstrained prose. This principle relates to require structured validated outputs or constrained tool schemas before business-side execution. 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.
D:Conversation continuity depends on the application supplying relevant history or state in each request. This principle relates to persist and re-supply required prior message context explicitly according to the stateless Messages API pattern. 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 343
A developer encounters this situation: A specialist subagent is given privileged billing history that its task does not require. What is the MOST appropriate technical response?
- Separate trusted instruction layers from untrusted task data, and mark data boundaries explicitly.
- Give clear role, task, constraints and explicit output contract with consistent examples where helpful.
- Isolate contexts by user and task, passing only necessary evidence to each subagent.
- Prune low-value tool outputs and preserve a compact summary of goals, decisions and remaining work.
Explanation
Correct Answer
C:Isolate contexts by user and task, passing only necessary evidence to each subagent. This directly addresses the situation: A specialist subagent is given privileged billing history that its task does not require. The technical reason is that context boundaries reduce distraction and unauthorized exposure between independent workstreams. Without it, unrelated user data may contaminate answers or leak into another task. A concrete acceptance check is: Cross-user and subagent tests confirm no unauthorized context appears in model input or outputs.
Incorrect Answers
A:Separate trusted instruction layers from untrusted task data, and mark data boundaries explicitly. This does not repair the current workflow because context boundaries reduce distraction and unauthorized exposure between independent workstreams. The targeted change is isolate contexts by user and task, passing only necessary evidence to each subagent.
B:Give clear role, task, constraints and explicit output contract with consistent examples where helpful. This does not repair the current workflow because context boundaries reduce distraction and unauthorized exposure between independent workstreams. The targeted change is isolate contexts by user and task, passing only necessary evidence to each subagent.
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 context boundaries reduce distraction and unauthorized exposure between independent workstreams. The targeted change is isolate contexts by user and task, passing only necessary evidence to each subagent.
Question 344
This engineering control is missing: "Review Claude Code changes as small diffs and run targeted tests before accepting or committing them". The reported condition is: A coding assistant opens a large pull request that mixes unrelated refactors and security fixes. What is the most direct failure risk?
- A user may retrieve another tenant's confidential content through search or tool access.
- A generated command could delete files, leak secrets or deploy unapproved code.
- The assistant may change protected files or ignore required tests during code generation.
- Unreviewed broad changes can hide regressions or introduce unsafe dependencies.
Explanation
Correct Answer
D:Unreviewed broad changes can hide regressions or introduce unsafe dependencies. This follows from the reported condition: A coding assistant opens a large pull request that mixes unrelated refactors and security fixes. The reason is that aI-produced patches remain software changes requiring human or automated code-quality validation. The appropriate mitigation is: Review Claude Code changes as small diffs and run targeted tests before accepting or committing them. Evidence of success would be: A bounded patch passes tests and review without unrelated file modifications.
Incorrect Answers
A:A user may retrieve another tenant's confidential content through search or tool access. That exposure calls for enforce tenant identity, authorization and retrieval filtering before data is supplied to the model. The scenario here instead risks unreviewed broad changes can hide regressions or introduce unsafe dependencies.
B:A generated command could delete files, leak secrets or deploy unapproved code. That exposure calls for use Claude Code permissions and supported pre-tool hooks to enforce command approval and safety checks. The scenario here instead risks unreviewed broad changes can hide regressions or introduce unsafe dependencies.
C:The assistant may change protected files or ignore required tests during code generation. That exposure calls for maintain concise project-level Claude Code instructions and scope file/tool permissions to the repository policy. The scenario here instead risks unreviewed broad changes can hide regressions or introduce unsafe dependencies.
Question 345
This engineering control is missing: "Define precise tool descriptions and validated JSON argument schemas with narrow capabilities". The reported condition is: A Claude tool schema accepts arbitrary strings that a backend concatenates into a shell command. What is the most direct failure risk?
- Ambiguous or unchecked arguments can invoke an unintended operation or injection path.
- Clients may fail to connect or parse messages when transport framing is polluted.
- A compromised conversation could trigger unauthorized transactions or network access.
- The model may hallucinate completion or leak protected information in an error message.
Explanation
Correct Answer
A:Ambiguous or unchecked arguments can invoke an unintended operation or injection path. This follows from the reported condition: A Claude tool schema accepts arbitrary strings that a backend concatenates into a shell command. The reason is that a clear tool contract helps model selection while code-side validation keeps execution within allowed types. The appropriate mitigation is: Define precise tool descriptions and validated JSON argument schemas with narrow capabilities. Evidence of success would be: Invalid tool arguments fail safely and valid documented requests map to one expected operation.
Incorrect Answers
B:Clients may fail to connect or parse messages when transport framing is polluted. That exposure calls for choose and correctly configure supported MCP transports and keep protocol messages separate from diagnostic logs. The scenario here instead risks ambiguous or unchecked arguments can invoke an unintended operation or injection path.
C:A compromised conversation could trigger unauthorized transactions or network access. That exposure calls for authorize tool name, arguments and caller identity before performing any side effect. The scenario here instead risks ambiguous or unchecked arguments can invoke an unintended operation or injection path.
D: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 ambiguous or unchecked arguments can invoke an unintended operation or injection path.
Question 346
To address the situation: A routing system never escalates difficult or uncertain tasks to a more capable model. The team implements: "Use task difficulty and measured confidence to route work to an appropriate model or escalation path". Which evidence BEST demonstrates success?
- 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.
- Repeated fixture runs satisfy the same structured behavioral contract despite wording differences.
- An upgrade canary passes contract and task evaluations with an available rollback path.
Explanation
Correct Answer
B:Evaluation shows difficult cases are escalated and routine tasks meet cost targets. This directly tests the outcome of use task difficulty and measured confidence to route work to an appropriate model or escalation path. in the described case: A routing system never escalates difficult or uncertain tasks to a more capable model. The underlying principle is that different requests require different capability budgets; selective routing balances efficiency and quality. If the change is ineffective, hard tasks may fail under an underpowered model while easy tasks waste premium capacity. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:A representative evaluation records quality, p95 latency and cost before selecting a model. This outcome would validate benchmark suitable Claude model tiers for quality, latency and price on the application's actual tasks, not the requested intervention. The required test result is evaluation shows difficult cases are escalated and routine tasks meet cost targets.
C:Repeated fixture runs satisfy the same structured behavioral contract despite wording differences. This outcome would validate evaluate stochastic model output with repeated trials and constrain tasks through validation and clear requirements, not the requested intervention. The required test result is evaluation shows difficult cases are escalated and routine tasks meet cost targets.
D:An upgrade canary passes contract and task evaluations with an available rollback path. This outcome would validate pin or deliberately version model selections and run regression tests during model changes, not the requested intervention. The required test result is evaluation shows difficult cases are escalated and routine tasks meet cost targets.
Question 347
This engineering control is missing: "Enforce tenant identity, authorization and retrieval filtering before data is supplied to the model". The reported condition is: A workspace assistant uses a shared tool token to fetch records across organizations. What is the most direct failure risk?
- Users may act on invented or outdated instructions when retrieval provenance is missing.
- A hostile document may persuade the model to reveal policy or call disallowed tools.
- A user may retrieve another tenant's confidential content through search or tool access.
- Requests can be rejected or interpreted differently when fields are malformed.
Explanation
Correct Answer
C:A user may retrieve another tenant's confidential content through search or tool access. This follows from the reported condition: A workspace assistant uses a shared tool token to fetch records across organizations. The reason is that data separation belongs in storage and tool access controls rather than relying on prompt instructions. The appropriate mitigation is: Enforce tenant identity, authorization and retrieval filtering before data is supplied to the model. Evidence of success would be: Cross-tenant negative tests are denied before documents enter model context.
Incorrect Answers
A:Users may act on invented or outdated instructions when retrieval provenance is missing. That exposure calls for build retrieval with provenance-aware citations and grounded-answer validation before presenting claims. The scenario here instead risks A user may retrieve another tenant's confidential content through search or tool access.
B:A hostile document may persuade the model to reveal policy or call disallowed tools. That exposure calls for separate trusted system/developer instructions from untrusted input and validate any requested tool execution. The scenario here instead risks A user may retrieve another tenant's confidential content through search or tool access.
D:Requests can be rejected or interpreted differently when fields are malformed. That exposure calls for use documented Messages API request fields and supported client SDK methods with schema validation. The scenario here instead risks A user may retrieve another tenant's confidential content through search or tool access.
Question 348
To address the situation: A live assistant receives incremental tokens but its frontend buffers all events until the request ends. The team implements: "Use supported streaming events with explicit lifecycle, partial-render and finalization handling". Which evidence BEST demonstrates success?
- Recorded event fixtures reconstruct the same final message as the nonstreaming response.
- Invalid payloads are rejected without side effects and valid schema-conformant commands execute once.
- A held-out query returns a supported answer citing only documents actually retrieved for that query.
- A streaming test shows progressive output and a complete, properly finalized message.
Explanation
Correct Answer
D:A streaming test shows progressive output and a complete, properly finalized message. This directly tests the outcome of use supported streaming events with explicit lifecycle, partial-render and finalization handling. in the described case: A live assistant receives incremental tokens but its frontend buffers all events until the request ends. The underlying principle is that streaming can improve perceived latency only if the application consumes and renders events correctly. If the change is ineffective, users may experience unnecessary blank screens or partial/inconsistent final responses. A configuration checkbox alone is insufficient proof.
Incorrect Answers
A:Recorded event fixtures reconstruct the same final message as the nonstreaming response. This outcome would validate process the documented streaming event sequence by event type and finalize only on completion, not the requested intervention. The required test result is A streaming test shows progressive output and a complete, properly finalized message.
B:Invalid payloads are rejected without side effects and valid schema-conformant commands execute once. This outcome would validate require structured validated outputs or constrained tool schemas before business-side execution, not the requested intervention. The required test result is A streaming test shows progressive output and a complete, properly finalized message.
C:A held-out query returns a supported answer citing only documents actually retrieved for that query. This outcome would validate build retrieval with provenance-aware citations and grounded-answer validation before presenting claims, not the requested intervention. The required test result is A streaming test shows progressive output and a complete, properly finalized message.
Question 349
This engineering control is missing: "Separate specialized subagents or phases and restrict high-impact actions behind explicit verified authorization". The reported condition is: A single agent is asked to search policy, transform data and approve payments with unrestricted tools. What is the most direct failure risk?
- A compromised research context could trigger unauthorized payment changes if tools share excessive authority.
- An unnecessary agent can introduce variable actions, cost and approval gaps into a fixed business process.
- 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.
Explanation
Correct Answer
A:A compromised research context could trigger unauthorized payment changes if tools share excessive authority. This follows from the reported condition: A single agent is asked to search policy, transform data and approve payments with unrestricted tools. The reason is that decomposing specialized responsibilities creates clear tool permissions and reduces cross-task privilege confusion. The appropriate mitigation is: Separate specialized subagents or phases and restrict high-impact actions behind explicit verified authorization. Evidence of success would be: An adversarial research input cannot invoke payment tools, while an authorized approval path still works.
Incorrect Answers
B:An unnecessary agent can introduce variable actions, cost and approval gaps into a fixed business process. That exposure calls for use a deterministic workflow for fixed tasks and reserve autonomous agent loops for genuinely dynamic decisions. The scenario here instead risks A compromised research context could trigger unauthorized payment changes if tools share excessive authority.
C: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 A compromised research context could trigger unauthorized payment changes if tools share excessive authority.
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 A compromised research context could trigger unauthorized payment changes if tools share excessive authority.
Question 350
A developer encounters this situation: A support application waits for a complete long response before showing the first sentence. What is the MOST appropriate technical response?
- Pin tested dependencies and use staged upgrades with regression tests and rollback.
- Use supported streaming events with explicit lifecycle, partial-render and finalization handling.
- Separate trusted system/developer instructions from untrusted input and validate any requested tool execution.
- Use idempotency keys or a verified deduplication record around side-effecting operations.
Explanation
Correct Answer
B:Use supported streaming events with explicit lifecycle, partial-render and finalization handling. This directly addresses the situation: A support application waits for a complete long response before showing the first sentence. The technical reason is that streaming can improve perceived latency only if the application consumes and renders events correctly. Without it, users may experience unnecessary blank screens or partial/inconsistent final responses. A concrete acceptance check is: A streaming test shows progressive output and a complete, properly finalized message.
Incorrect Answers
A:Pin tested dependencies and use staged upgrades with regression tests and rollback. This does not repair the current workflow because streaming can improve perceived latency only if the application consumes and renders events correctly. The targeted change is use supported streaming events with explicit lifecycle, partial-render and finalization handling.
C:Separate trusted system/developer instructions from untrusted input and validate any requested tool execution. This does not repair the current workflow because streaming can improve perceived latency only if the application consumes and renders events correctly. The targeted change is use supported streaming events with explicit lifecycle, partial-render and finalization handling.
D:Use idempotency keys or a verified deduplication record around side-effecting operations. This does not repair the current workflow because streaming can improve perceived latency only if the application consumes and renders events correctly. The targeted change is use supported streaming events with explicit lifecycle, partial-render and finalization handling.