lowob

What Is a Context Window?

A context window is all the text a language model can consider in a single request, including the response it is writing. It works as the model's working memory, separate from what it learned in training, and it is measured in tokens. Current frontier models offer windows of up to a million tokens. Research shows that accuracy falls as inputs grow, so choosing what goes in matters more than how much fits.

Gateway 0ToolingContextRecordReasoningGateway 1Gateway 2Gateway 3
Where this piece sits in The Build Order: the context layer.

What a context window means

A language model has two kinds of knowledge. The first is what it absorbed in training, fixed at a cut-off date. The second is what it is given in the current request. Anthropic's documentation calls the second a "working memory" and defines the context window as everything the model can reference while generating, including its own reply.

The window is measured in tokens. Using OpenAI's English rule of thumb of about 75 words per 100 tokens, a 200,000-token window holds roughly 150,000 words and a million tokens roughly 750,000. These are approximations; each provider's tokeniser counts differently.

When a request is too large, it fails or stops. Anthropic's API returns a "prompt is too long" error if the input alone exceeds the limit. On newer models, if generation reaches the limit mid-reply, the output stops with a specific stop reason.

The context window isThe context window is not
The model's working memory for one requestLong-term memory across sessions
Shared between input and outputReserved space for your documents only
A hard technical limit in tokensA measure of how much the model will use well
Reset for each new request unless history is resentA record of what was decided

How it works, and why it matters for a commercial team

Everything in a request competes for the same space. Anthropic's documentation lists the system prompt, every message, tool results, images, documents and tool definitions as input. The model's output, including any extended thinking, counts too. Cached prompt prefixes still occupy the window; caching changes the price, not the space used.

For an agent this fills up quickly. A sales assistant preparing for a renewal might carry instructions, ten tool definitions, three CRM records, the last email thread and a contract. After several tool calls the window holds everything returned so far. The window resets on the next request, so anything not resent is gone.

Size is not the same as attention. Anthropic's own documentation states that "as token count grows, accuracy and recall degrade", a pattern it calls context rot. Independent research supports this. Liu and colleagues' 2023 paper "Lost in the Middle" tested multi-document question answering and found accuracy was highest when the relevant passage was at the start or end of the input. It dropped when the passage sat in the middle, even for models built for long contexts. Chroma's July 2025 report tested 18 models, including GPT-4.1, Claude 4 and Gemini 2.5, and found models do not use their context uniformly.

The commercial implication is that a bigger window does not remove the need to choose. Pasting a full account history into a million-token window is possible. It is slower, costs more per request and can bury the one fact that matters. In lowob's model, deciding what reaches the model is the job of the wiring stage, the context layer, not the model.

How to fill a context window well

PracticeWhat it means in practice
Retrieve, do not dumpSend the five relevant records, not the whole CRM export
Put key material at the edgesInstructions and the decisive facts at the start or end
Count before you sendUse the provider's token counter to estimate size
Compact long conversationsSummarise earlier turns, keeping decisions and open questions
Keep tool results shortReturn the fields needed, not full records
Store the decision outsideWrite outcomes to a record; the window forgets them

A common mistake is treating the window as memory. A conversation that ran yesterday is not in today's window unless something resends it. Another is choosing a model for its window size alone. A model with a smaller window and well-chosen inputs will often beat a larger one fed everything. Test both on your own documents before deciding.

lowob takeaways

  • It is working memory. The window holds one request's inputs and output, then resets.
  • Everything counts. Tool definitions, results and hidden reasoning use the same space.
  • Longer inputs degrade. Accuracy and recall fall as the window fills; position matters.
  • Choose what goes in. Retrieval and a context layer beat a bigger window.

Common questions

What is a context window in AI?

It is the maximum amount of text, measured in tokens, that a model can consider in one request. It includes the prompt, attached material, conversation history and the model's reply.

How big is a 1-million-token context window?

Roughly 750,000 English words, using OpenAI's rule of thumb of about 75 words per 100 tokens. The exact figure depends on the tokeniser and the language.

Does a bigger context window mean better answers?

Not necessarily. Studies show accuracy falls as inputs grow and when relevant facts sit in the middle. Well-chosen inputs usually matter more than size.

Is the context window the same as AI memory?

No. The window is cleared after each request. Memory across sessions needs a separate store that resends relevant information into the window.

Sources and notes

What Is an AI Agent, and Where Does It Fit in the Brain?

Read next in The Build Order