15% of the exam · 9 questions

Context Management & Reliability

Context window management, prompt caching, long conversations, error handling, rate limits, and production reliability.

What this domain covers

This is the largest-weighted material you will face in this area of the Claude Certified Architect exam. Expect scenario-based questions that test whether you can apply these concepts, not just recall them.

  • Context window management and what counts toward it
  • Prompt caching: breakpoints, TTLs, and cost multipliers
  • Compaction and context editing
  • Handling long conversations with summarization and memory
  • Escalation patterns and error propagation
  • Rate limits, retries with backoff, and overloaded errors
  • Observability and graceful degradation

Free practice questions: Context Management & Reliability

8 original, exam-style questions from this domain. Reveal each answer for the full explanation.

Q1Context & Reliabilityfoundation

Which statement best describes what the context window represents for a Claude model?

  • AThe total amount of text the model can reference when generating a response, including the response it generates, functioning as its working memory
  • BThe full corpus of data the model was trained on, which it can recall verbatim at inference time
  • CA server-side cache of previous conversations that Claude automatically searches on each request
  • DThe maximum number of output tokens a single response can contain, controlled by the max_tokens parameter
Show answer & explanation

Answer: A. The total amount of text the model can reference when generating a response, including the response it generates, functioning as its working memory

The docs define the context window as all the text a model can look back on and reference when generating a response, plus the new text it generates, acting as working memory. It is explicitly distinct from the training corpus. The Messages API is stateless and does not maintain a server-side conversation cache, and max_tokens caps output length rather than defining the window.

Read the docs →
Q2Context & Reliabilityfoundation

When the Claude API processes a Messages request, which of the following counts toward the model's context window?

  • AThe system prompt, tool definitions, every message in the conversation (including tool results and documents), and the output Claude generates for the turn, including its extended thinking
  • BOnly the messages array; the system prompt and tool definitions are handled as request metadata outside the context window
  • COnly input tokens; generated output is constrained by max_tokens but does not occupy the context window
  • DOnly tokens that miss the prompt cache; tokens served from the cache are excluded from the context window calculation
Show answer & explanation

Answer: A. The system prompt, tool definitions, every message in the conversation (including tool results and documents), and the output Claude generates for the turn, including its extended thinking

Everything in the request counts toward the window: the system prompt, tool definitions, and all messages including tool results and documents, plus the output generated for the turn, including current-turn thinking. Output shares the same window as input, so max_tokens must fit in the remaining space. Cached tokens still occupy the window; prompt caching changes what you pay for those tokens, not whether they count.

Read the docs →
Q3Context & Reliabilityfoundation

During a long Claude Code session refactoring a large module, a developer runs /compact. What does this command do?

  • AIt summarizes the conversation history and replaces the older transcript with that summary, freeing context so the session can continue
  • BIt deletes the entire conversation history and starts a brand new session with empty context
  • CIt compresses the transcript with a lossless algorithm before sending it, reducing token counts without losing any detail
  • DIt permanently shrinks the model's context window so subsequent requests cost less
Show answer & explanation

Answer: A. It summarizes the conversation history and replaces the older transcript with that summary, freeing context so the session can continue

/compact performs compaction: Claude Code summarizes the conversation and continues from the condensed summary, and you can even steer it with custom instructions such as /compact Focus on code samples and API usage. Wiping the whole history is what /clear does. Summarization is lossy by design, not lossless compression, and the model's context window size is a fixed model property that commands cannot shrink.

Read the docs →
Q4Context & Reliabilityfoundation

What is the standard context window size for Claude Sonnet 4.5 on the Claude API when no long-context beta is enabled?

  • A200,000 tokens
  • B100,000 tokens
  • C500,000 tokens
  • D1,000,000 tokens by default, with no opt-in required
Show answer & explanation

Answer: A. 200,000 tokens

Claude Sonnet 4.5 and most Claude models ship with a 200K token context window as the standard size. A 1M token window exists only for specific models and, for Sonnet 4.5, required opting in through a long-context beta header, so it is not the default. 100K was the ceiling of much older Claude generations, and 500K is not an offered context size.

Read the docs →
Q5Context & Reliabilityfoundation

Which API capability lets a developer measure how many tokens a prompt will consume before actually creating a message?

  • AGET /v1/usage, which returns a token forecast for any prompt passed as a query parameter
  • BAdding dry_run: true to a standard /v1/messages request so the API validates and counts tokens without generating
  • CPOST /v1/tokenize, which returns the raw token IDs the prompt will be encoded into
  • DPOST /v1/messages/count_tokens, which accepts the same request shape as message creation (model, system, tools, messages) and returns an input_tokens count
Show answer & explanation

Answer: D. POST /v1/messages/count_tokens, which accepts the same request shape as message creation (model, system, tools, messages) and returns an input_tokens count

The token counting endpoint mirrors the Messages request structure, including system prompts, tools, images, and PDFs, and returns the total input token count. It is free to use, subject to its own requests-per-minute limits separate from the Messages API, and the count is an estimate that may differ slightly from actual usage. The other two endpoints and the dry_run parameter do not exist in the Claude API.

Read the docs →
Q6Context & Reliabilityfoundation

According to Anthropic's guidance on effective context engineering for agents, what is the guiding principle for deciding what belongs in an agent's context window?

  • AFill the context window as completely as possible, since more context reliably improves accuracy
  • BFind the smallest possible set of high-signal tokens that maximizes the likelihood of the desired outcome
  • CInclude every available tool definition and reference document so the model never lacks information
  • DKeep usage below half the window at all times, because models cannot attend past 50 percent of capacity
Show answer & explanation

Answer: B. Find the smallest possible set of high-signal tokens that maximizes the likelihood of the desired outcome

Anthropic's context engineering guidance states that context must be treated as a finite resource with diminishing marginal returns, and that good context engineering means finding the smallest possible set of high-signal tokens that maximize the likelihood of the desired outcome. Packing the window with everything available degrades recall rather than improving it. There is no documented rule that attention stops at 50 percent of capacity.

Read the docs →
Q7Context & Reliabilityfoundation

Anthropic's context engineering guidance treats context as a finite resource with diminishing marginal returns. Which practice best reflects this principle when building an agent?

  • AFill the context window as completely as possible on every request so the model never lacks information
  • BLoad every potentially relevant document up front, since retrieving context during the task wastes turns
  • CCurate the smallest possible set of high-signal tokens that maximizes the likelihood of the desired outcome
  • DTreat context curation as unnecessary once a model with a larger context window is available
Show answer & explanation

Answer: C. Curate the smallest possible set of high-signal tokens that maximizes the likelihood of the desired outcome

Because model attention degrades as token count grows (a phenomenon the docs call context rot), the guidance is to find the smallest set of high-signal tokens that supports the task. Packing the window, front-loading every document instead of retrieving just in time, and assuming a larger window removes the need for curation all ignore the diminishing returns of added context.

Read the docs →
Q8Context & Reliabilityfoundation

A team is building a structured data extraction pipeline on Claude Sonnet 4.5 and needs to size its document batches. What is the model's standard context window on the Claude API?

  • A1,000,000 tokens by default, with no beta enrollment or usage tier requirements
  • B200,000 tokens, shared between the input prompt and the generated output
  • C128,000 tokens for input plus a separate 128,000-token budget for output
  • D100,000 tokens, which can be doubled by setting a larger max_tokens value
Show answer & explanation

Answer: B. 200,000 tokens, shared between the input prompt and the generated output

Claude Sonnet 4.5 has a standard 200k-token context window that holds both the input and the output the model generates. The 1M token window is a separate beta capability limited to eligible models and higher usage tiers, not a default. The window is a single shared budget rather than separate input and output pools, and max_tokens caps output length without enlarging the window.

Read the docs →

Drill this domain in Claude Prep

The app has dozens more questions in this domain alone, plus a Domain Drill mode that focuses your practice exactly here, and full mock exams that weight it at 15%.

The other exam domains