Anthropic certification · Exam CCDV-F

CCDV-F Mock Exam

Claude Certified Developer-Foundations

Find out if you're ready for CCDV-F. Take the free timed mock exam and get your score in minutes, or study the free CCDV-F questions below with answers and explanations.

20 questions · 46 minutes · free, no sign-up

Free CCDV-F questions

1–10 of 24 free
Question 1 Choose 1
You are designing a multi-step Claude workflow where some steps must reason without seeing the full prior conversation history. The team wants to keep specific context isolated to specific steps. The context engineering technique you would use is...
Show answerHide answer

Correct answer: C Context isolation through subagents or multi-step agentic workflows that scope each step's context to only what the step needs.

Explanation

Explanation

This question tests the context engineering principle of scoping context to each step. When a workflow has steps that must reason independently (i.e., without seeing full prior history), the correct technique is to isolate context per step — either by:

- Subagents: Spawning separate agent instances, each with its own freshly scoped context window containing only the inputs relevant to that step.

- Multi-step agentic workflows: Orchestrating discrete steps where each step receives a curated subset of context (e.g., only the outputs/handoffs it needs), rather than the entire accumulated transcript.

The key idea is: context is a scarce, curated resource — you pass each step only what it needs, which both enforces isolation and improves reasoning quality (less noise, less distraction, lower token cost).

Why the other options are wrong

Option A — "Augment with all available content at every step":
This is the opposite of isolation. Flooding every step with the entire prior history violates the requirement that some steps must not see prior conversation, and it degrades reasoning by introducing irrelevant context ("context rot"/distraction).

Option B — "Single global prompt for every step":
A global prompt doesn't isolate context at all; it just applies the same instructions everywhere. It says nothing about what history each step sees, so it fails to meet the requirement.

Option D — "Embed full prior history in each step regardless of need":
Explicitly contradicts the goal. Embedding full history everywhere means no step is isolated, and it wastes context budget on content a step doesn't need.

References

- Context engineering (Anthropic's framing): Treat the context window as a finite, carefully managed resource — curate, isolate, and hand off only relevant information between steps.
Question 2 Choose 1
You are building an MCP server that exposes several internal data sources as MCP resources. The server needs to be deployed so multiple Claude applications can integrate with it. How would you approach the build and deployment?
Show answerHide answer

Correct answer: A Author the server with clearly defined resources, tools, and prompts, choose a communication pattern, and deploy to an accessible hosting environment.

Explanation

Explanation

This question tests the build-and-deploy lifecycle of an MCP server intended for multi-client, shared use. The correct approach is the standard, documented MCP server workflow:

1. Author the server — define the three primitives MCP exposes:
- Resources: Readable data/context (e.g., the internal data sources being exposed).
- Tools: Callable functions the model can invoke.
- Prompts: Reusable prompt templates.

2. Choose a communication pattern (transport) — select the appropriate MCP transport for the deployment model:
- stdio: For local, process-spawned servers.
- Streamable HTTP (or SSE): For remote/shared servers reachable over a network.

3. Deploy to an accessible hosting environment — since multiple Claude applications must integrate with it, the server must run somewhere reachable (a shared/remote host), not just locally.

Because the requirement is shared, multi-application access, you design the server once, generically, and deploy it to an accessible host so all clients can connect.

Why the other options are wrong

Option B — "Scope to the first app, extend per integration request":
This builds a client-specific server and grows it reactively. It's poor design for a shared server — it couples the server to individual consumers, duplicates or entangles definitions, and doesn't reflect MCP's intent of a reusable, capability-exposing server. It also risks inconsistent behavior across applications.

Option C — "Deploy only on individual developer machines":
Directly violates the requirement that multiple Claude applications can integrate with it. Local-only (e.g., stdio on a developer's laptop) is unreachable by other apps unless separately exposed through a network-accessible service.

Option D — "Bypass MCP and embed each data source directly in every app":
Throws away MCP entirely. It creates N separate integrations to maintain, duplicates logic, and defeats the purpose of a single server exposing the data sources once to all consumers.

References / Concepts

- MCP (Model Context Protocol) server primitives: resources, tools, and prompts.
- MCP transports: stdio (local) versus Streamable HTTP / SSE (remote, shared). The transport choice determines reachability.
Question 3 Choose 1
Your Claude application runs long agentic workflows where the agent makes many tool calls, and the conversation history grows quickly. After about 20 tool calls, you notice the agent's responses become less focused and sometimes ignore earlier task constraints. How would you address this?
Show answerHide answer

Correct answer: B Apply context engineering techniques such as tool output pruning or compaction to keep the active task state visible while reducing the volume of older content.

Explanation

Explanation

The symptoms described — declining focus and ignored earlier task constraints after approximately 20 tool calls — are classic signs of context bloat / "context rot." The conversation history has grown with accumulated tool outputs (often verbose), and the model's reasoning gets diluted by irrelevant or stale content. The fix is context engineering:

- Tool output pruning: Trim or summarize verbose tool results so only the useful information remains in context (e.g., collapse large JSON payloads, drop redundant fields, and keep key results).
- Compaction: Periodically summarize or condense older turns into a compact representation, preserving essential task state (constraints, decisions, and progress) while discarding low-value details.

The goal is to keep the active task state salient (so earlier constraints are still honored) while reducing the volume of older content that distracts the model. This directly addresses both symptoms: focus improves and earlier constraints stay visible.

Why the other options are wrong

Option A — "Remove tool calling entirely":
Overkill and destructive. Tool use is core to the agentic workflow; the problem isn't tool calling itself but unmanaged context growth. Removing tools eliminates the agent's ability to accomplish the task effectively.

Option C — "Just increase the context window":
A bigger window delays but doesn't solve the problem. More capacity doesn't fix focus — dumping full-detail outputs for every call still produces distraction and context rot, while costs and latency grow. Capacity does not equal relevance. This is the key distinction: more context is not necessarily better context.

Option D — "Restart every five tool calls":
Restarting loses all task state at each restart, which would cause constraint violations rather than fix them. The agent forgets its progress and instructions. You would trade focus problems for loss of continuity. A state-preserving restart or compaction is essentially option B done well; a blind restart is not.

References

- Context engineering (Anthropic): Manage the context window as a finite resource — curate, prune, and compact information.
Question 4 Choose 1
Your team uses several plugins across multiple Claude applications, and a recent plugin update introduced a regression. The team had not been tracking plugin versions, so the team cannot easily identify which version was previously working. How would you address this?
Show answerHide answer

Correct answer: B Add explicit plugin version tracking to the project's configuration so the team can identify, pin, and upgrade plugin versions deliberately.

Explanation

Explanation

The root cause is stated plainly: the team had not been tracking plugin versions, so after a regression they cannot identify which version was previously working. The direct fix is to introduce explicit version tracking in configuration — record the version of every plugin each application depends on, pin known-good versions, and upgrade deliberately (with the ability to roll back to the last working version). This restores the missing capability: reproducibility and the ability to diagnose a regression by comparing pinned versions. Pinning also prevents silent regressions from future updates. ✅

Why the other options are incorrect

A — Abandon all plugins and rebuild functionality in-house: This is a massive, costly overreaction that eliminates the benefit of plugins entirely. The problem is untracked versions, not plugins as such; avoidance trades a small process fix for a large engineering burden.

C — Treat plugins as "untrackable" and offload responsibility to authors: This repeats the practice that caused the incident. Relying on upstream communication with no internal tracking means you still can't identify your last-known-good version.

D — Upgrade everything on a regular cadence: This increases exposure to regressions because every update is a change, without giving you the ability to identify or pin a working version. Keeping drift small doesn't substitute for tracking versions.

References

- Dependency/version management best practices — pin known-good versions, track manifests, enable deliberate upgrades and rollback.
Question 5 Choose 1
You are setting up the configuration management approach for a new Claude Code project. Your team will use CLAUDE.md files and settings.json files to control behavior, and you want to make sure changes are tracked and reviewable. The configuration management approach would...
Show answerHide answer

Correct answer: D Version-control CLAUDE.md and settings.json files alongside the project's source code, with changes reviewed through standard pull request workflows the team applies.

Explanation

Explanation

The requirement is that configuration changes be tracked and reviewable. The simplest, most effective way to achieve both is to treat configuration as part of the project's source code: commit CLAUDE.md and settings.json to the same repository as the application, and route changes through the team's existing pull request workflow. This gives you:

- Tracking — full version history via git, so every change is attributed and reversible.
- Reviewability — PR review, discussion, and approval before configuration changes take effect.
- Atomicity — configuration and code change together in the same commit/PR, so behavior changes are reviewed in context and stay in sync.
- One source of truth — no divergence between repos, and no duplicated copies to reconcile.

It also matches how Claude Code is designed to consume these files: CLAUDE.md lives in the project (and can be committed for team-shared instructions), and settings.json is read from project and user locations — both benefit from living with the code they govern. ✅

Why the other options are incorrect

A — Duplicate the files across multiple repositories for redundancy: This creates multiple sources of truth that will drift, making changes harder to track and review, not easier. Redundancy is the opposite of a single reviewable source.

B — Put both files in a separate repository so configuration evolves independently: Independence is a disadvantage here: configuration drifts out of sync with the code it governs, and reviewing a configuration change in isolation loses the context of the code it affects.

C — Split the two files across repositories: This is an inconsistent hybrid that fragments tracking and forces reviewers to reconcile changes across repositories for no benefit.

References

- Anthropic, Claude Code documentation — CLAUDE.md project memory files and settings.json configuration locations.
Question 6 Choose 1
You are running Claude Code as part of an automated continuous integration pipeline. The pipeline needs Claude Code to execute a set of well-defined tasks without prompting for confirmation, and the output needs to be captured for downstream processing. How would you configure the pipeline?
Show answerHide answer

Correct answer: B Run Claude Code in headless mode with the required permissions configured in settings.json and capture its output for downstream processing.

Explanation

Explanation

The scenario has two explicit requirements: no confirmation prompts (non-interactive, unattended execution) and captured output for downstream processing. Claude Code's headless mode (non-interactive / print mode, e.g. claude -p) is designed exactly for this: it runs tasks autonomously, emits the result to stdout for capture and piping into downstream tooling, and requires no human in the loop. To allow the needed actions without interactive approval, you grant the required permissions explicitly in settings.json (allowlisted tools/commands) — scoped, reviewable, and version-controlled alongside the pipeline config. This satisfies both requirements with the least privilege necessary. ✅

Why the other options are incorrect

A — Replace Claude Code with another tool: This abandons the chosen tool instead of configuring it; Claude Code supports this use case natively via headless mode.

C — Disable confirmation prompts globally across all environments: This is dangerously broad. It removes safety guardrails everywhere, including interactive developer environments, instead of scoping permissions to the CI context.

D — Run in interactive mode with a developer manually approving every prompt: This defeats the purpose of an automated pipeline; it's not unattended, doesn't scale, and blocks CI on human availability.

References

- Anthropic, Claude Code documentation — headless/non-interactive mode (claude -p), output capture, and CI/CD usage.
Question 7 Choose 1
You maintain a Claude application that uses Claude Sonnet 4.5 across several production workflows. Anthropic released Claude Sonnet 4.7, which your evaluation suite shows performing 8% better on your highest-volume task. However, this version produces different output formatting on two of your structuredextraction prompts that downstream consumers parse with regex-based code. To roll out the upgrade, you would...
Show answerHide answer

Correct answer: A Adjust the prompts to constrain output format, re-run evaluations against the expected parsing-layer schema, then roll the model out with a feature flag and the option to revert per workflow.

Explanation

Explanation

The scenario has two facts that pull in different directions: the new model is measurably better (8% on the highest-volume task), but it changes output formatting on two prompts that feed brittle regex parsers. The right rollout keeps the gain without breaking consumers, and option A is the only one that does both.

- Adjust the prompts to constrain output format: Formatting differences between model versions are a prompt-level concern. Making the format explicit (a schema, examples, or prefilled/structured output) is the standard way to get consistent output across models.
- Re-run evaluations against the parsing-layer schema: The existing evaluation suite measured task quality, but it evidently did not catch the formatting regression. Evaluating against what the downstream parser actually expects validates the real contract before anything ships.
- Feature flag with per-workflow revert: The upgrade doesn't need to be all-or-nothing. A flag lets you roll out gradually, upgrade the workflows that are ready, and roll back instantly if something slips through.

Why the others are wrong

B — Ship the change and fix issues in production: This knowingly ships a change that will break two consumers and relies on live failures to find the problems. Regex-based parsers can also fail silently by returning partial or incorrect matches rather than throwing errors, so monitoring may not surface the damage quickly.

C — Loosen the parsers: This is the wrong layer to fix and a larger, riskier change than needed. It broadens the surface area for mis-parsing, doesn't address the prompt problem, and expands scope well beyond the upgrade. Making the parsers more robust may be worthwhile long-term, but it is not the rollout plan for this upgrade.

D — Pin the old model: This forgoes a proven improvement and accumulates upgrade debt. Model versions are eventually deprecated, so avoidance only defers the migration. It also treats a solvable prompt issue as a reason to stay put.

Reference

- Anthropic documentation on migrating to newer models and increasing output consistency through structured outputs and format control. The specific model name "Sonnet 4.7" has not been verified against current documentation; confirm the name before citing it in an answer key.
Question 8 Choose 1
Your Claude application's token costs have grown faster than expected. The team has not been tracking token usage by feature, so the team cannot identify which features are driving cost. The team is debating how to respond. How would you respond?
Show answerHide answer

Correct answer: D Add token usage tracking by feature to the application's logging so the team can identify which features drive cost before recommending changes.

Explanation

Explanation

The root cause is stated directly: the team has not been tracking token usage by feature, so it cannot identify which features drive cost. You cannot optimize what you cannot measure. The correct first step is instrumentation: log token usage (input/output tokens, per request) tagged by feature, so the team gets per-feature cost attribution. Only after that data exists can the team make targeted, evidence-based decisions — e.g., pruning context on the expensive features, adjusting model choice where it's justified, or optimizing prompts that generate excessive tokens.

This is the standard cost-optimization sequence: measure → attribute → target the actual drivers, rather than applying blunt cuts blindly. ✅

Why the other options are incorrect

A — Accept cost growth as unavoidable and decline to investigate: This is false and defeatist; costs are typically driven by identifiable, fixable patterns (verbose context, unnecessary calls, oversized models for simple tasks) that measurement reveals.

B — Switch every feature to the smallest model: This is a blanket downgrade that degrades quality everywhere, including features that don't drive cost, without knowing which features actually matter. It optimizes the wrong variable.

C — Cut token usage uniformly by half across all features: This has the same flaw: an arbitrary across-the-board cut damages features that are already efficient and may not touch the real drivers, all while the team still doesn't know where the cost is.


References

- Anthropic, Effective context engineering for AI agents — token usage as a managed cost; targeting context bloat where it occurs.
Question 9 Choose 1
Your Claude application validates structured output but has been treating validation failures as terminal errors. Each validation failure causes the entire user request to fail. The team wants to handle validation failures more gracefully. How would you handle the validation failures?
Show answerHide answer

Correct answer: C Treat validation failures as a recognized error path that triggers retry, repair, or fallback logic before failing the user request.

Explanation

Explanation

The problem is that validation failures are being treated as terminal — one bad output kills the whole request. The fix is to make validation failure a recognized, handled error path with graceful recovery before giving up:

- Retry — re-invoke the model, optionally with error feedback (e.g., "your previous output failed schema X; correct it").

- Repair — programmatically fix or re-parse the output (e.g., coerce or extract valid JSON, or apply a corrective prompt).

- Fallback — if retry or repair fails, degrade gracefully (e.g., a safe default, a partial result, or a human-review queue) rather than producing a hard user-facing failure.

This is the standard resilience pattern for structured-output pipelines: treat validation as a control point, not a dead end. Many validation failures are transient or correctable, so retry and repair can recover a substantial portion of requests while reserving hard failure for the remaining cases. This also preserves the value of validation — catching malformed output — instead of removing it. ✅

Why the other options are incorrect

A — "Pass validation failures downstream and let each system decide": Pushes known-bad output into consumers, spreading the defect and shifting the burden to every downstream system. It also contradicts the purpose of validating output at the source.

B — "Disable validation until the cause is fixed": Removes the safety net entirely, allowing malformed output to reach users unchecked. You trade a handled failure for silent corruption.

D — "Tell users validation failures are unavoidable; do manual checks": Offloads an engineering problem onto users and accepts a broken experience. It is the opposite of graceful error handling.

References

- Anthropic structured-output and tool-use guidance — validate outputs and handle failures with retry and repair patterns.
Question 10 Choose 1
Your team is preparing a new Claude application for production, and the product team has asked for a cost projection. The team needs to estimate the cost based on expected request volume, average input length, and average output length. How would you build the projection?
Show answerHide answer

Correct answer: B Build a cost model that combines expected request volume, average input tokens, average output tokens, the chosen model's pricing, and any caching benefits.

Explanation

Explanation

A production cost projection should be built from the actual cost drivers of a Claude application. The fundamental cost formula is:

Cost ≈ (request volume) × [(input tokens × input price) + (output tokens × output price)] − caching savings

Option B captures every necessary component the scenario names or implies:

- Expected request volume — the scaling factor.

- Average input tokens — priced per token and often the larger share in long-context applications.

- Average output tokens — priced separately, usually at a higher rate than input, so omitting them can significantly understate cost.

- The chosen model's pricing — rates differ by model, so the projection must use the actual model's per-token prices.

- Caching benefits — prompt caching reduces the cost of repeated prefixes, so a realistic projection accounts for it rather than overstating cost.

This is a complete, transparent model grounded in the real pricing structure. ✅

Why the other options are incorrect

A — "Use the average per-request cost from a similar app, scaled by volume": Borrows a number from a different workload with different prompt lengths, model, and caching. It imports unknown error and isn't grounded in this application's actual inputs, outputs, or pricing.

C — "Include input tokens but omit output tokens": Output tokens are typically priced higher than input tokens, so leaving them out systematically underestimates cost, often substantially.

D — "Use volume × model pricing, estimate token counts post-launch": Without average input and output token counts, there is no meaningful projection. You can't compute cost from volume and a price sheet alone. Deferring the core variables until after launch means you're guessing rather than projecting.

The tested distinction: a complete model using all real cost drivers — volume, input tokens, output tokens, model pricing, and caching — versus borrowed benchmarks, omitted output costs, or missing token estimates.

References

- Anthropic API pricing documentation — per-token input and output rates and model-specific pricing.
- Anthropic prompt caching documentation — cached-prefix pricing reduces repeated-context costs.
Full mock exam

Sit the CCDV-F exam before exam day

Full-length mocks with the same number of questions and the same time limit as the real CCDV-F exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.

Get full CCDV-F mock exam
  • 53questions per mock
  • 120 mintime limit
  • 95questions in the bank
  • Newmock on every attempt