AI GLOSSARY · AI CONCEPTS
Context window
In one line: A context window is all the text a model can look at when it writes a response, counting the response itself, and it is measured in tokens.
Definition
A context window is what a model can reference when generating a response, measured in tokens. For Claude, the response itself, plus images, documents and tool results in the request, count toward it.
Also called: context windows, context length, context size.
In plain language
A context window is all the text a model can look at when it writes a response, counting the response itself. Think of it as the working memory for one model call, which is different from the data the model was trained on. The size differs by model; as of 2026-11-24, Anthropic's models overview lists a 1M-token context window for Claude Opus 5.5.
Technical definition
For Claude, the documented context window counts the system prompt, every message (including tool results, images and documents), tool definitions and the output Claude generates for the turn, including extended thinking. Whether thinking blocks from earlier turns stay in the window depends on the model. The documentation gives the context window size and, separately, the number of output tokens a single request can generate (max_tokens, the maximum number of tokens to generate before stopping). More context is not automatically better, because accuracy and recall degrade as token count grows, a phenomenon the documentation calls context rot. Chat interfaces such as claude.ai can also manage the window on a rolling first-in, first-out basis, meaning the oldest content is the first to leave. Server-side compaction, which automatically summarizes earlier parts of a conversation on the server, lets it continue past the context window limit.
Worked examples in this catalogue
Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.
Skill by Skill Almanac · Illustrative, not executed
context-window-packer 56/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- The skill chooses which files fit one prompt's token budget and records what was kept, shrunk or dropped, and why.
- Why it exercises the concept
- Read its record of what was kept, shrunk or dropped for one prompt's budget.
Skill by Skill Almanac · Illustrative, not executed
session-handoff-notes 63/100 · grade CScored · Method v0.2 · How we score
- What you see
- The skill produces a handoff note the next coding-agent session can act on, checked for evidence, paths and vague items.
- Why it exercises the concept
- Compare it with the documentation's advice to design state artifacts so context recovery is fast when a new session starts.
Guide · Illustrative, not executed
What Is an LLM? The Facts Agent Users Need
- What you see
- The guide says the agent is the code around the model.
- Why it exercises the concept
- Use it to separate the model from the agent code around it.
How it shows up when you use agents
For Claude, the request and the model's generated output count toward the context window, including tool definitions and tool results. The Anthropic documentation says accuracy and recall degrade as token count grows, so a larger window is not a guarantee of reliable recall. For agents that span multiple sessions, it advises designing state artifacts so that context recovery is fast when a new session starts.
For a concrete number, Anthropic's models overview lists a context window of 1M tokens and a maximum output of 128K tokens for Claude Opus 5.5, as of 2026-11-24. Those figures belong to that model; other models list their own.
A guide on Claude Code cost explains that each request sends the conversation so far, so cost grows with context length; see Claude Code pricing explained.
Common confusions
- Context versus training. The Anthropic documentation says the context window is different from the large corpus of data the model was trained on.
- Window versus conversation. Chat interfaces such as claude.ai can manage the window on a rolling first-in, first-out basis, and server-side compaction summarizes earlier parts of a conversation so it can continue past the window limit.
- Capacity versus quality. More context is not automatically better, because accuracy and recall degrade as token count grows.
- Context versus output limit. The model's output counts toward the context window, and the documentation gives a separate maximum number of output tokens (max_tokens) for a single request. Whether earlier thinking blocks stay in the window depends on the model.
Related terms
Show all 49 related terms
Terms that mention Context window
50 terms mention this one
- Agent harness
- Agent instruction file
- Agent loop
- Agent memory
- Agent orchestration
- AGENTS.md
- AI pair programming
- Attention mechanism
- Autoregressive model
- Byte-pair encoding (BPE)
- Chunking
- CLAUDE.md
- Coding agent
- Context engineering
- Context rot
- Cross-encoder
- Custom instructions
- Few-shot prompting
- Firecrawl
- FlashAttention
- In-context learning (ICL)
- Inference cost
- KV cache
- Large language model (LLM)
- Letta (MemGPT)
- Long short-term memory (LSTM)
- MCP resources
- Mem0
- Memory (chat assistant feature)
- Model router (LLM routing)
- Multi-head attention
- Multimodal AI
- N-gram
- Positional encoding
- Prompt
- Prompt caching
- Prompt engineering
- Reasoning model
- Recurrent neural network (RNN)
- Self-hosted LLM
- Small language model (SLM)
- Sparse attention
- Spec-driven development
- Subagent
- System prompt
- Text summarization
- Token
- Tokenization (NLP)
- Topic modeling
- Usage limits
Guides that mention Context window
- Claude skills vs MCP vs plugins: what each one is for
- Claude Code Pricing: What Drives Cost and Plan Options
- Claude Code Subagents: When to Delegate and How to Scope Tools
- CLAUDE.md examples: four stack templates, rules, imports
- What are Claude skills? Definition, SKILL.md format and where they work
Show all 11 guides
- What Is an LLM? The Facts Agent Users Need
- What Is an MCP Server? Tools, Resources and Prompts
- Codex Skills Explained: Locations and AGENTS.md Differences
- How to Use AI to Design a Room: Photo to Brief
- Agent Skills vs Tools: Instructions or Callable Actions
- Agentic AI vs Generative AI: The Loop Difference
More in AI concepts
Sources
- Context windows, Anthropic (accessed 2026-11-24)
- Machine Learning Glossary: context window, Google for Developers (accessed 2026-11-24)
- Models overview, Anthropic (accessed 2026-11-24)
- Create a Message (max_tokens), Anthropic (accessed 2026-11-24)
Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-24. Wikipedia is never the only source.
Review record
Last verified
Drafted by Claude and Codex (automated drafting); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-24. Last verified .
Change log (21)
- : First version.
- : Initial reference entry with scoped definitions, primary references and illustrative examples.
- : Replaced with Codex's final reviewed version from the staged-approval cohort; earlier history kept above. Still a draft: not indexable.
- : Accuracy pass: short rewritten to what the cited pages state (response, images, documents, tool results count; measured in tokens). Removed unsupported 'depends on the model and service'.
- : Accuracy pass: removed 'retrieve material to fit its request' (no source). Shortening narrowed to claude.ai first-in, first-out management of the window, as the Anthropic page states.
- : Accuracy pass: replaced 'conversation can continue through many calls' with the documented compaction wording (summarizes earlier parts so the conversation continues past the limit).
- : Accuracy pass: removed 'does not enlarge the underlying model's supported window' and 'distinct from persistent storage' and 'other models require their own rules' (no source).
- : Accuracy pass: 'distinct from an output-token limit' narrowed to the documented fact that the page gives the window size and a separate max_tokens output figure.
- : Accuracy pass: removed 'a product can save more history than it supplies' and 'a new session can receive instructions' (unsupported); kept only the documented state-artifact advice for new sessions.
- : Accuracy pass: example 1 see line now uses the catalog wording (kept, shrunk or dropped); example 2 and 3 see and why lines tied to catalog text and cited advice.
- : Accuracy pass: removed unsourced advice and reasoning from the body (omitted file or summary, capacity not establishing cause, handoff usefulness); body now cites documented points only.
- : US spelling; per-example caveats removed (the page states once that examples are illustrative); related terms filled. No verified claim changed.
- : Beginner example added: OpenAI's English estimate (4 characters, 75 words per 100 tokens) for token; Claude Opus 5.5 context size and glosses of FIFO, compaction and max_tokens for context window. Each sourced.
- : Qualified product linking excludes generic state artifacts and distinguishes extended thinking from a model category; rendered review pending.
- : Codex closed the four reported factual/example/link findings after source and rendered checks; owner approval and publication remain separate.
- : Codex internal correction check is recorded separately; independent review remains pending and is not implied by that check.
- : Codex bdaf816 patch reconciled with the beginner example and glosses; verification reset to pending until Codex re-reviews this revision.
- : Added a written one-line answer; moved the first-in-first-out gloss from plain to technical; linked the Claude Code pricing guide for how context length drives cost.
- : Round 8: plain section and one-line answer lead with what a context window is; the dated Claude Opus 5.5 figure moved to the end of plain.
- : Independent automated factual and example-source review completed; exact-version technical release checks recorded separately. Publication remains disabled.
- : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.