Context window: what the AI can see at once
The context window is the maximum amount of text, measured in tokens, that an AI model can take into account at one time: your request, attached documents, the conversation history and its own answer. Beyond that limit, part of the content has to be dropped or refused.
Data as of October 22, 2026
Key figures
| Level | Beginner |
|---|---|
| Origin | 2017 |
| Introduced by | Vaswani et al. |
A simple definition
Picture a desk of fixed size. Everything the AI needs to read to answer you has to fit on it: your question, the PDF you attached, previous messages, the tool’s hidden instructions, and room to write the reply. That desk is the context window. Its size is measured in tokens, the small chunks of text a model reads.
Claude’s documentation describes it as the model’s “working memory”, separate from the huge body of data it was trained on, and specifies that the generated response counts too (Anthropic documentation).
A concrete example
You are working through a long conversation to prepare a report: outline, sources, several drafts of each section. After a while, the assistant stops following an instruction you gave at the start. It is not being stubborn: either the beginning has slipped out of the window, or it is buried in a context that has grown very long.
The fix: start a new conversation with a clear summary of what matters, rather than piling on more messages.
Why it matters to you
The size of the window determines what you can hand over in one go: a full contract, a book, a large codebase. It varies widely from one model to another, and it also affects cost, since every token read is billed on developer plans. The context window tool shows how your text compares with the limits of the main models.
Common myths
- “If it fits in the window, the AI reads everything equally carefully.” No: in very long contexts, some passages get less attention. Long-context techniques aim to reduce this problem.
- “The context window is what the AI knows.” What it knows comes from its training, which stops at a knowledge cutoff. The window only holds what you are showing it right now.
- “It resets between messages.” Within a single conversation, the history is usually sent again at every turn and keeps taking up space.
For developers, the craft of choosing what goes into that window has a name: context engineering.
Related terms
- Token · A small chunk of text (a word, part of a word or a symbol) that an AI model reads and writes; the unit for limits and pricing.
- Long context · A model's ability to process very long inputs in one go, such as books or code repositories, and the techniques that make it possible.
- KV cache · Memory where a model keeps the work already done on previous tokens so it does not have to redo it for every new word.
- AI memory · A feature that lets an AI assistant remember facts about you from one conversation to the next.
- Context engineering · The practice of deciding what goes into a model's context window at each step: instructions, tools, documents, memory and history.
- Knowledge cutoff · The date after which an AI model received no more training data, so it knows nothing about later events.
Try it
Full glossary
Frequently asked questions
What happens when you exceed the context window?
Depending on the tool, the document is rejected, the conversation is truncated, or earlier messages are summarized or dropped. Either way, the model no longer sees part of what you gave it, which can quietly degrade the answer.
Is a bigger context window always better?
Not necessarily. Anthropic's documentation notes that as the token count grows, accuracy and the ability to recall information can decline. Giving the model the right passages beats giving it everything.
Is the context window the AI's memory?
It is its working memory for the duration of an exchange. The long-term memory some assistants offer is a separate feature: the tool saves a few details and feeds them back into the context of later conversations.
Data sources
Data as of October 22, 2026
Report an error
Does a figure, a date or a fact look wrong? Tell us: every report is checked.