Claude Certified Developer – Foundations

CCDV-F mock exam

Our own items, written to the published exam guide. They are not real exam questions.

full mock

53items per sitting, from a bank of 175
120 mintime limit when timed
8domains, with items per domain as in the exam guide

Readiness gauge only. The real exam reports a scaled score (pass at 720 on a 100–1,000 scale); percent-correct here does not convert to it. Aim for 75%+ in every domain.

practice by domain

sample questions

10 items from the mock bank, one per domain first. Open an item to see the answer and why.

  1. A developer-tools team builds an assistant that fixes reported bugs in one 40,000-line service. A proposal splits each fix into planner, coder and tester subagents. Each phase relies on what the last one learned: why a test fails shapes the patch, and the patch decides which tests to rerun. Developers watch each fix live and want results quickly.

    Which architecture best fits these phases and the developers' wait?

    1. A coordinator that runs planner, coder and tester subagents in turn, giving each one a brief written from the last result.
    2. Parallel coder subagents, one for each affected file, each patching its own file while a coordinator merges the diffs.
    3. One agent that plans, patches and tests in its own context window, so each phase keeps what the earlier phases learned.
    4. A routing workflow that classifies each bug report by type and sends it down a fixed sequence of prompts for that type.
    Show the answer

    Answer: C.

    Correct: one agent for all three phases. The phases share significant context and latency matters, which is when the docs advise keeping work in the main conversation: a subagent that is not a fork starts fresh with only its brief. Why not the others: planner, coder and tester subagents — this gives each phase a specialised prompt, but every handoff re-gathers context and adds wait, against "want results quickly"; a routing workflow — its fixed sequence cannot follow what each test reveals; parallel coder subagents per file — patches made without seeing each other conflict, and the merge has nothing to reconcile them.

  2. A nightly job builds 12,000 batch requests with the same helper that the team's chat service uses. The batch is created without error, but when it ends every result is errored with invalid_request_error, none expired, and nothing was billed. The helper sets max_tokens to 1,024, stream to true, and a custom_id for each ticket.

    What is the most likely root cause?

    1. The batch went over the size limit for a single batch, so every request inside it was rejected when processing began.
    2. The 24-hour processing window ran out before the requests reached the model, so each one ended without being processed.
    3. The shared helper sets stream to true, which batch requests do not support, so each request fails its validation.
    4. The organisation's rate limit was exceeded while the batch ran, so every queued request came back marked as errored.
    Show the answer

    Answer: C.

    Correct: stream set to true in a batch. Batch requests reject stream: true with a validation error, and because each request's params are validated asynchronously, the errors appear only when the batch ends, as invalid_request_error on every request. Why not the others: size limit — an oversized batch is refused when it is created, and this one was created without error; 24-hour window — running out produces expired results, and none expired; rate limit — it applies to API calls and the processing queue, and would not surface as an invalid request on each result.

  3. A developer runs a three-day refactor of a billing service in one auto mode session, on a current Opus-family model. Her team's rule is that only the release engineer pushes to the shared remote, and the rule must hold for the whole session, including after Claude Code compacts the conversation. Claude edits files and runs tests without asking, which she wants to keep.

    Which change best enforces the push rule while keeping auto mode's low number of prompts?

    1. Rely on auto mode's classifier, which blocks pushes to the remote of the working repository by default.
    2. Tell Claude at the start of the session not to push, which the classifier then treats as a block signal.
    3. Switch the session to plan mode, so that Claude proposes each change and nothing runs until she approves it.
    4. Add a deny rule for git push commands to her user settings, since deny rules hold in every permission mode.
    Show the answer

    Answer: D.

    Correct: a deny rule for git push. Deny rules resolve before the classifier and block in every mode, and as stored rules they survive compaction, while edits and tests still run without prompts. Why not the others: a boundary stated in the conversation — the classifier does block matching actions, but it re-reads the boundary from the transcript, so compaction can drop it, against "after Claude Code compacts"; the classifier's defaults — an ordinary push to the working repository is allowed by default, and only cases such as a force push are blocked; plan mode — it blocks edits until she approves a plan, so the prompts come back.

  4. A team's Claude Code project has a PostToolUse hook with the matcher mcp__ledger__.* that writes each call to an audit file. An auditor finds 9 calls to mcp__ledger__post_entry missing. The transcript shows each returned an MCP error result, "period closed", and the debug log shows the hook ran for every successful post_entry call but never for those 9.

    What is the most likely root cause?

    1. The matcher fails on tool names that contain a second underscore, so the post_entry calls slip past it.
    2. A permission rule denied the 9 calls, so Claude Code fired PreToolUse for them and no later tool event.
    3. PostToolUse runs only after a call succeeds, and failed calls fire PostToolUseFailure, which has no hook.
    4. The hook timed out on the failed calls, so Claude Code cancelled it before it could write the audit line.
    Show the answer

    Answer: C.

    Correct: PostToolUse covers only successful calls. Claude Code fires PostToolUse after a tool completes successfully; when a tool raises an error or an MCP server sends back an error result, it fires PostToolUseFailure instead, so an audit log needs the same hook under both events. Why not the others: the matcher — the same pattern caught every successful post_entry call; a permission denial — it stops a call before it runs, yet the ledger server returned its own error for each one; a timeout — a hook that timed out would have started, but the debug log shows it never ran for those calls, so nothing was cancelled.

  5. A ticket router on the Haiku-family model tried extended thinking. On its eval, accuracy rose from 91% to 96% with budget_tokens at 2,000 and stayed at 96% with 32,000. The team shipped 32,000 "to be safe", and thinking now makes up most of the output bill, with no further gain in accuracy.

    What is the most proportionate change?

    1. Turn extended thinking off again, since a router should answer at once and thinking tokens are billed as output.
    2. Set budget_tokens back to about 2,000, the smallest budget that kept the 96% accuracy on the eval.
    3. Keep the 32,000 budget, since a budget is a target and Claude stops thinking early on easy tickets anyway.
    4. Move the router to the newest Sonnet-family model, so that adaptive thinking sizes each ticket's reasoning itself.
    Show the answer

    Answer: B.

    Correct: a budget of about 2,000. Claude thinks against the budget it is given, and the docs suggest starting near the 1,024 minimum for simple tasks and raising the budget only while results improve; this eval shows the gain stops at 2,000. Why not the others: thinking off — it saves the most, but it gives back the five points that thinking won; keeping 32,000 — Claude can stop well before a budget, but the bill shows it mostly does not here; a Sonnet-family model — its price per token is higher, and nothing shows the router needs more capability.

  6. A code-migration agent on the Messages API uses tool-result clearing (clear_tool_uses_20250919) with the default trigger and keep. Early in each run it calls read_migration_spec once; later it calls run_tests dozens of times, and each result is about 8,000 tokens. Once clearing starts, Claude keeps calling read_migration_spec again, because that result is now a placeholder.

    Which setting keeps the spec in context while old test output is still cleared?

    1. Add read_migration_spec to exclude_tools, so its tool use and result stay while older run_tests results are cleared.
    2. Raise keep to 30 tool uses, so that more of the recent tool results remain in context after each clearing pass.
    3. Set clear_at_least to 50,000 tokens, so that each clearing pass removes the large test results instead of the small spec.
    4. Leave clear_tool_inputs at false, so that Claude's original call to read_migration_spec stays visible after clearing.
    Show the answer

    Answer: A.

    Correct: exclude_tools. Tools named in exclude_tools have their tool uses and results kept by the clearing strategy, so the spec survives while the bulky run_tests output is still cleared. Why not the others: raising keep — it keeps more recent results, but the API clears the oldest first, and the spec read is the oldest, while far more test output now stays; clear_at_least — it sets a minimum amount per clearing pass, not which results go; clear_tool_inputs at false — the call already stays visible by default, but its result is still replaced by a placeholder.

  7. A bank's research assistant summarises public web pages for analysts through one read-only fetch_page tool, and its chat window renders Claude's Markdown. Proxy logs show analysts' browsers loading images from an unknown host, with client names from the analysts' questions in the query string. Every case follows a summary of one blog, whose page holds hidden text addressed to AI assistants.

    What is the most likely root cause?

    1. The fetch_page tool sent the analysts' client names to the blog's server inside the request it made for the page.
    2. The hidden text told Claude to add a Markdown image whose URL held the client names, and the window loaded it.
    3. The assistant's API key leaked, and the attacker read the analysts' conversations back through the Claude API.
    4. The system prompt leaked inside a summary, and it lists the client names that the attacker then sent to the host.
    Show the answer

    Answer: B.

    Correct: an injected Markdown image. Indirect injection in the blog told Claude to write an image link with the client names in its address, and the chat window fetched it, so data left through the reply rather than through a tool. Show images only from your own domains, or check replies before display. Why not the others: fetch_page — it requests the blog's own address, and the logs show the browsers calling the host; a leaked API key — the Messages API keeps no conversation history to read back; a leaked system prompt — the names came from the analysts' questions, not from the prompt.

  8. A help-centre assistant's search_docs tool has the description "Searches the docs." and one string parameter, q, with no description. The search backend matches one to three keywords. Logs show calls such as q: "how do I rotate an API key for a workspace", which return zero hits, while staff who type "rotate API key" by hand get the right article.

    What is the most likely root cause?

    1. The tool's schema is not strict, so Claude is free to send a q string that the keyword index cannot match.
    2. tool_choice is left at auto, so Claude decides on its own when to search and calls the tool before it has keywords.
    3. Neither the description nor q says the search expects a few keywords, not a sentence, so Claude sends questions.
    4. Empty results come back without is_error, so Claude cannot tell a search with no hits from a search that has failed.
    Show the answer

    Answer: C.

    Correct: nothing states the input format. Claude learns how to call a tool only from its name, description and schema, and the docs ask a description to say what each parameter means; nothing here says q takes keywords, and a parameter named q gives no hint. Why not the others: a non-strict schema — strict mode guarantees a valid string, and a whole question already is one; tool_choice auto — it decides whether Claude calls a tool, not what goes into q; empty results without is_error — zero hits is a valid result, not a failure, and it does not explain why each query was a full sentence.

  9. A law firm's research assistant has a lead agent that spawns five subagents for every question. Logs show that 70% of questions ask a single fact, such as one court's filing deadline, and evals show one agent answers those just as well. On broad comparisons across jurisdictions, the subagents raise eval scores by 18 points. Monthly token costs are three times the budget.

    Which change best cuts cost without losing the gain on broad comparisons?

    1. Have the lead agent size each question, answering single facts itself and spawning several subagents only for broad comparisons.
    2. Replace the lead agent and its subagents with one agent for every question, since one agent already answers single facts equally well.
    3. Keep five subagents for every question, and turn on compaction for the lead agent so that its own context stays smaller.
    4. Keep five subagents for every question, but give each a one-line brief instead of a detailed one, so each reads less.
    Show the answer

    Answer: A.

    Correct: scale the number of subagents to the question. Anthropic's research system sizes effort this way: one agent for simple fact-finding, a few subagents for comparisons, more for broad research, so most questions stop paying for five subagents. Why not the others: one agent for every question — it cuts the most cost, but it throws away the 18-point gain, against "without losing the gain"; compaction for the lead agent — the cost sits in the subagents' own requests, not the lead's context; one-line briefs — vague briefs made Anthropic's subagents duplicate each other's work, so they waste tokens instead of saving them.

  10. A team moves a working first-party integration to Claude on Google Cloud through Anthropic's AnthropicVertex client. Its raw HTTP fallback path, which bypasses the SDK, now fails on every request. The fallback already authenticates with a Google Cloud access token, but it still sends the model name in the JSON body and sets the anthropic-version header, as it did before.

    Which change makes the fallback requests match what Google Cloud expects?

    1. Put the model in the endpoint URL, and send anthropic_version in the request body with the value vertex-2023-10-16.
    2. Prefix the model name in the body with anthropic., and sign every request with the cloud platform's own credentials.
    3. Keep the request body as it is, and switch the endpoint to the global region so that every model is available.
    4. Upload the prompt documents through the Files API, so that the request body carries only short file_id references.
    Show the answer

    Answer: A.

    Correct: model in the URL, anthropic_version in the body. On Google Cloud the model is not passed in the request body but in the endpoint URL, and anthropic_version moves from a header into the body with the value vertex-2023-10-16. Why not the others: anthropic. prefix — that is how Claude in Amazon Bedrock names models, not Google Cloud; global region — a real endpoint choice, but the body would still carry the model and lack anthropic_version; Files API — the docs list it as unsupported on Google Cloud, and it would not fix the request shape.