Anthropic CCDV-F (Claude Certified Developer - Foundations) Practice Test 5

Question 40

In a customer platform project, acceptance test A checks whether a component can avoid parsing safety refusals as valid JSON business records. Acceptance test B checks whether a different component can preserve a customer's follow-up reference to an earlier case number. Which plan satisfies both tests?

  1. First component: Handle a refusal stop_reason safely. Second component: Handle the max_tokens stop_reason.
  2. First component: Handle a refusal stop_reason safely. Second component: Supply previous turns on a new API request.
  3. First component: Supply a tool definition with input schema. Second component: Supply previous turns on a new API request.
  4. First component: Handle the max_tokens stop_reason. Second component: Supply a tool definition with input schema.

Explanation

Correct Answer

B:

The first proposal fits its assigned role because a refusal is a deliberate non-completion path that requires a defined application response, while the second proposal fits its assigned role because stateless requests need relevant history passed back in the messages sequence; their respective acceptance criteria are to avoid parsing safety refusals as valid JSON business records and to preserve a customer's follow-up reference to an earlier case number.

Incorrect Answers

A:

The first proposal fits its assigned role because a refusal is a deliberate non-completion path that requires a defined application response, while the second proposal serves the different purpose to recover a response that ended because its output budget was exhausted instead of the assigned second role because the finish reason identifies truncation, so a caller may need a continuation or a revised token budget; their respective acceptance criteria are to avoid parsing safety refusals as valid JSON business records and to preserve a customer's follow-up reference to an earlier case number.

C:

The first proposal serves the different purpose to let Claude request a read-only inventory lookup with typed arguments instead of the assigned first role because a declared tool name, description, and schema constrain the interface offered to the model, while the second proposal fits its assigned role because stateless requests need relevant history passed back in the messages sequence; their respective acceptance criteria are to avoid parsing safety refusals as valid JSON business records and to preserve a customer's follow-up reference to an earlier case number.

D:

The first proposal serves the different purpose to recover a response that ended because its output budget was exhausted instead of the assigned first role because the finish reason identifies truncation, so a caller may need a continuation or a revised token budget, while the second proposal serves the different purpose to let Claude request a read-only inventory lookup with typed arguments instead of the assigned second role because a declared tool name, description, and schema constrain the interface offered to the model; their respective acceptance criteria are to avoid parsing safety refusals as valid JSON business records and to preserve a customer's follow-up reference to an earlier case number.

Question 41

During acceptance testing for a backend integration service, one requirement is to prevent a Claude assistant from inventing account balances when it lacks current ledger data. What should the developer implement?

  1. Agree on output contracts with downstream systems
  2. Identify authoritative source systems
  3. Define failure and recovery objectives
  4. Set an explicit data residency constraint

Explanation

Correct Answer

B:

Source-of-truth mapping identifies which verified systems must supply facts and what freshness guarantees apply; this behavior directly supports the need to prevent a Claude assistant from inventing account balances when it lacks current ledger data. Model inference is not a substitute for a transactional database.

Incorrect Answers

A:

This approach serves the separate need to deliver model-generated records to a strict financial reporting API because typed fields and required identifiers enable validators and consumers to reject malformed results; it does not establish the outcome to prevent a Claude assistant from inventing account balances when it lacks current ledger data, and a free-form explanatory paragraph may be legible but not machine-consumable.

C:

For the alternate objective to keep a regulated triage service usable during an upstream API outage, availability, recovery time, and fallback behavior must be specified as measurable operational needs; the feature here must prevent a Claude assistant from inventing account balances when it lacks current ledger data, and a happy-path prototype misses behavior under dependency failures.

D:

Documented residency requirements inform cloud placement, logging, storage, and vendor selection; this applies to the different goal to ensure protected records are processed only in approved jurisdictions, not the requirement to prevent a Claude assistant from inventing account balances when it lacks current ledger data; a statement about answer quality does not control geographic data handling.

Question 42

A team maintaining an agent platform needs to build a coding agent that needs managed tool execution, sessions, and event handling. Which implementation most directly satisfies the requirement?

  1. Forward tool_result blocks with matching identifiers
  2. Use the Claude Agent SDK for an integrated tool-driven agent
  3. Use PreToolUse gating for dangerous operations
  4. Deploy agent workers close to controlled data sources
  5. Set a tool execution timeout

Explanation

Correct Answer

B:

The SDK provides agent-loop primitives and integrations that remove much of the custom harness work; this behavior directly supports the need to build a coding agent that needs managed tool execution, sessions, and event handling. It still requires explicit permissions, safety policies, and operational boundaries.

Incorrect Answers

A:

Results must reference the corresponding tool_use IDs and be included in the next conversation turn; this applies to the different goal to let Claude continue after a client tool returns a transaction status, not the requirement to build a coding agent that needs managed tool execution, sessions, and event handling; sending a human-readable summary without the tool correlation can break the protocol.

C:

A pre-execution hook can examine a proposed action and block it through a deterministic policy; the supported outcome is to reject a shell command that targets protected deployment secrets before execution, whereas this scenario requires the ability to build a coding agent that needs managed tool execution, sessions, and event handling; post-execution logging cannot prevent a destructive command already run.

D:

This approach serves the separate need to meet a requirement that proprietary repository contents remain within an approved execution environment because a self-hosted harness can enforce infrastructure, network, and retention controls for the surrounding tools; it does not establish the outcome to build a coding agent that needs managed tool execution, sessions, and event handling, and hosted orchestration does not automatically inherit a company's private-network policies.

E:

Deadlines bound latency and convert stalled calls into explicit recoverable failures; despite being useful when a service must prevent a slow external inventory service from blocking an agent indefinitely, it is not a solution to build a coding agent that needs managed tool execution, sessions, and event handling; a generous model output limit cannot constrain external network operations.

Question 43

During acceptance testing for an agent extensibility service, one requirement is to prevent malformed or unauthorized input from executing a customer data query. What should the developer implement?

  1. Capture tool latency and failure metrics
  2. Validate generated arguments in application code
  3. Add an approval boundary before sensitive writes
  4. Define narrow tool input schemas

Explanation

Correct Answer

B:

The executor must check types, ranges, identity, and scope independently of the model; this behavior directly supports the need to prevent malformed or unauthorized input from executing a customer data query. A valid tool schema by itself is not a complete authorization system.

Incorrect Answers

A:

Per-tool tracing separates external execution time from inference and highlights unhealthy dependencies; the supported outcome is to identify whether slow agent replies come from a payment gateway rather than the model, whereas this scenario requires the ability to prevent malformed or unauthorized input from executing a customer data query; aggregate response time alone cannot identify the responsible connector.

C:

Authorization by a user or operator can be enforced before the executor commits changes; despite being useful when a service must prevent a helpful assistant from issuing refunds automatically, it is not a solution to prevent malformed or unauthorized input from executing a customer data query; a note in the model's prompt is not a transaction approval.

D:

For the alternate objective to prevent ambiguous generated arguments from reaching an inventory service, typed parameter definitions constrain requests and enable strict validation before execution; the feature here must prevent malformed or unauthorized input from executing a customer data query, and a prose-only command description cannot validate required field types.

Question 44

A team maintaining an agent extensibility needs to make a coding or API assistant follow organization-wide conventions. Which implementation most directly satisfies the requirement?

  1. Use system or repository instructions for stable behavior
  2. Use hooks for enforceable safety checks
  3. Publish an MCP server for reusable integrations
  4. Use a deterministic workflow for fixed stages

Explanation

Correct Answer

A:

Instructions shape model behavior and task framing without executing external operations; this behavior directly supports the need to make a coding or API assistant follow organization-wide conventions. Descriptive rules do not replace programmatic validation or IAM.

Incorrect Answers

B:

Runtime interception can apply deterministic policies to proposed actions; the supported outcome is to deny destructive filesystem operations before a coding agent executes them, whereas this scenario requires the ability to make a coding or API assistant follow organization-wide conventions; a skill that asks for caution does not guarantee prevention.

C:

This approach serves the separate need to make one internal ticketing connector available to several agent clients because MCP standardizes tool and resource discovery across compatible applications; it does not establish the outcome to make a coding or API assistant follow organization-wide conventions, and duplicated per-client wrappers increase maintenance across a growing ecosystem.

D:

Explicit application control makes each transition testable and easier to audit; despite being useful when a service must automate the same classify-review-export path across predictable submissions, it is not a solution to make a coding or API assistant follow organization-wide conventions; an autonomous agent is unnecessary when the path is already fixed.

Question 45

An agent platform review requires two independent, explicitly defined outcomes: the first workstream must allow a research worker to read records without granting its coordinator's write privileges; a second must analyze several independent document sections concurrently and combine the results. Which TWO actions directly provide these capabilities? Choose TWO.

  1. Restrict each specialist's tool permissions
  2. Use a deterministic workflow
  3. Use an explicit completion condition and step budget
  4. Keep a single agent with a small tool set
  5. Use parallel fan-out and a reconciliation step

Explanation

Correct Answers

A:

Scoped tool capability prevents a delegated role from using authority unrelated to its assignment; this directly supports task 1 to allow a research worker to read records without granting its coordinator's write privileges, not the separate task or tasks to analyze several independent document sections concurrently and combine the results; role descriptions alone do not revoke credentials available to the process.

E:

Parallel tasks reduce critical-path latency when they do not depend on one another; a join step resolves conflicting findings; this directly supports task 2 to analyze several independent document sections concurrently and combine the results, not the separate task or tasks to allow a research worker to read records without granting its coordinator's write privileges; a serial chain makes independent stages wait without improving correctness.

Incorrect Answers

B:

A fixed pipeline keeps control flow in application code, making execution order reproducible and easy to audit; this implements the different outcome to execute an unchanged sequence of extraction, validation, and publishing steps rather than the required tasks to analyze several independent document sections concurrently and combine the results and to allow a research worker to read records without granting its coordinator's write privileges, and a free-running agent adds planning variability without helping when every step is already known, so it is not a direct solution to any of the assigned workstreams.

C:

A maximum iteration or cost budget plus a clear success criterion stops runaway tool loops; this implements the different outcome to bound the runtime of an agent that repeatedly searches without converging rather than the required tasks to analyze several independent document sections concurrently and combine the results and to allow a research worker to read records without granting its coordinator's write privileges, and merely asking the model to finish quickly does not enforce execution limits, so it is not a direct solution to any of the assigned workstreams.

D:

A single constrained executor simplifies state, authentication, logging, and latency where specialization adds little; this implements the different outcome to answer routine account questions without the overhead of orchestrating multiple agents rather than the required tasks to analyze several independent document sections concurrently and combine the results and to allow a research worker to read records without granting its coordinator's write privileges, and a multi-agent hierarchy is not a default requirement for tool use, so it is not a direct solution to any of the assigned workstreams.

Question 46

A developer is reviewing alternatives for an application security feature that must reduce automated abuse of a model-backed export or search capability. Which option is a defensible fit?

  1. Enforce least-privilege tool permissions
  2. Use layered checks for unsafe requests
  3. Rate-limit high-risk endpoints
  4. Require verified identity for privileged actions

Explanation

Correct Answer

C:

Per-identity quotas and anomaly monitoring make bulk misuse harder; this behavior directly supports the need to reduce automated abuse of a model-backed export or search capability. A single global throughput cap may still let one actor consume all capacity.

Incorrect Answers

A:

Restricted scopes and read-only interfaces limit impact if a tool request is manipulated; this applies to the different goal to let a support assistant read shipment status without issuing refunds, not the requirement to reduce automated abuse of a model-backed export or search capability; role language in the prompt cannot prevent an overprivileged API token from writing.

B:

When an application needs to detect harmful instructions at input, tool-call, and output boundaries, independent controls catch failures that a single prompt-level rule may miss; the current capability must instead reduce automated abuse of a model-backed export or search capability, while a system prompt alone is not a complete enforcement strategy.

D:

This approach serves the separate need to stop an unauthenticated user from invoking a dangerous account-management tool because authentication establishes the caller before authorization policies consider requested permissions; it does not establish the outcome to reduce automated abuse of a model-backed export or search capability, and asking the model to remember a user's name is not identity verification.

Question 47

A developer is reviewing alternatives for an agent platform feature that must maintain a valid transcript when the model requests multiple tools. Which option is a defensible fit?

  1. Forward tool_result blocks with matching identifiers
  2. Preserve assistant tool-use content in conversation history
  3. Implement a custom Messages API tool loop
  4. Use a durable session store

Explanation

Correct Answer

B:

The next request retains the assistant message containing tool_use blocks before providing their user-role tool_result blocks; this behavior directly supports the need to maintain a valid transcript when the model requests multiple tools. Dropping that assistant turn loses the linkage required for continuation.

Incorrect Answers

A:

This approach serves the separate need to let Claude continue after a client tool returns a transaction status because results must reference the corresponding tool_use IDs and be included in the next conversation turn; it does not establish the outcome to maintain a valid transcript when the model requests multiple tools, and sending a human-readable summary without the tool correlation can break the protocol.

C:

For the alternate objective to retain complete control over a small set of proprietary tool calls and their execution order, the application receives tool requests, validates inputs, executes authorized functions, and sends tool results back; the feature here must maintain a valid transcript when the model requests multiple tools, and the Messages API does not automatically execute arbitrary client tools.

D:

External persistence holds the conversation and workflow metadata needed to resume safely; this applies to the different goal to recover agent state when a container restarts during a lengthy customer case, not the requirement to maintain a valid transcript when the model requests multiple tools; process-local variables disappear with the worker.

Question 48

An architecture review of a document processing product lists two distinct outcomes: the first subsystem must prevent abandoned connectors from retaining access after an application is transferred, and a second subsystem must identify rising error rates and latency after launch. Which pair delivers these outcomes?

  1. First component: Assign an owner to every integration. Second component: Instrument production observability.
  2. First component: Assign an owner to every integration. Second component: Perform a threat review before go-live.
  3. First component: Set a maintenance and deprecation plan. Second component: Instrument production observability.
  4. First component: Perform a threat review before go-live. Second component: Set a maintenance and deprecation plan.

Explanation

Correct Answer

A:

The first proposal fits its assigned role because ownership enables rotation, monitoring, change approval, and retirement decisions, while the second proposal fits its assigned role because logs, metrics, traces, and alert thresholds reveal operational failures at the right layer; their respective acceptance criteria are to prevent abandoned connectors from retaining access after an application is transferred and to identify rising error rates and latency after launch.

Incorrect Answers

B:

The first proposal fits its assigned role because ownership enables rotation, monitoring, change approval, and retirement decisions, while the second proposal serves the different purpose to uncover prompt-injection paths through retrieved webpages and connected tools instead of the assigned second role because reviewing trust boundaries and permissions before deployment reveals attack routes unit tests may miss; their respective acceptance criteria are to prevent abandoned connectors from retaining access after an application is transferred and to identify rising error rates and latency after launch.

C:

The first proposal serves the different purpose to keep an integration functional when a pinned model version approaches retirement instead of the assigned first role because a dependency inventory and upgrade schedule create time for evaluation and migration, while the second proposal fits its assigned role because logs, metrics, traces, and alert thresholds reveal operational failures at the right layer; their respective acceptance criteria are to prevent abandoned connectors from retaining access after an application is transferred and to identify rising error rates and latency after launch.

D:

The first proposal serves the different purpose to uncover prompt-injection paths through retrieved webpages and connected tools instead of the assigned first role because reviewing trust boundaries and permissions before deployment reveals attack routes unit tests may miss, while the second proposal serves the different purpose to keep an integration functional when a pinned model version approaches retirement instead of the assigned second role because a dependency inventory and upgrade schedule create time for evaluation and migration; their respective acceptance criteria are to prevent abandoned connectors from retaining access after an application is transferred and to identify rising error rates and latency after launch.

Question 49

During acceptance testing for a prompt engineering service, one requirement is to avoid accepting malformed generated objects because they resemble JSON to a reader. What should the developer implement?

  1. Keep raw and normalized values distinct
  2. Escape generated content in the UI
  3. Parse JSON with a real parser
  4. Handle refusal and empty content explicitly
  5. Validate required schema fields

Explanation

Correct Answer

C:

Syntax validation converts serialized text into a trustworthy data structure only after parsing succeeds; this behavior directly supports the need to avoid accepting malformed generated objects because they resemble JSON to a reader. Regex extraction cannot generally validate nested JSON correctly.

Incorrect Answers

A:

Storing the original evidence and validated normalized value supports later reconciliation; this applies to the different goal to preserve auditability when an extractor reformats a date or currency, not the requirement to avoid accepting malformed generated objects because they resemble JSON to a reader; overwriting the raw source eliminates a useful verification trail.

B:

When an application needs to show model-produced HTML snippets without allowing browser script injection, output encoding or sanitization protects display contexts from untrusted markup; the current capability must instead avoid accepting malformed generated objects because they resemble JSON to a reader, while a correct JSON wrapper does not make embedded HTML safe.

D:

This approach serves the separate need to prevent a parser crash when the model returns no ordinary text because response handling must branch on stop reason and content block types before decoding data; it does not establish the outcome to avoid accepting malformed generated objects because they resemble JSON to a reader, and assuming every call yields a usable business record creates hidden error paths.

E:

Schema checks enforce field presence, types, and enumerations before the result enters a database; despite being useful when a service must reject a response that omits a mandated account identifier, it is not a solution to avoid accepting malformed generated objects because they resemble JSON to a reader; syntactically valid JSON may still be contract-invalid.

Question 50

A Claude application review asks the team to close two unrelated gaps without merging their execution paths. Service A must avoid assuming a Claude Code repository setting automatically affects a direct Messages API call; service B must avoid exposing raw production database credentials directly to an agent. Which paired remediation works?

  1. First component: Place durable behavior instructions in the system parameter. Second component: Deduplicate application events.
  2. First component: Deduplicate application events. Second component: Isolate tools behind a service layer.
  3. First component: Test interface-specific instruction behavior. Second component: Isolate tools behind a service layer.
  4. First component: Test interface-specific instruction behavior. Second component: Place durable behavior instructions in the system parameter.

Explanation

Correct Answer

C:

The first proposal fits its assigned role because different Claude surfaces have different configuration and context mechanisms; an integration must supply its own instructions, while the second proposal fits its assigned role because a mediation service validates identity, arguments, authorization, and audit logs for each requested action; their respective acceptance criteria are to avoid assuming a Claude Code repository setting automatically affects a direct Messages API call and to avoid exposing raw production database credentials directly to an agent.

Incorrect Answers

A:

The first proposal serves the different purpose to ensure an API assistant consistently uses a defined support role across requests instead of the assigned first role because system-level guidance supplies application-wide instruction context, separate from each user's task content, while the second proposal serves the different purpose to avoid starting two extraction jobs for the same uploaded document after repeated browser submissions instead of the assigned second role because an idempotent job key lets the server recognize duplicates at its request boundary; their respective acceptance criteria are to avoid assuming a Claude Code repository setting automatically affects a direct Messages API call and to avoid exposing raw production database credentials directly to an agent.

B:

The first proposal serves the different purpose to avoid starting two extraction jobs for the same uploaded document after repeated browser submissions instead of the assigned first role because an idempotent job key lets the server recognize duplicates at its request boundary, while the second proposal fits its assigned role because a mediation service validates identity, arguments, authorization, and audit logs for each requested action; their respective acceptance criteria are to avoid assuming a Claude Code repository setting automatically affects a direct Messages API call and to avoid exposing raw production database credentials directly to an agent.

D:

The first proposal fits its assigned role because different Claude surfaces have different configuration and context mechanisms; an integration must supply its own instructions, while the second proposal serves the different purpose to ensure an API assistant consistently uses a defined support role across requests instead of the assigned second role because system-level guidance supplies application-wide instruction context, separate from each user's task content; their respective acceptance criteria are to avoid assuming a Claude Code repository setting automatically affects a direct Messages API call and to avoid exposing raw production database credentials directly to an agent.

Claude Certified Developer - Foundations (CCDV-F) Practice Tests