# Context Window

> A context window is the maximum amount of text, measured in tokens, a model can consider at once — everything the agent reads on a turn must fit inside it.

Source: https://tokenade.net/en/glossary/context-window · Updated: 2026-10-07

## What is a context window?

A context window is the maximum amount of text — measured in [tokens](https://tokenade.net/en/glossary/token) — that a language model can take into account at one time. It holds everything the model is "thinking about" on a given turn: the system prompt, the conversation so far, any files or search results pulled in, tool definitions, and command output. If the combined input exceeds the window, something has to be dropped or summarised.

Modern coding models have very large windows, which can make it tempting to fill them. As of October 2026, every current Claude model (Fable 5.1, Opus 5.5, Sonnet 5.5, Haiku 5.5) offers a 1M-token window with up to 128K output tokens, and OpenAI's GPT-6 Astra lists 1,050,000 tokens (per the Anthropic and OpenAI model docs). But the window is a budget, not a target: everything you put in is billed, and re-billed each turn an agent re-reads it.

## Why the context window matters in 2026

It matters because filling the window has a hidden quality cost on top of the obvious price. Models attend less to information buried in the middle of a long context, so a window stuffed with marginally-relevant files can actually make answers *worse* — the signal the model needs gets lost in the noise. Managing what goes into the window is the discipline of [context engineering](https://tokenade.net/en/articles/context-engineering); keeping it small is the fastest way to cut cost without hurting quality.

Pricing moved in 2026 too, and not in a way that helps. Anthropic now bills Claude 4.6 and later models (except Haiku 5.5) at the same per-token rate across the full 1M window — a 900k-token request costs the same per token as a 9k one — while OpenAI's GPT-6 Astra charges a higher long-context rate. Flat pricing removes the penalty tier, but it also removes the speed bump that used to stop agents from drifting into huge contexts. And because Claude 4.7+ models use a tokenizer that produces roughly 30% more tokens for the same text, the same files fill the window faster than they did a year ago.

## When a bigger context window doesn't help

- **When the extra content is low-signal** — adding more files the model doesn't need lowers answer quality and raises cost.
- **When you could retrieve instead** — pulling the few relevant functions via [semantic code search](https://tokenade.net/en/glossary/semantic-code-search) beats dumping everything into a large window.

## See also

- [Glossary: Token](https://tokenade.net/en/glossary/token)
- [Glossary: Context compression](https://tokenade.net/en/glossary/context-compression)
- [Article: How the context window drives your token bill](https://tokenade.net/en/articles/context-window-token-bill)
- [Article: Context engineering for AI coding agents](https://tokenade.net/en/articles/context-engineering)
