---
title: "Context window"
type: "glossary term"
url: "https://aifordevs.org/glossary#context-window"
markdown: "https://aifordevs.org/glossary/context-window.md"
publisher: "AI for Devs"
license: "https://aifordevs.org/reuse"
attribution: "Credit AI for Devs and link to https://aifordevs.org/glossary#context-window"
---

# Context window

A context window is the maximum number of tokens a model can handle in one request, usually counting the prompt and the output together. Everything the model has to work with for that request has to fit inside it.

On the Claude API, the system prompt, messages, tool definitions, tool results, generated output, and thinking all count, and cached tokens still occupy the window. As of November 8, 2026, Google's docs list separate input and output budgets for Gemini 3 and 2.5, and one shared 1M window for Gemini 4. Anthropic's docs warn that accuracy and recall degrade as token count grows, so a larger window is no reason to fill it.

## Example

As of November 8, 2026, Claude Opus 5.5 has a 1M-token window and can generate up to 128K tokens per request. A 950,000-token prompt leaves 50,000 tokens for output, and generation stops there with model_context_window_exceeded.

## Source

[Anthropic docs: Context windows](https://platform.claude.com/docs/en/build-with-claude/context-windows)

## Related terms

- [Token](https://aifordevs.org/glossary#token)
- [Context engineering](https://aifordevs.org/glossary#context-engineering)
- [Reasoning model](https://aifordevs.org/glossary#reasoning-model)

## Read the article

[Context engineering: budget and order the context window](https://aifordevs.org/articles/context-engineering)

## Cite this term

AI for Devs. "Context window." https://aifordevs.org/glossary#context-window

- Page: https://aifordevs.org/glossary#context-window
- Markdown: https://aifordevs.org/glossary/context-window.md
- Reuse: Quote or summarize with a link to this page. Terms: https://aifordevs.org/reuse
- Publisher: AI for Devs
