Skip to main content
CertRampLearning

Anthropic · Free practice questions

Claude Certified Developer (CCDV-F) Practice Questions

15 original CCDV-F practice questions across all eight domains of Anthropic's Claude Certified Developer: Foundations exam guide, weighted roughly like the real exam (four on Applications and Integration, two each on Agents and Workflows, Model Selection and Optimization, Prompt and Context Engineering, and Tools and MCPs, one each on the smaller domains). Each one comes with the answer, a short explanation and the reason every other option is wrong.

Written for the exam guide version 1.0 (effective July 2026) · Updated November 11, 2026

These are original practice questions written by CertRamp to the official Anthropic exam outline. They are not real exam questions and do not come from any exam. Try each question first, then open the answer to see the explanation for every option.

Domain 1

Agents and Workflows

Agent ArchitectureIntermediateDomain: Agents and Workflows

Question 1. An agent built with the Claude Agent SDK must check 200 source files for a deprecated API and then write a short migration plan. After a few dozen Read calls, the main conversation is crowded with file contents and the plan misses findings from early in the run. Which change addresses the cause most directly?

  1. Option A: Delegate the audit to a read-only subagent that reports back a summary
  2. Option B: Raise max_turns so the agent has more round trips available to finish the audit
  3. Option C: Ask the agent to restate all findings so far after every Read call
  4. Option D: Run the session in plan permission mode so Claude explores without editing files
Show answer and explanation

Correct answer: A. Delegate the audit to a read-only subagent that reports back a summary

Context isolation is one of the main reasons to use subagents: the parent receives a concise summary instead of every file the subagent read. Restricting the subagent to Read, Grep and Glob also keeps the audit strictly read-only.

  • A (correct)Correct. A subagent runs in its own conversation; its intermediate tool calls and results stay inside it and only the final message returns to the parent.
  • B (incorrect)max_turns limits how many tool-use turns run. It does nothing about file contents accumulating in the main context.
  • C (incorrect)Repeating findings adds even more tokens to the same context window instead of keeping the raw file contents out of it.
  • D (incorrect)Plan mode controls whether Claude edits files. It does not change how much tool output accumulates in the conversation.

Reference: Claude Code Docs: Subagents in the SDK (opens in a new tab)

Agent Construction with ClaudeIntermediateDomain: Agents and Workflows

Question 2. A team exposes an Agent SDK agent behind an internal endpoint that accepts open-ended prompts such as "improve this codebase". Some sessions run for a very long time and cost far more than expected. What is the documented way to bound each run?

  1. Option A: Set effort to "max" so Claude reaches a finished answer in fewer steps
  2. Option B: Set max_turns and max_budget_usd and handle the error result subtypes
  3. Option C: Add Bash to disallowed_tools so the agent cannot run long commands
  4. Option D: Use the bypassPermissions mode so the agent never waits for approval
Show answer and explanation

Correct answer: B. Set max_turns and max_budget_usd and handle the error result subtypes

Without limits the agent loop runs until Claude produces a response with no tool calls, which can take long on open-ended prompts. The documentation calls setting a budget a good default for production agents, and the result subtype tells your code whether the task finished or hit a limit.

  • A (incorrect)Higher effort lets Claude spend more tokens on reasoning; it is not a limit on how long the loop runs.
  • B (correct)Correct. Both options default to no limit; when one is hit the SDK returns a ResultMessage with the subtype error_max_turns or error_max_budget_usd, and the session can be resumed if needed.
  • C (incorrect)Blocking a tool reduces what the agent can do but does not cap the number of turns or the spend.
  • D (incorrect)This removes approval prompts and is meant only for isolated environments. It makes runs less controlled, not shorter.

Reference: Claude Code Docs: How the agent loop works (opens in a new tab)

Domain 2

Applications and Integration

Claude API MechanicsIntermediateDomain: Applications and Integration

Question 3. Every night a job classifies about 40,000 support tickets with the same prompt template. The results are needed by the next morning, and cost matters more than latency. Which approach fits best?

  1. Option A: Send all requests concurrently to the Messages API with streaming enabled and store results in request order
  2. Option B: Submit a Message Batch and read the results by position, because a batch returns them in submission order
  3. Option C: Submit a Message Batch and match every result to its request by custom_id
  4. Option D: Process the tickets one by one with the Messages API and enable prompt caching on the template
Show answer and explanation

Correct answer: C. Submit a Message Batch and match every result to its request by custom_id

The Message Batches API is built for large, non-urgent workloads: one batch can hold up to 100,000 requests or 256 MB. Because results may come back in any order, each request needs a unique custom_id that your code uses to join the result back to its ticket.

  • A (incorrect)Realtime calls are billed at standard prices and 40,000 concurrent requests run straight into rate limits; streaming adds nothing for an offline job.
  • B (incorrect)The documentation says batch results can be returned in any order, so position cannot be used to match them.
  • C (correct)Correct. Batch usage is charged at 50% of standard prices, most batches finish within an hour (a batch expires if it is not done within 24 hours), and custom_id is how you pair results with requests.
  • D (incorrect)Caching lowers the cost of the repeated prefix, but sequential realtime calls still pay standard output prices and take far longer than necessary.

Reference: Claude Platform Docs: Batch processing (opens in a new tab)

Claude Application DesignFoundationDomain: Applications and Integration

Question 4. A chat feature sends only the user's newest message in each Messages API request. Users complain that Claude forgets what they said one turn earlier. What is the fix?

  1. Option A: Raise max_tokens so the model can keep more of the conversation in memory
  2. Option B: Enable prompt caching so earlier turns are stored on the server and reused automatically
  3. Option C: Lower the temperature so answers stay consistent from one turn to the next
  4. Option D: Send the whole conversation, alternating user and assistant turns, with every request
Show answer and explanation

Correct answer: D. Send the whole conversation, alternating user and assistant turns, with every request

With the standard Messages API your application owns the conversation state and resends it every turn. Earlier turns do not even have to come from Claude: you can include synthetic assistant messages when you build up a conversation.

  • A (incorrect)max_tokens caps the length of the response. It has no effect on which earlier turns the model can see.
  • B (incorrect)Prompt caching changes what you pay for a repeated prefix that you still send. It never adds content you leave out of the request.
  • C (incorrect)Temperature controls randomness during generation. It cannot restore context that was never sent.
  • D (correct)Correct. The Messages API is stateless, so each request must carry the conversation history you want Claude to consider.

Reference: Claude Platform Docs: Working with the Messages API (opens in a new tab)

Claude API MechanicsAdvancedDomain: Applications and Integration

Question 5. After a response with stop_reason "tool_use" for a client tool, your code sends a user message whose content array holds a text block ("Here is the lookup result:") followed by the tool_result block. The request is rejected as an invalid request. Which change fixes it?

  1. Option A: Put the tool_result block first in the content array and the text after it
  2. Option B: Send the tool output in a new assistant message instead of a user message
  3. Option C: Insert a short user message acknowledging the tool call before the message that holds the tool_result
  4. Option D: Move the tool output into the system prompt of the next request
Show answer and explanation

Correct answer: A. Put the tool_result block first in the content array and the text after it

Two formatting rules apply to client tool results: the tool_result must come right after the assistant message with the tool_use, and inside that user message the tool_result blocks come before any text. Each result is linked to its call through tool_use_id.

  • A (correct)Correct. In the user message that carries tool results, tool_result blocks must come first; any text must follow all of them.
  • B (incorrect)Tool results are returned in a user message. An assistant message cannot answer a tool_use block.
  • C (incorrect)Tool results must immediately follow their tool_use blocks; no other message may sit between them.
  • D (incorrect)The system prompt cannot resolve a pending tool_use block. The API expects a matching tool_result in the next user message.

Reference: Claude Platform Docs: Handle tool calls (opens in a new tab)

Configuration ManagementIntermediateDomain: Applications and Integration

Question 6. A production integration references a model alias that resolves to the most recent snapshot of a model version. After a new snapshot ships, a regression test of the team's extraction prompt fails although nobody changed the code. Which practice prevents this kind of surprise?

  1. Option A: Keep the alias but set temperature to 0 so the output becomes deterministic
  2. Option B: Pin a specific model ID and change it only after regression testing
  3. Option C: Keep the prompt inline next to the API call so prompt and code always change together
  4. Option D: Query the Models API at startup and always use the newest active model
Show answer and explanation

Correct answer: B. Pin a specific model ID and change it only after regression testing

Anthropic does not update the weights or configuration of an existing model ID; updated versions ship under new IDs. Pinning the ID, versioning prompts and treating a model change as a tested release is part of configuration management.

  • A (incorrect)Lower randomness does not stop the alias from pointing to a different snapshot with different behaviour.
  • B (correct)Correct. A model ID identifies a pinned version whose underlying model stays constant; an alias is a convenience pointer that moves to the newest snapshot.
  • C (incorrect)Versioning prompts is good practice, but the failure here came from the model changing, not the prompt.
  • D (incorrect)This would change the model even more often and make regressions harder to trace.

Reference: Claude Platform Docs: Model IDs and versions (opens in a new tab)

Domain 3

Claude Code

Claude Code OperationFoundationDomain: Claude Code

Question 7. A team wants Claude Code to follow the build commands and coding conventions of one repository for everyone who clones it. One developer also wants personal notes for this project, such as the URL of a private sandbox, that should not be shared. Where should each set of instructions go?

  1. Option A: Team instructions in ~/.claude/CLAUDE.md; personal notes in the project's ./CLAUDE.md file
  2. Option B: Team instructions in the managed policy CLAUDE.md; personal notes in .claude/settings.json
  3. Option C: Team instructions in ./CLAUDE.local.md; personal notes in ~/.claude/CLAUDE.md
  4. Option D: Team instructions in ./CLAUDE.md; personal notes in ./CLAUDE.local.md
Show answer and explanation

Correct answer: D. Team instructions in ./CLAUDE.md; personal notes in ./CLAUDE.local.md

Claude Code reads CLAUDE.md and CLAUDE.local.md files while walking up from the working directory and concatenates them rather than letting one override another. Choosing the right scope decides who sees an instruction: the organisation, the team, only you in every project, or only you in this project.

  • A (incorrect)~/.claude/CLAUDE.md applies only to one user across all projects, and ./CLAUDE.md is the file shared with the team.
  • B (incorrect)Managed policy files are organisation-wide instructions maintained by IT, and .claude/settings.json holds settings, not instructions, and is meant to be committed.
  • C (incorrect)This is reversed: CLAUDE.local.md is for personal project notes, and the user file would apply the notes to every project.
  • D (correct)Correct. ./CLAUDE.md (or ./.claude/CLAUDE.md) holds project instructions shared through source control, while CLAUDE.local.md is for personal project-specific preferences and belongs in .gitignore.

Reference: Claude Code Docs: How Claude remembers your project (opens in a new tab)

Domain 4

Eval, Testing, and Debugging

Debugging and Error HandlingIntermediateDomain: Eval, Testing, and Debugging

Question 8. Your service logs show three kinds of failed Messages API calls: 400 invalid_request_error, 401 authentication_error and 529 overloaded_error. Which handling is appropriate?

  1. Option A: Retry all three with exponential backoff, since any of them may be temporary
  2. Option B: Never retry; return every error to the user immediately
  3. Option C: Retry only the 400 errors after automatically shortening the prompt
  4. Option D: Retry the 529s with backoff; fix the request (400) and the key (401)
Show answer and explanation

Correct answer: D. Retry the 529s with backoff; fix the request (400) and the key (401)

Separating transient errors from integration bugs is the first step in isolating where a problem comes from. The official SDK already retries connection errors, rate limits and 5xx errors with exponential backoff (twice by default), and every response carries a request-id to quote when contacting support.

  • A (incorrect)A malformed request or a revoked or expired key fails the same way on every retry; retrying only adds load and delay.
  • B (incorrect)This throws away easy recoveries: an overloaded API is a temporary condition that usually clears.
  • C (incorrect)invalid_request_error covers many problems with request format or content; shortening the prompt fixes only one possible cause, and the 529s are left unhandled.
  • D (correct)Correct. 529 means the API is temporarily overloaded, while 400 and 401 point to problems in the request or the credentials that a retry cannot solve.

Reference: Claude Platform Docs: Errors (opens in a new tab)

Domain 5

Model Selection and Optimization

Cost and Token ManagementAdvancedDomain: Model Selection and Optimization

Question 9. An application sends a 6,000-token system prompt plus tool definitions with every request and marks the end of the system prompt with cache_control. The usage field shows cache_creation_input_tokens on every request, and cache_read_input_tokens is always 0. Last week a developer added the current timestamp as the first line of the system prompt. What is the most likely cause?

  1. Option A: The system prompt is shorter than the minimum length that can be cached
  2. Option B: Prompt caching only covers the messages array, never the system prompt
  3. Option C: The timestamp changes the start of the prompt, so the cached prefix never matches
  4. Option D: cache_control must be placed on the final user message before any caching happens
Show answer and explanation

Correct answer: C. The timestamp changes the start of the prompt, so the cached prefix never matches

Changes at one level invalidate that level and everything after it, so volatile content near the start of a prompt defeats caching. Keep stable content (tools, system instructions, reference documents) first and per-request content last, then confirm hits with cache_read_input_tokens.

  • A (incorrect)The documented minimums are a few thousand tokens at most, and a too-short prompt would show no cache writes at all rather than a write on every request.
  • B (incorrect)Cache prefixes are built from tools, then system, then messages, so a system prompt can be cached.
  • C (correct)Correct. Cache hits require 100% identical prompt segments up to the breakpoint; moving the variable timestamp after the cached block restores cache reads.
  • D (incorrect)A breakpoint can be placed on the system prompt; caching covers everything up to and including the block that carries cache_control.

Reference: Claude Platform Docs: Prompt caching (opens in a new tab)

LLM FundamentalsIntermediateDomain: Model Selection and Optimization

Question 10. A feature extracts three fields from short, clean invoices. Quality is already good, but latency and token usage are higher than needed. Without changing the model, which adjustment should you try first?

  1. Option A: Set output_config.effort to "low" and test the quality
  2. Option B: Raise max_tokens so the response always completes in one pass
  3. Option C: Set effort to "max" so Claude reaches the answer with fewer steps
  4. Option D: Pass "adaptive" as the effort value so Claude decides how much to think
Show answer and explanation

Correct answer: A. Set output_config.effort to "low" and test the quality

Effort is a behavioural signal that trades thoroughness for token efficiency on the same model. Because its impact varies by task, the documented practice is to measure quality on representative inputs before deploying a lower setting.

  • A (correct)Correct. Lower effort reduces token spend across text, tool calls and thinking, and the documentation recommends low effort for speed-sensitive or simple tasks, after evaluating on your own use case.
  • B (incorrect)max_tokens is a ceiling on output length; raising it does not make a response faster or cheaper.
  • C (incorrect)max effort removes constraints on token spending, which moves latency and cost in the wrong direction.
  • D (incorrect)adaptive is a thinking mode, not an effort value, and the documentation says not to pass it as one.

Reference: Claude Platform Docs: Effort (opens in a new tab)

Domain 6

Prompt and Context Engineering

Prompt EngineeringFoundationDomain: Prompt and Context Engineering

Question 11. You send Claude five contracts of about 10,000 tokens each together with the question "Which contracts allow termination for convenience?". Which prompt layout follows Anthropic's long-context guidance?

  1. Option A: The question first, then the contracts, so Claude knows what to look for while reading
  2. Option B: Contracts first, each in its own document tags with source metadata, question last
  3. Option C: All five contracts pasted as one block without separators, followed by the question
  4. Option D: A separate call that shortens each contract to 200 tokens, then the summaries and the question
Show answer and explanation

Correct answer: B. Contracts first, each in its own document tags with source metadata, question last

For inputs of roughly 20,000 tokens or more, Anthropic suggests long-form data at the top, a clear query at the end and per-document XML structure. Asking Claude to quote the relevant clauses before answering further grounds the result.

  • A (incorrect)Anthropic recommends the opposite order: long documents at the top and the query at the end.
  • B (correct)Correct. Long inputs go above the query, and XML tags (document, source, document_content) keep multiple documents distinct; queries at the end can improve response quality by up to 30% in Anthropic's tests.
  • C (incorrect)Putting the question last is right, but without structure Claude cannot reliably tell which clause belongs to which contract.
  • D (incorrect)The inputs fit comfortably in the context window, and lossy summaries can drop exactly the clause the question is about.

Reference: Claude Platform Docs: Long context prompting tips (opens in a new tab)

Output HandlingAdvancedDomain: Prompt and Context Engineering

Question 12. A pipeline uses JSON outputs (output_config.format with a json_schema) to extract order data. On rare occasions the JSON fails to parse or required fields are missing. What should the code check before parsing?

  1. Option A: Nothing extra: constrained decoding guarantees schema-valid output in every case
  2. Option B: Whether the response contains a thinking block, and discard it if it does
  3. Option C: Whether stop_reason is "refusal" or "max_tokens" before trusting the JSON
  4. Option D: Whether string enum values match the schema's capitalisation exactly, and reject the response if not
Show answer and explanation

Correct answer: C. Whether stop_reason is "refusal" or "max_tokens" before trusting the JSON

Defensive parsing means checking why generation stopped before trusting the payload. Handle refusal and max_tokens explicitly (for example by retrying with a higher max_tokens or routing to review) instead of assuming the schema always holds.

  • A (incorrect)The documentation says compliance is guaranteed in most cases but lists scenarios where the output might not match the schema.
  • B (incorrect)Thinking blocks are separate from the text block that carries the JSON and do not explain truncated or missing fields.
  • C (correct)Correct. In both cases the output might not match the schema: a refusal takes precedence over schema constraints, and a response cut off at max_tokens can be incomplete.
  • D (incorrect)Capitalisation of enum values is not guaranteed, so the documentation suggests comparing case-insensitively rather than rejecting the response.

Reference: Claude Platform Docs: Structured outputs (opens in a new tab)

Domain 7

Security and Safety

Claude HooksIntermediateDomain: Security and Safety

Question 13. A team wants Claude Code to refuse any Bash command containing "rm -rf" in their repository, for every developer and regardless of what Claude decides. Which setup achieves this?

  1. Option A: Add the line "Never run rm -rf" to the project's CLAUDE.md
  2. Option B: A PostToolUse hook on Bash that exits with code 2 when the command contains rm -rf
  3. Option C: A PreToolUse hook in ~/.claude/settings.json that prints a warning to stderr and exits with code 0
  4. Option D: A PreToolUse hook on Bash in .claude/settings.json that exits with code 2
Show answer and explanation

Correct answer: D. A PreToolUse hook on Bash in .claude/settings.json that exits with code 2

Hooks turn a rule into a deterministic guardrail that runs outside the model. A PreToolUse hook can also return JSON with permissionDecision "deny" and a reason; either way the destructive command never executes.

  • A (incorrect)CLAUDE.md is context that guides Claude's behaviour; it does not deterministically stop a tool call.
  • B (incorrect)PostToolUse runs after the tool call has succeeded, so the deletion has already happened.
  • C (incorrect)Exit code 0 lets the action go ahead and Claude never sees stderr from a hook that exits 0; a user settings file is also not shared with the team.
  • D (correct)Correct. PreToolUse can block a tool call; exiting with code 2 stops it and the reason written to stderr is passed back to Claude, and .claude/settings.json can be committed to the repository.

Reference: Claude Code Docs: Hooks reference (opens in a new tab)

Domain 8

Tools and MCPs

Tool ImplementationFoundationDomain: Tools and MCPs

Question 14. An application defines two tools, search_orders and search_invoices, each with a one-line description. Claude often calls search_orders for questions about invoices. What is the most effective first fix?

  1. Option A: Rewrite both descriptions in detail, including when to use and not use each tool
  2. Option B: Set tool_choice to force search_invoices whenever a question mentions invoices
  3. Option C: Remove the descriptions so Claude relies on the tool names alone
  4. Option D: Add strict: true to both tool definitions
Show answer and explanation

Correct answer: A. Rewrite both descriptions in detail, including when to use and not use each tool

Claude decides whether and which tool to call from the descriptions it is given. Explaining the boundary between similar tools, with the caveats and limits of each, is the cheapest and most reliable fix before changing anything else.

  • A (correct)Correct. Anthropic calls detailed descriptions by far the most important factor in tool performance and suggests at least 3 to 4 sentences per tool.
  • B (incorrect)Forcing a tool takes the choice away from Claude, misfires on mixed questions, and the documentation notes that forced tool choice is not supported on some current models.
  • C (incorrect)Less information makes selection harder, not easier.
  • D (incorrect)Strict tool use guarantees that tool inputs match the schema. It does not help Claude decide which of two similar tools fits a question.

Reference: Claude Platform Docs: Define tools (opens in a new tab)

MCP Server DevelopmentIntermediateDomain: Tools and MCPs

Question 15. Your team built an MCP server that wraps the internal ticketing API and runs as a hosted service. Everyone who works in the repository should get it in Claude Code without configuring it themselves. Which setup fits?

  1. Option A: Add it with --transport stdio at user scope on each developer's machine
  2. Option B: Add it with --transport sse at local scope in the repository folder
  3. Option C: Add it with --transport http at project scope (.mcp.json)
  4. Option D: Add it with --transport http at local scope and commit the developer's ~/.claude.json
Show answer and explanation

Correct answer: C. Add it with --transport http at project scope (.mcp.json)

Transport follows where the server runs (stdio for a local process, HTTP for a remote service), and scope follows who should get it (local, project or user). For security, Claude Code prompts before using project-scoped servers from .mcp.json in interactive sessions.

  • A (incorrect)stdio servers run as local processes on your own machine, and user scope is private to one user account.
  • B (incorrect)The SSE transport is deprecated in favour of HTTP, and local scope keeps the server private to you in one project.
  • C (correct)Correct. HTTP is the recommended transport for remote servers, and project scope writes it to .mcp.json in the repository root, sharing the configuration through version control; interactive sessions ask each developer to approve it.
  • D (incorrect)~/.claude.json lives in the home directory and holds personal configuration; it is not part of the repository.

Reference: Claude Code Docs: Connect Claude Code to tools via MCP (opens in a new tab)

Want more practice?

15 questions are a sample. The exam is 53 items items.

The full CertRamp Claude Certified Developer (CCDV-F) practice exams have 6 tests that grow with you, from a diagnostic start to an exam-level Test 4 and a challenge set beyond the exam, with an explanation for every option.

Who writes the exams

Written by a practitioner, not a question mill

Joshua Ravnjak, founder of CertRamp Learning

Joshua Ravnjak

Senior Consultant, digital transformation and AI

Founder, CertRamp Learning

921 learners and 61 reviews on Udemy (as of November 3, 2026)

I have more than 12 years of professional experience and work as a senior consultant in an IT management consultancy, focusing on digital transformation, AI and requirements engineering in the insurance industry. I have earned many certifications myself, so I know what exam preparation feels like. That is why every CertRamp practice exam follows the same progression: an easy start to see where you stand, then real exam level, then beyond it. You walk into the exam with a buffer and a good feeling.

Selected certifications

  • IREB® CPRE Foundation Level
  • ITIL® 4 Foundation
  • Professional Scrum Master I (PSM I)
  • Professional Scrum Product Owner I (PSPO I)
  • Certified SAFe® 6 Scrum Master
  • Certified AI-Empowered SAFe® 6 Product Owner/Product Manager

Plus further certifications from Microsoft and Anthropic (Claude).

ITIL® is a registered trademark of PeopleCert. IREB® is a registered trademark of IREB e.V. SAFe® is a registered trademark of Scaled Agile, Inc. PSM and PSPO are trademarks of Scrum.org.

Also in print

Cover: CPRE Foundation Level Prüfungsvorbereitung 2026 by Joshua Ravnjak

CPRE Foundation Level Prüfungsvorbereitung 2026

6 Übungsprüfungen mit 270 Fragen und ausführlichen Erklärungen

Paperback, German, October 2026

My CPRE Foundation Level exam-prep book (in German) follows the same progressive approach.

View on Amazon (opens in a new tab)