When is your exam?
Our questions are written for this version of the exam.Our questions are written for the exam up to 6 December. Questions for the new exam are coming soon.
Covers: Anthropic's new CCDV-F exam guide (published 17 November).the guide for exams up to 6 December. Its November re-issue changed only registration and policies.
Answer rules
| Situation | Choose | Not |
|---|---|---|
| A must / never rule | code: schema, handler, hook, approval gate | system-prompt rule (fine for style, format) |
| Connection error, 408, 409, 429, 5xx, 529 | retry (the SDK does it by default) | change the request |
| Any other 4xx | fix the request | retry |
| Retries wanted | SDK max_retries | own loop around the SDK |
| Stream error event, reply fails validation | own bounded retry (SDK can't see these) | SDK retries |
| Harm can't be undone, or user sees it first | prevent it in code before it happens | log + alert |
| Code already stopped it, or a person must act | alert | |
| Several designs work | simplest: workflow, one agent, direct SDK | multi-provider layer |
| Built-in feature fits | use it if ZDR, platform, deadline allow | build your own |
| Model calls a tool wrongly | fix the tool description + schema, return a structured error | system-prompt rule, force the call, add a second tool |
| Working system, one defect | targeted fix, proven by evals, canary | revert all, rebuild |
Same problem, one change, different answer
| Situation | Choose |
|---|---|
JSON won't parse; stop max_tokens on every long input | raise the limit or split the input (a retry cuts the same) |
JSON won't parse; end_turn, now and then | validate, bounded retry or fallback (a higher limit changes nothing) |
| Tag tickets cheaply; dashboard within 10 min | concurrent Messages calls (a fast test batch proves nothing) |
| Nightly batch in place; submitted 01:00, runs 1–4 h, index by 07:00 | poll for ended, alert at 06:00 |
D2 Debug by symptom
| Symptom | Cause → fix · not |
|---|---|
| Cache writes every request, reads 0 | usually something before the breakpoint changes per request (e.g. a timestamp at the top) → move it after the breakpoint; also check calls land within the TTL |
| Batch: cache reads on few requests | gaps between batch requests outlast the 5-min entry → 1-h TTL, optionally warm the cache with one request first (hits stay best-effort) · not sync calls |
| Stream arrives all at once behind a proxy | proxy buffering → turn it off for that route · not longer timeout, compression, HTTP/2 |
| Long streamed answers end mid-sentence, no error | handler ends on the first content_block_stop (it closes one block) and never reads stop_reason → end on message_stop, read stop_reason from message_delta, flag max_tokens · not higher limit, non-streaming, retry short replies |
Stream ends: error event, no message_stop | failed → keep the text, continue via a user turn · not prefill |
| Schema-valid JSON, wrong values | schema guarantees shape, not truth → validate; interacting rules → adaptive thinking · not a reasoning field |
400 naming a tool_use_id after trimming history | orphaned tool_result → start history at a user turn without tool results |
| 400: citations + structured outputs | incompatible → keep citations, build the JSON in code · not drop citations |
| 401 | bad key → new key |
| 403 | no workspace/org access → fix access, stop retrying · not backoff, new key |
429 enforced_spend_limit_reached, no retry-after | org's monthly tier cap → request an increase · not retries, your own Console limit |
529 overloaded_error | load on all users → fallback model, holding reply · not higher tier |
| Your wrapper gets upstream 529 | answer 503 + Retry-After · not 500 + stack trace, 400 |
SDK refuses non-streaming call after max_tokens raised | expected >10 min → streaming helper · not longer HTTP timeout, Batches |
| Same failing tool call repeats | turn cap + repeat detection in code → stop, alert · not a prompt rule, bigger model |
Thinking on, content[0].text breaks | loop blocks, keep type == "text" |
| Retry logic treats every error the same | branch on the class: rate limit (429), overloaded (529), timeout → back off and retry; invalid request (400) → fix it |
Stop reasons
tool_use → run tools, return tool_result, call again; loop on this, not on "has text"
max_tokens → output cut; thinking counts, so hard questions return empty or cut → check before parsing, raise the limit or split; a retry cuts the same
model_context_window_exceeded → window full: long chat stops mid-sentence far below max_tokens → compaction
pause_turn → web search hit 10 rounds → append the reply unchanged, send again
D2 One streamed turn, then the tool loop
message_start | empty assistant message + input usage |
content_block_start | one per block: text, thinking, tool_use (+ id) |
text_delta | show it |
text_delta, replies need a policy check | hold the reply, screen it, then show |
input_json_delta | buffer per block, don't parse yet |
content_block_stop | one block complete → parse the buffered tool input (not the end of the message) |
message_delta | stop_reason + output usage |
message_stop | turn complete (missing → the stream failed) |
stop = tool_use | append the assistant content unchanged, run each tool |
| next user turn | one tool_result per call, same tool_use_id, is_error if it failed → call again |
stop = end_turn | done: show the text blocks |
One-way → SSE · two-way → WebSocket · past the load-balancer timeout → background job + ID · Stop pressed → save partial text as the assistant turn
D2 Retries and reliability
Attempts = retries + 1; layers multiply: own loop (1 + 5 = 6) × SDK (1 + 2 = 3) = 18 attempts → remove the loop, set max_retries
SDK: 2 retries by default (3 attempts) · timeout is per attempt (default 10 min) → worst wait ≈ timeout × attempts
| Reply or fallback within 20 s, normal 3–8 s | per-attempt timeout just above slowest normal (9 s), retries that fit, fallback |
| Peak-hour rate limits | stay under org limits, back off on 429 |
| One tenant starves others | queue per tenant (limits are per org, not per key) |
| Resent payment or side-effect call | one idempotency key per action |
| Trace one failed call | log the SDK request ID |
| Two messages race on one chat | serialise per conversation ID |
D5 Prompt caching: the rules find the biggest cost driver first, then size the saving
| Prefix match | reads need a byte-identical prefix up to the breakpoint; one changed byte voids everything after → static first (tools, system prompt, docs, earlier turns), anything per-request after |
| Lifetime | 5 min by default, each read refreshes it · 1 h when gaps between requests run longer (batches) |
| What it buys | lower cost + time to first token · not more context room |
| Static prefix + doc that changes a few times a day + question | layered: one breakpoint after tools + system prompt, one after the doc, each reused on its own schedule · not one breakpoint after the question (never read) longer TTL |
| Long chats | rolling: breakpoint on the last block each turn |
| One-off doc | don't cache (write costs extra, never read) |
D1 Agents & workflows
Workflow or agent? fixed steps, low error tolerance, strict audit → workflow · open-ended steps → agent · a required action → hook, not the model's choice
| Known steps, one checkable gate | prompt chain with a code check between steps |
| Standard path + rare odd case | workflow, agent only at the decision point |
| Clear input kinds, different handling | routing: classifier → own prompt + tools per kind |
| Many independent items, user waiting | one request per item, concurrent, show each as it lands |
| Costly miss, verdicts vary | parallel voting, block if any flags |
| Checkable rules, repeated errors | evaluator–optimizer, capped |
| Subtasks unknown, or spans domains | orchestrator + specialised subagents |
| Steps loop back on state | graph pattern (not a linear chain) |
| Dependent edits to the same files | one agent, in order |
| Multi-hop question | search tool in a tool-use loop |
| Already on LangGraph etc. | add a Claude node; don't rebuild |
| Approval + audit before a tool runs | your own loop (SDK tool runner executes at once) |
| Approver offline | agent proposes, code runs approved items |
| Long item list, interruptible | progress file, checkpoints |
| Agent loops, never ends | loop on stop_reason, plus a turn cap in code |
| Subtask output floods the main context | run it in a subagent that returns a summary |
Subagent returns only its final message → demand a full report · ignored → fix its description · read-only → tools: Read, Grep, Glob (none = inherits all)
D2 Batches
| Price | 50% off; stacks with cache reads |
| Processing | most <1 h, only 24 h promised; unfinished requests then expire |
| User waiting, minutes window | sync calls |
| New hard deadline under 24 h | sync calls, or a batch whose sync fallback still fits |
| Existing nightly batch | poll until processing_status = ended, alert before the deadline |
| Results | any order → match custom_id; kept 29 days |
| Errored or expired requests | resubmit only those (not billed); to sync if the deadline is near |
| Restart-safe | persist the batch ID at creation |
D2 Surfaces, config and SDLC
| Only Claude, no portability need | direct SDK |
| Existing async service | async client (AsyncAnthropic), awaited calls · not a thread pool, not blocking calls |
| Contract forces Bedrock | Bedrock, logic provider-neutral |
| Same code on several platforms | model name in config + per-platform ID table |
| Prompts, model IDs, plugin versions per env | one version-controlled source, reviewed in PRs; pin model versions, CI runs the evals on each change |
| Deprecated parameter, 40 call sites | regression tests, migrate in batches |
| Schema change | add an optional field, don't rename |
| Session lifecycle | per-session expiry + reset on events (logout, task done, tenant switch) |
| Show the exact past reply years later | save reply + full request when sent (pinning can't regenerate it) |
| Cost split + ceiling per product and env | a workspace each: own keys, spend limit, cost report (not separate orgs) |
| Retiring a feature | disable the key first (reversible), erase personal data, archive prompts; delete after a quiet month |
| Small team, shared style guide | Team plan + shared Project |
"What do you do FIRST?"
| Business goal ("memos faster") | derive functional + infrastructure requirements |
| "Use the best model", no targets | ask for quality, latency, cost targets |
| Two qualities trade off | decide which matters, validate on real data |
| Wrong, refused or inconsistent output | read full traces, diff good vs bad runs |
| Costs rising, no breakdown | log usage per feature |
| Key leaked | revoke it, then deploy a new one (not a history rewrite) |
D5 Model selection & cost
| Simple, high volume, tight latency | small fast model (Haiku) |
| A miss is very costly | eval on labelled data, deploy the one missing least |
| Small model fine, hard cases mid-task | advisor tool: consults a stronger model |
| Compare two setups | total cost per solved task incl. retries, not token price |
| New model better, breaks format | adapt prompt, re-eval, roll out behind a flag |
| Planning a model upgrade | stay pinned, run the regression evals on the new one before switching |
| Simple requests slow on adaptive thinking | effort low (lower max_tokens just cuts it) |
| Faster long output, no quality loss, higher price OK | fast mode (some models only, premium price) · not lower effort, smaller model, caching |
| Reruns differ | normal sampling → validation, retries |
| After the cutoff | docs in context |
| Exact counts | a tool |
temperature = randomness, not context size
Output costs more than input → price both · thinking billed in full in output_tokens, even when summarised
Quote before sending → token counting endpoint (free), same model
D6 Prompt & context engineering
Prompt revision: the regression eval shows the gap → revise → the failing case joins the suite, so it stays fixed
| Labelled examples, edge cases | few-shot in the prompt (not fine-tuning) |
| Instructions scattered | behaviour in system prompt; user turn = input |
| Prompt full of contradictions | audit and refactor, not more rules |
| CAPS "NEVER" misfires | state the reason and audience |
| "No markdown" ignored | describe the target style |
| Good in claude.ai, poor via API | add format rules + today's date (API has no app prompt) |
| Long document + questions | document first in tags, question last |
| Images | image before text, labelled "Image 1/2" |
| Invented clause numbers | quote relevant passages first, answer from them |
| Focus lost after many tool calls | prune old tool output |
| Long chat | server-side compaction |
| Step must not see history | subagent isolation |
| Customer across chats | memory tool |
| Corpus ≫ window | retrieve the few relevant passages |
| Field may be absent | allow null + route to review |
| Downstream code needs valid JSON | structured outputs with a strict schema; validate; parse any free-text fallback defensively |
Grounding and citations
| Answer only from supplied documents | docs in the request, cite the source, say "not found" when they don't hold the answer |
| Small, stable document set | all of it in context (+ cache) |
| Large, costly or often-changing corpus | retrieve only the relevant passages |
D7 Security & safety
Layered guardrails: never prompt-only, model-only or output-only · destructive actions blocked in code (hook, least privilege), so injected text can't run them
| Untrusted input | validate, sanitise, mark as data |
| Secrets must not reach Claude | redact at your app boundary |
| Injection can send mail | send becomes a draft the user approves |
Model fills customer_id | drop it from the schema; handler uses the signed-in user |
| Generated code steered by data | sandbox: no secrets, network off |
| Nuanced content policy | output classifier per reply, hold flagged |
| Absolute content ban | deterministic output filter before users |
| Confident but wrong | validate against sources before use |
| Block a tool call | PreToolUse hook (beats allow and bypassPermissions); static rule → settings deny |
| Key for a mobile or browser app | your backend proxies the calls and holds the key · not key in the client |
| App calls Claude | workspace-scoped API key · admin keys manage the org, never ship them |
| Dev, staging, prod | a key per environment, secrets manager, rotate, monitor usage |
SDK permission order: hooks → deny → ask → mode → allow → canUseTool (pre-allowed tools never reach it)
D8 Tools & MCP
| Fixed set of values | string enum in a strict tool (min/max, minLength/maxLength → 400) |
| Name passed where an ID belongs | description names the ID, its format, an example, "ask if missing"; the error names the expected format |
| Dates land wrong | describe ISO 8601 + example; reject others with is_error |
| Long IDs copied wrong | names + short refs, map to the ID in the tool |
| Wide results bury facts | task fields by default, response_format for detail |
| Overlapping tools | consolidate, remove unused, distinct descriptions |
| Dozens of tools, all used, wrong picks | defer_loading + tool search tool |
| Hundreds of calls to aggregate | programmatic tool calling |
| Built-in tool nearly fits | FIRST judge whether extending it covers the gap |
| Reused by several teams | Skill or MCP server (not copied code, not a shared library) |
The description says when to call · strict checks types, not meaning
tool_choice any/tool → 400 on the newest models, and on any model with manual thinking → auto + strict
disable_parallel_tool_use = at most one tool call per reply
Which mechanism?
| Anthropic runs it (web search, code execution) | built-in tool |
| Your system, your code, one app | custom tool |
| Procedure + files Claude loads when relevant | Skill |
| Live system shared by many clients and teams | MCP server, maintained by its owner |
D2 Files, PDFs, platforms
| Same big file re-sent, upload slow | Files API once, send file_id |
| Text-only PDFs, input cost high | send extracted text (a PDF page bills text + image) |
| ZDR | sync Messages, inline content (Files API, Batches, code execution, MCP connector, Managed Agents store data) |
| Bedrock / Vertex AI (Google-managed) | images + PDFs as base64 only; no Files API |
| Foundry hosted on Azure | no Files API, no Batches → inline + cache (Anthropic-hosted: data leaves Azure) |
D1 Agent SDK vs Managed Agents
Agent SDK = library you host · resume one customer → save the session ID, pass to resume (continue_conversation = latest in the folder)
Managed Agents: no servers, multi-hour runs · files stay in your network → self-hosted sandbox (conversation and tool results still reach Anthropic) · ZDR → Agent SDK on your cluster · bad prompt shipped → pin sessions to an agent version
Code execution container: no internet, no pip install
D5 Prompt caching: numbers
Write 1.25× (5 min) or 2× (1 h) · read 0.1× or less, by model · max 4 breakpoints · under the minimum length (512–4,096 tokens by model) cache fields read 0, no error
Dashboard below invoice → track input, cache-write and cache-read tokens apart
D8 MCP
| Tools / Resources / Prompts | model calls · app attaches · user starts (template + arguments) |
| Local server for Claude Code | stdio; logs to stderr (stdout = JSON-RPC) |
| Many users, per-user access | remote Streamable HTTP + OAuth (auth on the server, not in the prompt) |
| claude.ai connector can't reach server | allowlist Anthropic's outbound IP ranges (VPN won't help) |
D3 Claude Code
Surfaces: CLI, desktop, IDE, web, mobile · permission modes include default, acceptEdits, plan, bypassPermissions
| Team standards, one repo | CLAUDE.md at root, committed |
| Personal, one repo | CLAUDE.local.md / .claude/settings.local.json |
| Team permissions, model, env | .claude/settings.json, committed |
| Plugin on for one repo | enable it in that repo's .claude/settings.json |
| Shared MCP server, personal tokens | commit .mcp.json with Bearer ${TOKEN} |
| CI, no prompts | headless mode, permissions in settings |
Precedence: managed > command line > local > project > user · name clash → /plugin-name:command
Which extension?
| Must always happen (block a path, format on edit) | hook |
| Procedure Claude loads when the task calls for it | Skill |
| Conventions for some paths only | Rules file |
| Specialist task, own context and tools | subagent |
| Prompt a person runs by name | slash command |
| Ship any of these to other teams | plugin, from a marketplace |
D4 Eval, testing & debugging
| Measure a stated quality goal | golden set (inputs + expected outputs) + a metric for that goal |
| Open-ended output | LLM-as-judge, calibrated against human labels before you trust it |
| Behaviour that used to work | regression tests on every change |
| Must / must-not behaviour | behavioural checks |
Failure mode → fix the cause
| Raw API response right, app shows it wrong | integration layer: fix your code |
| Hallucination | ground in supplied docs, cite, allow "not found" |
| Refusal | read the request + system prompt for what set it off |
| Under-acting (stops early, skips tools) | clearer tool descriptions, say when to act |
| Context loss in long runs | compaction, pruning, a state file |
| Format drift, inconsistent output | structured outputs, examples, validation |
Testing strategy → unit (functions) + integration (the Claude integration) + end-to-end (critical flows) · not one level only
Category underperforms → iterate the prompt, validate with evals
JSON drifts after many turns → context management + validation
Quality fell over many commits → git bisect with the eval as test
Eval set predates new traffic → canary a small live share
AI wrote code + tests → tests must fail with the change reverted
Errors all same severity → rank by impact → page vs log
Answer rules
| Situation | Choose | Not |
|---|---|---|
| A must / never rule | code: schema, handler, hook, approval gate | system-prompt rule (fine for style, format) |
| Connection error, 408, 409, 429, 5xx, 529 | retry (the SDK does it by default) | change the request |
| Any other 4xx | fix the request | retry |
| Retries wanted | SDK max_retries | own loop around the SDK |
| Stream error event, reply fails validation | own bounded retry (SDK can't see these) | SDK retries |
| Harm can't be undone, or user sees it first | prevent it in code before it happens | log + alert |
| Code already stopped it, or a person must act | alert | |
| Several designs work | simplest: workflow, one agent, direct SDK | multi-provider layer |
| Built-in feature fits | use it if ZDR, platform, deadline allow | build your own |
| Working system, one defect | targeted fix, proven by evals, canary | revert all, rebuild |
Same problem, one change, different answer
| Situation | Choose |
|---|---|
JSON won't parse; stop max_tokens on every long input | raise the limit or split the input (a retry cuts the same) |
JSON won't parse; end_turn, now and then | validate, bounded retry or fallback (a higher limit changes nothing) |
| Tag tickets cheaply; dashboard within 10 min | concurrent Messages calls (a fast test batch proves nothing) |
| Nightly batch in place; submitted 01:00, runs 1–4 h, index by 07:00 | poll for ended, alert at 06:00 |
D2 Debug by symptom
| Symptom | Cause → fix · not |
|---|---|
| Cache writes every request, reads 0 | usually something before the breakpoint changes per request (e.g. a timestamp at the top) → move it after the breakpoint; also check calls land within the TTL |
| Batch: cache reads on few requests | gaps between batch requests outlast the 5-min entry → 1-h TTL, optionally warm the cache with one request first (hits stay best-effort) · not sync calls |
| Stream arrives all at once behind a proxy | proxy buffering → turn it off for that route · not longer timeout, compression, HTTP/2 |
Stream ends: error event, no message_stop | failed → keep the text, continue via a user turn · not prefill |
| Schema-valid JSON, wrong values | schema guarantees shape, not truth → validate; interacting rules → adaptive thinking · not a reasoning field |
400 naming a tool_use_id after trimming history | orphaned tool_result → start history at a user turn without tool results |
| 400: citations + structured outputs | incompatible → keep citations, build the JSON in code · not drop citations |
| 401 | bad key → new key |
| 403 | no workspace/org access → fix access, stop retrying · not backoff, new key |
429 enforced_spend_limit_reached, no retry-after | org's monthly tier cap → request an increase · not retries, your own Console limit |
529 overloaded_error | load on all users → fallback model, holding reply · not higher tier |
| Your wrapper gets upstream 529 | answer 503 + Retry-After · not 500 + stack trace, 400 |
SDK refuses non-streaming call after max_tokens raised | expected >10 min → streaming helper · not longer HTTP timeout, Batches |
| Same failing tool call repeats | turn cap + repeat detection in code → stop, alert · not a prompt rule, bigger model |
Thinking on, content[0].text breaks | loop blocks, keep type == "text" |
Stop reasons
tool_use → run tools, return tool_result, call again; loop on this, not on "has text"
max_tokens → output cut; thinking counts, so hard questions return empty or cut → check before parsing, raise the limit or split; a retry cuts the same
model_context_window_exceeded → window full: long chat stops mid-sentence far below max_tokens → compaction
pause_turn → web search hit 10 rounds → append the reply unchanged, send again
D2 One streamed turn, then the tool loop
message_start | empty assistant message + input usage |
content_block_start | one per block: text, thinking, tool_use (+ id) |
text_delta | show it |
text_delta, replies need a policy check | hold the reply, screen it, then show |
input_json_delta | buffer per block, don't parse yet |
content_block_stop | block complete → parse the buffered tool input |
message_delta | stop_reason + output usage |
message_stop | turn complete (missing → the stream failed) |
stop = tool_use | append the assistant content unchanged, run each tool |
| next user turn | one tool_result per call, same tool_use_id, is_error if it failed → call again |
stop = end_turn | done: show the text blocks |
One-way → SSE · two-way → WebSocket · past the load-balancer timeout → background job + ID · Stop pressed → save partial text as the assistant turn
D2 Retries and reliability
Attempts = retries + 1; layers multiply: own loop (1 + 5 = 6) × SDK (1 + 2 = 3) = 18 attempts → remove the loop, set max_retries
SDK: 2 retries by default (3 attempts) · timeout is per attempt (default 10 min) → worst wait ≈ timeout × attempts
| Reply or fallback within 20 s, normal 3–8 s | per-attempt timeout just above slowest normal (9 s), retries that fit, fallback |
| Peak-hour rate limits | stay under org limits, back off on 429 |
| One tenant starves others | queue per tenant (limits are per org, not per key) |
| Resent payment or side-effect call | one idempotency key per action |
| Trace one failed call | log the SDK request ID |
| Two messages race on one chat | serialise per conversation ID |
D5 Prompt caching: the rules
| Prefix match | reads need a byte-identical prefix up to the breakpoint; one changed byte voids everything after → static first (tools, system prompt, docs, earlier turns), anything per-request after |
| Lifetime | 5 min by default, each read refreshes it · 1 h when gaps between requests run longer (batches) |
| What it buys | lower cost + time to first token · not more context room |
| Long chats | breakpoint on the last block each turn |
| One-off doc | don't cache (write costs extra, never read) |
D1 Agents & workflows
| Known steps, one checkable gate | prompt chain with a code check between steps |
| Standard path + rare odd case | workflow, agent only at the decision point |
| Clear input kinds, different handling | routing: classifier → own prompt + tools per kind |
| Many independent items, user waiting | one request per item, concurrent, show each as it lands |
| Costly miss, verdicts vary | parallel voting, block if any flags |
| Checkable rules, repeated errors | evaluator–optimizer, capped |
| Subtasks unknown, or spans domains | orchestrator + specialised subagents |
| Steps loop back on state | graph pattern (not a linear chain) |
| Dependent edits to the same files | one agent, in order |
| Multi-hop question | search tool in a tool-use loop |
| Already on LangGraph etc. | add a Claude node; don't rebuild |
| Approval + audit before a tool runs | your own loop (SDK tool runner executes at once) |
| Approver offline | agent proposes, code runs approved items |
| Long item list, interruptible | progress file, checkpoints |
Subagent returns only its final message → demand a full report · ignored → fix its description · read-only → tools: Read, Grep, Glob (none = inherits all)
D2 Batches
| Price | 50% off; stacks with cache reads |
| Processing | most <1 h, only 24 h promised; unfinished requests then expire |
| User waiting, minutes window | sync calls |
| New hard deadline under 24 h | sync calls, or a batch whose sync fallback still fits |
| Existing nightly batch | poll until processing_status = ended, alert before the deadline |
| Results | any order → match custom_id; kept 29 days |
| Errored or expired requests | resubmit only those (not billed); to sync if the deadline is near |
| Restart-safe | persist the batch ID at creation |
D2 Design and lifecycle
| Only Claude, no portability need | direct SDK |
| Existing async service | async client (AsyncAnthropic), awaited calls · not a thread pool, not blocking calls |
| Contract forces Bedrock | Bedrock, logic provider-neutral |
| Same code on several platforms | model name in config + per-platform ID table |
| Prompts, model IDs, plugin versions per env | one version-controlled source, reviewed in PRs |
| Deprecated parameter, 40 call sites | regression tests, migrate in batches |
| Schema change | add an optional field, don't rename |
| Session lifecycle | per-session expiry + reset on events (logout, task done, tenant switch) |
| Show the exact past reply years later | save reply + full request when sent (pinning can't regenerate it) |
| Cost split + ceiling per product and env | a workspace each: own keys, spend limit, cost report (not separate orgs) |
| Retiring a feature | disable the key first (reversible), erase personal data, archive prompts; delete after a quiet month |
| Small team, shared style guide | Team plan + shared Project |
"What do you do FIRST?"
| Business goal ("memos faster") | derive functional + infrastructure requirements |
| "Use the best model", no targets | ask for quality, latency, cost targets |
| Two qualities trade off | decide which matters, validate on real data |
| Wrong, refused or inconsistent output | read full traces, diff good vs bad runs |
| Costs rising, no breakdown | log usage per feature |
| Key leaked | revoke it, then deploy a new one (not a history rewrite) |
D5 Model selection & cost
| Simple, high volume, tight latency | small fast model (Haiku) |
| A miss is very costly | eval on labelled data, deploy the one missing least |
| Small model fine, hard cases mid-task | advisor tool: consults a stronger model |
| Compare two setups | total cost per solved task incl. retries, not token price |
| New model better, breaks format | adapt prompt, re-eval, roll out behind a flag |
| Simple requests slow on adaptive thinking | effort low (lower max_tokens just cuts it) |
| Faster long output, no quality loss, higher price OK | fast mode (some models only, premium price) · not lower effort, smaller model, caching |
| Reruns differ | normal sampling → validation, retries |
| After the cutoff | docs in context |
| Exact counts | a tool |
temperature = randomness, not context size
Output costs more than input → price both · thinking billed in full in output_tokens, even when summarised
Quote before sending → token counting endpoint (free), same model
D6 Prompt & context engineering
| Labelled examples, edge cases | few-shot in the prompt (not fine-tuning) |
| Instructions scattered | behaviour in system prompt; user turn = input |
| Prompt full of contradictions | audit and refactor, not more rules |
| CAPS "NEVER" misfires | state the reason and audience |
| "No markdown" ignored | describe the target style |
| Good in claude.ai, poor via API | add format rules + today's date (API has no app prompt) |
| Long document + questions | document first in tags, question last |
| Images | image before text, labelled "Image 1/2" |
| Invented clause numbers | quote relevant passages first, answer from them |
| Focus lost after many tool calls | prune old tool output |
| Long chat | server-side compaction |
| Step must not see history | subagent isolation |
| Customer across chats | memory tool |
| Corpus ≫ window | retrieve the few relevant passages |
| Field may be absent | allow null + route to review |
D7 Security & safety
Layered guardrails: never prompt-only, model-only or output-only
| Untrusted input | validate, sanitise, mark as data |
| Secrets must not reach Claude | redact at your app boundary |
| Injection can send mail | send becomes a draft the user approves |
Model fills customer_id | drop it from the schema; handler uses the signed-in user |
| Generated code steered by data | sandbox: no secrets, network off |
| Nuanced content policy | output classifier per reply, hold flagged |
| Absolute content ban | deterministic output filter before users |
| Confident but wrong | validate against sources before use |
| Block a tool call | PreToolUse hook (beats allow and bypassPermissions); static rule → settings deny |
| Key for a mobile or browser app | your backend holds it; one key per env, secrets manager |
SDK permission order: hooks → deny → ask → mode → allow → canUseTool (pre-allowed tools never reach it)
D8 Tools & MCP
| Fixed set of values | string enum in a strict tool (min/max, minLength/maxLength → 400) |
| Dates land wrong | describe ISO 8601 + example; reject others with is_error |
| Long IDs copied wrong | names + short refs, map to the ID in the tool |
| Wide results bury facts | task fields by default, response_format for detail |
| Overlapping tools | consolidate, remove unused, distinct descriptions |
| Dozens of tools, all used, wrong picks | defer_loading + tool search tool |
| Hundreds of calls to aggregate | programmatic tool calling |
| Built-in tool nearly fits | FIRST judge whether extending it covers the gap |
| Reused by several teams | Skill or MCP server (not copied code, not a shared library) |
The description says when to call · strict checks types, not meaning
tool_choice any/tool → 400 on the newest models, and on any model with manual thinking → auto + strict
disable_parallel_tool_use = at most one tool call per reply
D2 Files, PDFs, platforms
| Same big file re-sent, upload slow | Files API once, send file_id |
| Text-only PDFs, input cost high | send extracted text (a PDF page bills text + image) |
| ZDR | sync Messages, inline content (Files API, Batches, code execution, MCP connector, Managed Agents store data) |
| Bedrock / Vertex AI (Google-managed) | images + PDFs as base64 only; no Files API |
| Foundry hosted on Azure | no Files API, no Batches → inline + cache (Anthropic-hosted: data leaves Azure) |
D1 Agent SDK vs Managed Agents
Agent SDK = library you host · resume one customer → save the session ID, pass to resume (continue_conversation = latest in the folder)
Managed Agents: no servers, multi-hour runs · files stay in your network → self-hosted sandbox (conversation and tool results still reach Anthropic) · ZDR → Agent SDK on your cluster · bad prompt shipped → pin sessions to an agent version
Code execution container: no internet, no pip install
D5 Prompt caching: numbers
Write 1.25× (5 min) or 2× (1 h) · read 0.1× or less, by model · max 4 breakpoints · under the minimum length (512–4,096 tokens by model) cache fields read 0, no error
Dashboard below invoice → track input, cache-write and cache-read tokens apart
D8 MCP
| Tools / Resources / Prompts | model calls · app attaches · user starts (template + arguments) |
| Local server for Claude Code | stdio; logs to stderr (stdout = JSON-RPC) |
| Many users, per-user access | remote Streamable HTTP + OAuth |
| claude.ai connector can't reach server | allowlist Anthropic's outbound IP ranges (VPN won't help) |
D3 Claude Code
| Team standards, one repo | CLAUDE.md at root, committed |
| Personal, one repo | CLAUDE.local.md / .claude/settings.local.json |
| Team permissions, model, env | .claude/settings.json, committed |
| Plugin on for one repo | enable it in that repo's .claude/settings.json |
| Shared MCP server, personal tokens | commit .mcp.json with Bearer ${TOKEN} |
| CI, no prompts | headless mode, permissions in settings |
Precedence: managed > command line > local > project > user · name clash → /plugin-name:command
D4 Eval, testing & debugging
Testing strategy → unit (functions) + integration (the Claude integration) + end-to-end (critical flows) · not one level only
Category underperforms → iterate the prompt, validate with evals
JSON drifts after many turns → context management + validation
Quality fell over many commits → git bisect with the eval as test
Eval set predates new traffic → canary a small live share
AI wrote code + tests → tests must fail with the change reverted
Errors all same severity → rank by impact → page vs log
Exam facts from the official CCDV-F exam guide, checked November 2026.
Cert Made Easy is independent and not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic, PBC. Our practice questions are exam-style questions we write against the official exam guides (for CCAO-F, CCDV-F and CCAR-P, the guides for exams through 6 December); they are not questions from the real exam.