Guides · Glossary
What is a context window? Tokens, limits and compaction
The "context window" refers to all the text a language model can reference when generating a response, including the response itself.
What counts toward it
Everything in the request counts: the system prompt, every message including tool results, images and documents, and the tool definitions. The model's output counts too, including its thinking. Anthropic notes that accuracy and recall degrade as the token count grows, which it calls context rot, so curating what's in context matters as much as the size.
Current sizes
- Claude Fable 5.1, Opus 5.5, Sonnet 5.5 and Haiku 5.5: 1M tokens, with up to 128K output tokens per request.
- GPT-6 Astra, GPT-6.1 Sol, GPT-6 Sol and GPT-6 Luna: 1,050,000 tokens in the API, of which up to 922,000 can be input.
- Muse Wonder: 1,048,576 tokens.
Products can use less than the model maximum. In Codex and ChatGPT Work, GPT-6.1 Sol's default context went to 500K tokens on 11 October 2026, up from 272K. In the Claude apps, the context window article lists the size per model and product.
Price of long context
Anthropic bills the full 1M context at standard rates on current models except Haiku 5.5, which charges more for prompts over 100,000 tokens. OpenAI charges 2x input and 1.5x output for GPT-6 API prompts over 272K input tokens.
Context window vs usage limit
The context window limits how long one conversation can get. Usage limits cap how much you use over time. When context fills up, coding agents compact: Claude Code's /compact summarizes the conversation, /clear starts fresh, and /context shows what's loaded.
Sources
- Context windows · Anthropic Docs
- Models overview · Anthropic Docs
- Claude API pricing · Anthropic Docs
- How large is the context window on paid Claude plans? · Claude Help Center
- How do usage and length limits work? · Claude Help Center
- Claude Code commands reference · Claude Code Docs
- GPT-6.1 Sol model page · OpenAI API Docs
- GPT-6 Astra model page · OpenAI API Docs
- Meta Model API docs: models and availability · Meta Model API docs
- Day 7: GPT-6.1 Sol default context 500k in Codex and Work · X · @thsottiaux ·
Last checked . Facts change; the sources above are authoritative. See how we verify or report a correction.
