Claude Certification Guides
CCDV-F265 questions in the bank

Claude Certified Developer, Foundations practice questions with answers

Ten questions in the format of the CCDV-F exam, with the correct answer and the reasoning for each. Read the situation, weigh the options, then open the answer. Two from each domain where the blueprint allows, so you see the full spread of what the exam asks.

Exam questions
53
Time
120 min
Pass mark
720 / 1000
Domains
8
  1. Question 1 · Domain 1 · Agents and Workflows

    A logistics firm in Rotterdam runs a production agent that reconciles shipment manifests against customs declarations. Its loop is a while(true) that returns when stop_reason is anything other than tool_use, and otherwise appends the assistant content and the tool results and calls the API again. A customs-lookup tool began timing out intermittently one night, and every time it returned an is_error result the agent tried again with slightly different parameters. The run lasted 40 minutes before an engineer killed it, by which point it had consumed a large share of the day's token budget and produced nothing. In the post-mortem the team wants a fix that covers this whole class of failure, not just this one tool.

    Which change most robustly fixes this class of problem?

    1. ASet tool_choice to {"type": "none"} after the first tool call
    2. BLower the temperature so Claude stops retrying
    3. CStop returning is_error so Claude believes the tool succeeded
    4. DAdd an iteration cap (or token/time budget) to the loop, and surface a failure to the caller when it is exceeded
    Show the answer and why

    Correct answer: D. Add an iteration cap (or token/time budget) to the loop, and surface a failure to the caller when it is exceeded

    An unbounded while(true) loop has no safeguard against repeated tool failures or oscillation. Bounding the loop with a maximum number of iterations or a budget, then reporting failure, is the standard defensive pattern. Disabling tools after the first call breaks legitimate multi-step tasks, temperature does not control retry behaviour, and hiding errors from Claude makes it act on false data, which is worse than the original problem.

    Read the lesson: Building an Agent Loop

  2. Question 2 · Domain 2 · Applications and Integration

    A two-person startup in Riga is about to launch a chat server for a tax-filing assistant. The handler pushes the incoming text onto a messages array declared at module level, calls the Messages API with that array, pushes the assistant's content onto the same array and returns the response. In testing with a single founder it worked perfectly, and the array seemed an efficient way to avoid rebuilding history on every call. The service will handle sensitive income and family details for thousands of users at once. Before launch the founders ask an experienced engineer to review the handler and name its most serious defect.

    What is the most serious defect in this handler?

    1. ANothing; this is efficient because the array is reused
    2. BThe Batches API should be used for a server
    3. CA user_id field should be added to each message
    4. DAll users share one history, so conversations bleed between users and the array grows forever; keep history per session (keyed by an authenticated session id) with a size limit
    Show the answer and why

    Correct answer: D. All users share one history, so conversations bleed between users and the array grows forever; keep history per session (keyed by an authenticated session id) with a size limit

    A module-level array is shared by every request, so user A's messages become part of user B's context, which is both a correctness and a privacy failure, and the unbounded growth will eventually exceed the context window. History must be partitioned per conversation and trimmed. The Messages API has no per-message user_id field.

    Read the lesson: Building Conversational Applications

  3. Question 3 · Domain 2 · Applications and Integration

    An operations engineer at a hospital group in Manchester is validating outbound connectivity from a locked-down bastion host before any application code is written. She tests with curl against the Messages endpoint, passing the organisation's API key in an Authorization header as a Bearer token, a content-type header and a body containing the model, max_tokens of 256 and a messages array. Every attempt returns 401 authentication_error. The key was generated that morning in the Console and copied directly, and the same key works from a colleague's SDK-based script on another machine, so she is confident the credential itself is valid and that the problem lies in how the raw request is constructed.

    Which change to the curl request fixes the authentication failure?

    1. AAdd a Content-Length header
    2. BSend the key in an api-key header instead
    3. CAppend the key as a ?key= query parameter
    4. DSend the key in the x-api-key header and include the anthropic-version header (for example 2023-06-01)
    Show the answer and why

    Correct answer: D. Send the key in the x-api-key header and include the anthropic-version header (for example 2023-06-01)

    The Claude API authenticates API keys with the x-api-key header; Authorization: Bearer is used for OAuth tokens, not sk-ant API keys, so the request is unauthenticated. Every request also needs the anthropic-version header. Keys must never go in query strings where they end up in logs, and Content-Length is handled by curl automatically.

    Read the lesson: The Messages API

  4. Question 4 · Domain 3 · Claude Code

    The risk-platform team at a bank in Frankfurt has fourteen developers using Claude Code on the same repository. They want Claude Code to run npm test freely, because waiting for approval on every test run is slowing people down, but they never want it to run rm -rf or git push, after one near miss on a feature branch. The security officer insists the rule must apply automatically to anyone who clones the repository, with no per-machine setup and no reliance on individual developers remembering to approve or refuse. One developer suggests a paragraph in CLAUDE.md, another an environment variable, and a third says it simply cannot be enforced. The team lead has to pick one place for the configuration.

    Where should the team configure these rules?

    1. AAs prose in CLAUDE.md asking Claude to avoid those commands
    2. BIn permissions.allow and permissions.deny rules inside the project's .claude/settings.json, which is committed and shared with the team
    3. CIn an environment variable such as CLAUDE_DENY
    4. DIt cannot be enforced; developers must approve each command manually
    Show the answer and why

    Correct answer: B. In permissions.allow and permissions.deny rules inside the project's .claude/settings.json, which is committed and shared with the team

    Permission rules in settings.json are enforced by the Claude Code harness, not by the model's good will, which is why they belong there rather than in CLAUDE.md prose. The project-level .claude/settings.json is checked into the repository so everyone inherits the same allow and deny rules; deny rules take precedence over allow rules.

    Read the lesson: Claude Code Essentials for Developers

  5. Question 5 · Domain 4 · Eval, Testing, and Debugging

    A university library in Ghent has launched a research assistant over 400,000 catalogue records and digitised theses. Within three weeks, researchers describe it as giving wrong answers, and the library director wants a fix before the new academic term. The engineers add tracing and read through sixty flagged conversations. In each one the model's answer is a faithful, well-reasoned reflection of the documents handed to it, but in most of those cases the documents themselves are the wrong ones: a question about a 1970s architecture thesis was answered from a catalogue record about a 1990s engineering dissertation. One engineer wants a larger model, another wants stronger accuracy language in the prompt, and a librarian suggests publishing guidance for users.

    Where is the defect?

    1. AThe model, so switch to a larger one
    2. BThe prompt, so add stronger wording about accuracy
    3. CThe retrieval layer, so fix the search or indexing that selects documents
    4. DThe users, so publish usage guidance
    Show the answer and why

    Correct answer: C. The retrieval layer, so fix the search or indexing that selects documents

    The traces localize the fault: the model is correct given its inputs, and the inputs are wrong. That is an integration-layer defect. Model upgrades (A) and prompt exhortations (B) cannot fix inputs, and blaming users (D) ignores the evidence.

  6. Question 6 · Domain 5 · Model Selection and Optimisation

    An insurance group in Zurich runs a document pipeline that sends one request per document to the most capable model available. Each request does three things: it extracts ten structured fields, reasons about compliance risk against the group's underwriting rules, and writes a short summary for the case file. Volume has reached one million documents a day and the monthly bill is now described by the CFO as unsustainable; she wants a 60 per cent reduction within the quarter. The compliance team has stated that the quality of the risk judgement cannot drop, since regulators sample the output. The engineering lead must propose a change that satisfies both without a lengthy rebuild.

    Which optimisation is most sound?

    1. AReduce max_tokens on every request
    2. BRemove the system prompt to save input tokens
    3. CSwitch the entire pipeline to the smallest model without testing
    4. DDecompose the task: route the structured extraction and summary to a cheaper model, keep the capable model only for the risk-reasoning step, and confirm quality with an eval before switching
    Show the answer and why

    Correct answer: D. Decompose the task: route the structured extraction and summary to a cheaper model, keep the capable model only for the risk-reasoning step, and confirm quality with an eval before switching

    Different sub-tasks have different difficulty. Extraction and summarisation are usually well within a smaller model's ability, while nuanced judgement may justify the premium model. Splitting the work and measuring each part is how teams cut cost without losing quality. The other options either damage output (truncation, dropping instructions) or gamble on quality with no measurement.

    Read the lesson: Choosing a Model

  7. Question 7 · Domain 5 · Model Selection and Optimisation

    A logistics firm in Rotterdam uses Claude to extract consignment details from shipping documents, with a long cached system prompt describing its data model. A finance analyst reconciling the monthly invoice against the engineering team's own logs finds a large gap, because the engineers logged only the input_tokens field. A typical response carries a usage block with input_tokens 1,200, output_tokens 300, cache_read_input_tokens 8,000 and cache_creation_input_tokens 0. The analyst believes 1,200 tokens of input were processed and asks why Anthropic appears to charge for more. The engineer must explain what the four numbers say about the prompt that was actually sent and how its input side was billed.

    How should the input side of this usage block be interpreted?

    1. AOnly 1,200 input tokens were processed
    2. B1,500 tokens were processed in total
    3. C9,200 input tokens were processed, all billed at the full input rate
    4. D9,200 input tokens were processed: 1,200 uncached at the base rate and 8,000 served from cache at the much lower cache-read rate
    Show the answer and why

    Correct answer: D. 9,200 input tokens were processed: 1,200 uncached at the base rate and 8,000 served from cache at the much lower cache-read rate

    input_tokens counts only the tokens that were neither read from nor written to the cache. The complete prompt size is input_tokens plus cache_read_input_tokens plus cache_creation_input_tokens. Cache reads are billed at a steep discount and cache writes at a premium over base input, which is why the usage block separates them.

    Read the lesson: Tokens, Pricing and Counting

  8. Question 8 · Domain 6 · Prompt and Context Engineering

    A public broadcaster in Ireland runs a newsroom pipeline that condenses incoming press releases and listener emails into three bullet points for the morning editorial meeting. The prompt is assembled by simple string concatenation: an instruction, then the raw text, then the request for three bullets. Over one week the logs show that about six per cent of outputs ignored the bullet-point instruction entirely and returned several paragraphs. Every one of those inputs contained phrases such as a request to write a detailed feature or a long-form essay, which the model appears to have treated as instructions. The editor wants the problem fixed before the autumn schedule launches, and the developer has one sprint to change how the prompt is built.

    What is the recommended improvement to the way this prompt is constructed?

    1. AConvert the document to lower case
    2. BAdd the word "please" before the instruction
    3. CWrap the document in XML tags such as <document>...</document>, place instructions outside the tags, and tell Claude the tagged content is the material to summarise
    4. DMove the document into the system prompt
    Show the answer and why

    Correct answer: C. Wrap the document in XML tags such as <document>...</document>, place instructions outside the tags, and tell Claude the tagged content is the material to summarise

    XML tags give Claude an unambiguous boundary between instructions and data, which is Anthropic's primary structuring recommendation. Instructions stay outside the tags and can refer to the tag by name. The system prompt is for instructions, not for bulk user-supplied data, and cosmetic changes to the text do not address the ambiguity.

    Read the lesson: Prompt Engineering in Code

  9. Question 9 · Domain 7 · Security and Safety

    Harrowgate Research builds an internal assistant that fetches supplier web pages and summarises them for procurement staff. The lead developer, Priya, returns each fetched page to Claude in a tool_result block, as recommended. To save a round trip, she appends her own formatting instruction to the end of the same tool_result text: "Now summarise the above in three bullet points." In testing, Claude sometimes ignores the bullet-point instruction. In other runs it tells the user that the page appears to contain an instruction aimed at it. Priya wants consistent formatting without weakening the agent's scepticism towards fetched content.

    Where should Priya place her formatting instruction so that Claude follows it reliably?

    1. AKeep it in the tool_result, but wrap it in XML tags so that Claude recognises it as coming from the operator
    2. BMove it into the system prompt and send the fetched page as plain user text instead of a tool_result
    3. CSend it in a user turn that follows the tool_result block, or in a mid-conversation system message on supported models
    4. DJSON-encode the instruction inside the tool_result so that it is clearly delimited from the page content
    Show the answer and why

    Correct answer: C. Send it in a user turn that follows the tool_result block, or in a mid-conversation system message on supported models

    Claude treats tool_result content as untrusted data. Operator instructions placed there may therefore be ignored or flagged as a possible injection. The documented fix is to send your own instructions in a user turn after the tool_result block, or in a mid-conversation system message where the model supports it. XML tags or JSON encoding inside the tool_result still leave the instruction in an untrusted channel. JSON encoding is meant to delimit untrusted payloads, not to carry operator commands. Moving third-party content out of tool_result into plain user text goes against the guidance to deliver untrusted content only in tool results.

    Read the lesson: Prompt Injection and Untrusted Input

  10. Question 10 · Domain 8 · Tools and MCPs

    A travel booking startup in Porto is giving its trip-planning assistant a weather lookup so it can warn travellers about storms before they confirm a booking. The developer registers the tool with the name get weather, a one-word description that reads simply weather, and an input_schema declaring a single string property called city. The very first request that includes the tool is rejected with a 400 before Claude produces anything, and the error lands in the staging logs twenty minutes before a demo to the founders. A colleague reviewing the pull request remarks that even once the request is accepted, the definition gives Claude almost nothing to work with when deciding whether and how to call the tool.

    What is causing the rejection, and what else in the definition should be improved before the demo?

    1. AA description shorter than 50 characters is an error
    2. BA handler field is required
    3. CThe required array is mandatory
    4. DTool names may contain only letters, digits, underscores and hyphens (no spaces), so "get weather" is invalid; separately, the one-word description should be expanded to explain what the tool does and when to use it
    Show the answer and why

    Correct answer: D. Tool names may contain only letters, digits, underscores and hyphens (no spaces), so "get weather" is invalid; separately, the one-word description should be expanded to explain what the tool does and when to use it

    The name must match a restricted pattern (such as get_weather). That is the validation failure. The terse description is legal but harmful: Anthropic's guidance says the description is the single most important factor in whether Claude uses a tool correctly, so it should cover purpose, when to call it, what each parameter means and any limitations.

    Read the lesson: Defining Tools

Now try it at exam pace.

Twenty questions across every domain in forty minutes, no account needed. You get a score per domain and the two domains to read first.

Practise one domain at a time

Weights follow the official blueprint. Each drill is untimed and explains every answer.

  • Domain 1: Agents and Workflows 14.7%

    Build agentic loops and workflows with the Messages API and the Agent SDK.

  • Domain 2: Applications and Integration 33.1%

    The Messages API end to end: requests, multimodal input, streaming, files, batches and SDKs.

  • Domain 3: Claude Code 3.1%

    Use Claude Code effectively as a developer.

  • Domain 4: Eval, Testing, and Debugging 2.6%

    Evaluate and debug Claude-powered features.

  • Domain 5: Model Selection and Optimisation 16.8%

    Pick models, control cost and latency, use caching and understand tokens and pricing.

  • Domain 6: Prompt and Context Engineering 11%

    Prompt engineering techniques and context management in code.

  • Domain 7: Security and Safety 8.1%

    Secure keys, defend against prompt injection, filter content and respect the usage policy.

  • Domain 8: Tools and MCPs 10.6%

    Define tools, handle tool calls and connect MCP servers from code.

Questions about the CCDV-F exam

How many questions are on the Claude Certified Developer, Foundations exam?
53 multiple-choice questions in 120 minutes. Results are reported on a scaled range of 100 to 1000 and 720 is the pass mark. The exam is proctored by Pearson VUE, online or at a test centre.
Are these real CCDV-F exam questions?
No. Every question here is original and written from Anthropic's public documentation, the Anthropic Academy courses and the published exam guide. The real exam is confidential. What is the same is the format: a situation to analyse, four options, one best answer.
How realistic is the format?
Each question on the CCDV-F exam describes a situation and asks for the best decision. Use-case mode here does the same: a scenario of 60 to 130 words, the question asked at its end, and four plausible options. The diagnostic and mock exams run at the real pace of two minutes per question.
Can I practise without an account?
Yes. The diagnostic, the drills and the full mock exam run without signing in and show your score per domain. Signing in with an email shows the correct answer and explanation for every question, saves your attempts and puts your best mock score on the leaderboard.
Where do I find more CCDV-F questions?
The bank behind this page holds 265 questions across 8 domains, plus questions submitted and voted on by the community. Drill mode lets you pick domains; the mock exam samples 53 questions in blueprint proportion.

25 lessons cover the whole blueprint. More answers in the exam FAQ. Not affiliated with Anthropic.