AI GlossaryLanguage models
Context window
Definition: A context window is the maximum number of tokens a language model can work with in one request, including its instructions, inputs and its own reply.
Everything in a request counts toward the window: the system prompt (the developer’s standing instructions), each message in the conversation, documents, images, tool definitions and tool results. The reply the model writes in that turn counts too (Anthropic, Context windows). In a conversation or an agent loop, each request carries the earlier turns, so the total grows with every turn. If the input alone is longer than the window, Anthropic’s API rejects the request. Anthropic describes the window as the model’s working memory, which is separate from the much larger body of text the model was trained on.
Window sizes have grown. GPT-3, in 2020, took in 2,048 tokens. In November 2026, Anthropic’s documentation lists windows of 1 million tokens for recent Claude models and 200,000 tokens for some older ones. A larger window does not mean the model uses all of it equally well. Anthropic notes that recall of information in the context declines as the token count grows, which this glossary covers under context rot. For example, an agent that keeps a full day of market data and tool output in its context may stay inside the window and still miss an instruction stated near the start, such as a limit.
The GPT-3 paper, Language Models are Few-Shot Learners (Brown et al., May 2020), uses the term for the 2,048 tokens each of its models could take in at once. Anthropic’s Context windows documentation sets out what counts toward the window and how its API handles a request that exceeds it.
