Deutsch

Context window

Checked 26 October 2026 · by A.Frick

In shortThe context window is the maximum amount of text, counted in tokens, that a model can read and write in one request.

In plain words

The context window is the model's working memory for one request. Anthropic describes it as all the text a model can reference when it writes a response, including the response itself. It is not the model's training data. Everything you send counts: the system prompt, every earlier message, pasted files, tool results and your tool definitions. The answer being written counts too, and so do any thinking tokens.

Context window: everything the model sees in one request System prompt Chat history Your question Room for the answer When the bar is full, old parts are cut or the request fails.
Input and output share the same window.

Sizes depend on the model. Anthropic lists windows of up to 1 million tokens for some of its models and notes that a larger window is not automatically better: as the token count grows, accuracy and recall degrade, an effect it calls context rot. What you put in matters as much as how much fits.

Why it matters

Example

You paste a long report into a chat and ask 30 questions in a row. Every question carries the report, your earlier questions and all earlier answers. By question 30 the request is large and costly, and the model may miss a detail from the middle of the report. Better: start a fresh chat for a new topic, paste only the needed sections, or let a search step pick the passages.

Common misconceptions

Questions and answers

What happens when the context window is full?

With an API, a request whose input exceeds the window is rejected with an error (Anthropic returns a 400 error). Chat apps may drop the oldest messages or summarise them to make room.

Do output tokens count toward the context window?

Yes. The answer the model writes, including thinking tokens, counts toward the same window as your input.

Is a bigger context window always better?

No. Accuracy and recall can degrade as the input grows. Cost also rises, because every token is billed. Send what the task needs.

Read next

  • Token

    A token is a small chunk of text, often a word piece, that an AI model reads, writes and bills.

  • Prompt caching

    Prompt caching lets an AI provider reuse the already processed start of your prompt, so repeated parts are cheaper and faster.

  • RAG (retrieval-augmented generation)

    RAG (retrieval-augmented generation) first looks up relevant passages in your documents, then gives them to the model so it answers from them.

  • Large language model (LLM)

    A large language model (LLM) is an AI system trained on huge amounts of text to predict the next token, which lets it write, summarise and answer.

  • Token estimator: roughly count tokens in your text

    A free tool that estimates how many tokens a text holds. It is a rough guide, not an exact count.

Sources

  1. Anthropic — Context windows
  2. Anthropic — Glossary

Was this page helpful?

Ask a question, report an error or suggest a topic

Stored only to answer or improve this page. No newsletter, no sharing. Privacy