Study guide for the CCA-F context domain: prompt caching, compaction, retrieval, rate limits, retries, circuit breakers and evaluation.
Context Management & Reliability is the smallest domain of the Claude Certified Architect – Foundations blueprint at 15% — about 9 questions on a 60-question form — yet many candidates call it the hardest, because correct answers depend on specific mechanics rather than general intuition.
What the domain covers
Prompt caching. Caching reuses an identical prompt prefix across requests, cutting cost and latency for long, stable content. Order the prompt so stable parts come first — tools, the system prompt, large reference documents — and place the cache breakpoint after them. Anything that changes before the breakpoint, such as a timestamp at the top of the system prompt, causes a cache miss. Caching suits content reused across many requests within the cache lifetime; it is different from caching model responses, which is rarely right for personalised conversations.
Keeping context focused. More context is not always better. Retrieve the sections relevant to a question instead of sending a 900-page manual every time. In long sessions, summarise or remove stale tool results, keep a compact record of established findings where it stays prominent, and compact a long-running task into a summary of decisions, state and next steps before it hits the limit. Durable rules belong in files such as CLAUDE.md, not in conversation history. The API itself is stateless: nothing is remembered between independent conversations unless you send it.
Handling failure at scale. HTTP 429 means rate limited: retry with exponential backoff and jitter, respect any retry-after information and cap attempts. Batch jobs need per-item status and idempotent processing so a failure costs one retry, not a restart, with a dead-letter queue for items that keep failing. When a dependency is degraded, a circuit breaker stops hammering it and switches to a defined degraded mode — a fallback path, a queue or an honest delay message.
Reliability as a measured property. Decide whether a change helped with metrics on comparable inputs: success, escalation and error rates on an evaluation set, then production monitoring. Demos and self-assessment are not evidence.
How questions are framed
Questions often show a cost or latency problem with an obvious-looking but wrong fix, or a reliability failure where the trap is retrying harder. Read for the mechanism: what exactly invalidates the cache, what exactly fills the window, which failures are transient. Answers that are vague ("optimise the prompt") are rarely right in this domain.
Study checklist
Lay out a prompt for caching and point to the content that would break the prefix.
Compact a long session by hand: decisions, current state, open problems, next steps.
Write backoff-with-jitter pseudocode with a retry cap.
Design per-item status tracking for a 10,000-request nightly job.
Define the degraded mode your support agent should enter when the model endpoint is failing.
Domain weights and the 60-question form size come from published summaries of Anthropic's exam guide, which is available to registered partners; see our exam guide page for what is confirmed by Anthropic's public FAQ.
Free sample questions: Context & reliability
Original questions written for practice, not real exam items. Each one appears again, with fresh option order, in the full practice exam.
Sample question 1
Scenario: Customer support resolution agent
Every request to your support agent sends the same 6,000-token system prompt and tool definitions, followed by the conversation. You want lower cost and latency. What should you do?
A. Cache the model's final answers and reuse them when a similar question arrives
B. Move the system prompt into the first user message so it is processed only once
C. Compress the system prompt with a smaller, cheaper model before each request is sent
D. Use prompt caching with a breakpoint after the unchanged tools and system prompt
Show answer and explanation
Answer: D. Prompt caching reuses an identical prefix. The prefix is evaluated in order — tools, then system, then messages — so stable content goes first, stays byte-for-byte identical, and the breakpoint sits after it (the prefix must also meet the model's minimum cacheable length). Reusing answers is response caching, wrong for personalised support. Moving text into messages does not stop it being reprocessed each request, and per-request compression adds cost.
Sample question 2
Scenario: Customer support resolution agent
Cache hit rates are near zero even though prompt caching is enabled. The system prompt begins with "Current time: 10:41:07" followed by long static policies. What is the likely cause and fix?
A. The cache expired; send requests more often so that cache entries never time out
B. The changing timestamp breaks the prefix; move dynamic values after the cache
C. The policies are below the minimum length; pad them so they can be cached
D. Caching ignores system prompts; move the policies into the tool definitions
Show answer and explanation
Answer: B. Caching matches the prompt prefix exactly, so any change before the breakpoint — even a one-second timestamp — causes a miss on every request. Put variable content after the cached portion. Expiry and minimum length are real limits but do not explain near-zero hits with a long static prompt, and system prompts are cacheable.
Sample question 3
Scenario: Code generation with Claude Code
A long agentic coding session approaches the context window limit, but the current task is not finished. What is the most appropriate strategy?
A. Start a fresh session and give it only the original task description again
B. Delete the oldest half of the messages in code, keeping the recent turns intact
C. Compact: summarise decisions, current state and next steps, then continue from it
D. Keep going; the API trims the oldest messages automatically once the limit is hit
Show answer and explanation
Answer: C. Compaction keeps what matters — decisions, state, remaining work — while freeing space; durable rules belong in files. The Messages API does not silently trim for you; requests over the limit fail. Blind deletion can drop key decisions, and restarting from the task description throws away completed work.
Sample question 4
Scenario: Claude Code for continuous integration
Your service calls the Claude API in bursts and sometimes receives HTTP 429 responses. What is the correct client behaviour?
A. Treat 429 as a permanent failure, log it, and drop the affected request
B. Retry with exponential backoff and jitter, honour retry-after, and cap attempts
C. Retry immediately so the request lands as soon as capacity frees up again
D. Open more parallel connections so requests spread across more capacity
Show answer and explanation
Answer: B. 429 means rate limited: back off exponentially, add jitter so clients do not retry in lockstep, honour retry-after when present, and cap attempts. Immediate retries and extra connections increase the load that caused the limit, and dropping requests loses work that would succeed shortly.
The answers hinge on precise mechanics — what breaks a cache prefix, what fills a context window, which errors are retryable — so general AI knowledge is not enough.
Is prompt caching the same as caching responses?
No. Prompt caching reuses the processed prefix of a prompt so new requests with the same prefix are cheaper and faster; the model still generates a fresh response each time.