Key takeaways
- A context window is the text a model can see in one request, measured in tokens, and it includes the model's own output.
- As of November 6, 2026, current Claude models have 1M tokens, OpenAI's GPT-6 family 1.05M, and Gemini 4 Argon 1,048,576.
- Fuller is not better: Anthropic says accuracy and recall degrade as token count grows, so manage what is in the window.
A context window is the amount of text an AI model can see and work with at one time, measured in tokens. It holds your prompt, the conversation so far, any files or tool results, and the answer the model is writing. Anthropic's docs call it the model's "working memory." As of November 6, 2026, the current flagship models from Anthropic, OpenAI and Google all have windows of about one million tokens.
What a context window is
A token is a chunk of text, usually a short word or part of a longer one. Models read and write tokens, not words. Anthropic's model comparison puts 1 million tokens at roughly 555,000 words on its current tokenizer. Google's long-context guide offers other comparisons for 1 million tokens: about 50,000 lines of code, or eight average-length English novels.
The window is not what the model learned in training. Training is a huge, fixed body of text. The window is what you hand it for this one request. When the conversation ends or you start a new chat, the next one starts with an empty window.
What counts toward the window
Everything in the request counts, according to Anthropic's context window docs:
- The system prompt.
- Every earlier message, including tool results, images and documents.
- Your tool definitions.
- The model's own output for the turn, including its thinking.
Each turn adds the previous question and answer to the input of the next one, so a long chat fills the window turn by turn. This is why the same model that handled your first message fine can start to forget details deep into a long session.
Context window sizes of current models (November 2026)
All figures below come from each company's own docs, read on November 6, 2026.
| Model | Context window | Max output | Source |
|---|---|---|---|
| Claude Fable 5.1 | 1M tokens | 128K tokens | Anthropic models overview |
| Claude Opus 5.5 | 1M tokens | 128K tokens | Anthropic models overview |
| Claude Sonnet 5.5 | 1M tokens | 128K tokens | Anthropic models overview |
| Claude Haiku 5.5 | 1M tokens | 128K tokens | Anthropic models overview |
| GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Luna | 1.05M | 128K tokens | OpenAI API models page |
| Gemini 4 Argon | 1,048,576 tokens, shared by input and output | 65,536 by default, up to 1,048,576 with long decode | Google AI Studio docs |
| Gemini 3.8 Flash | 1,048,576 input | 65,536 output | Google AI Studio docs |
A few details change what these numbers mean in practice.
- Anthropic. On every 1M-token Claude model, 1M is the default and needs no beta header. Requests are billed at standard pricing, except on Claude Haiku 5.5, where prompts over 100,000 tokens cost more. Older models such as Claude Sonnet 4.5 (deprecated) have 200,000 tokens.
- OpenAI. The API page lists 1.05M for all four flagship models. In Codex, OpenAI says GPT-6.1 Sol uses a default context window of 500,000 tokens, half the API figure.
- Google. Gemini 4 Argon has one budget that input, thinking and output share. Gemini 3.8 Flash has separate limits: 1,048,576 for input and 65,536 for output. We read limits for these two models only. Google's other Gemini models link to their own pages.
A bigger window is not always better
Anthropic's docs say more context is not automatically better. As the token count grows, accuracy and recall degrade, which Anthropic calls context rot. A window that is nearly full can give worse answers than a short, focused one. Cost also grows with the input, because you pay for the tokens you send on every turn.
The practical rule is to put in what the task needs. Start a new chat for a new topic, and summarize long conversations instead of carrying them whole.
What happens when the window fills
It depends on the product.
- API calls. If the input alone is over the limit, the Claude API returns a 400 error ("prompt is too long"). On Claude 4.5 models and newer, a request that fits but whose output runs into the limit stops with
stop_reason: "model_context_window_exceeded". - Chat apps. Anthropic notes that chat interfaces such as claude.ai can manage the window on a rolling first-in, first-out basis, dropping the oldest content first.
- Coding agents. Claude Code and Codex summarize the older conversation so the session can continue. Details are below.
What is a context window in Claude Code?
In Claude Code, the window holds everything Claude knows about your session: your instructions, the files it reads, its own replies, and content that never appears in your terminal. Anthropic's Claude Code docs say CLAUDE.md files, auto memory, MCP tool names and skill descriptions load before you type anything. Every file Claude reads then adds to the total.
Claude Code supports a 1 million token window on Fable 5.1, Fable 5, Sonnet 5 and later, Haiku 5.5, Opus 4.6 and later, and Sonnet 4.6. Fable, Sonnet 5 and later, Haiku 5.5 and Opus 4.7 and later get it by default. Opus 4.6 and Sonnet 4.6 need the [1m] suffix, for example /model opus[1m], and some plans need usage credits for them. Set CLAUDE_CODE_DISABLE_1M_CONTEXT=1 to keep sessions at 200K.
How to manage it:
- Run
/contextfor a live breakdown of what fills your window. - Run
/compact, optionally with a focus such as/compact focus on the auth bug fix, to replace the conversation with a summary. - Run
/clearwhen you switch to unrelated work. - Send large research to a subagent, which has its own window, so the file contents stay out of yours.
Claude Code also compacts automatically as you approach the limit, so a full window does not end your session. /autocompact 500k sets how full the window gets before that happens.
What is a context window in Codex?
In Codex, it is the number of tokens the active model can hold in one chat. The model matters: OpenAI's Codex model page says GPT-6.1 Sol uses a default of 500,000 tokens in Codex and ChatGPT Work, and gives no figure for the other models. For the full picture, including how the window differs from your plan's usage limit, see our Codex context window guide.
OpenAI's docs describe the controls briefly. The /status command shows "context usage" and rate limits, and /compact compacts the current chat's context. In config.toml, model_context_window sets the context window tokens available to the active model, and model_auto_compact_token_limit sets the token threshold that triggers automatic compaction, using model defaults when unset.
What to check next
Model lineups change often, so check the model pages linked in the sources before you build around a number: Anthropic, OpenAI and Google. The table above is accurate as of November 6, 2026.
Frequently asked questions
What is a context window in Claude Code?
It holds everything Claude knows about your session: your instructions, the files it reads, its replies and CLAUDE.md content. Run /context to see what fills it, /compact to summarize, and /clear between tasks. Claude Code also compacts automatically near the limit.
What is a context window in Codex?
It is the number of tokens the active model can hold in one chat. OpenAI says GPT-6.1 Sol uses a default of 500,000 tokens in Codex. /status shows context usage and /compact compacts the chat's context.
How big is the context window of current AI models?
As of November 6, 2026, Claude Fable 5.1, Opus 5.5, Sonnet 5.5 and Haiku 5.5 have 1M tokens, OpenAI's GPT-6 flagships 1.05M, and Gemini 4 Argon 1,048,576 tokens shared by input and output.
Does a bigger context window make a model better?
Not automatically. Anthropic's docs say accuracy and recall degrade as token count grows, a problem it calls context rot, so curating what is in context matters as much as the size.
Sources
- Context windowsAnthropic
- Models overviewAnthropic
- Explore the context windowAnthropic
- 1M context in Claude CodeAnthropic
- ModelsOpenAI
- Codex modelsOpenAI
- Codex configuration referenceOpenAI
- Codex slash commandsOpenAI
- Gemini modelsGoogle
- Long contextGoogle