Context window
The maximum number of tokens the model can read and write in one request.
Everything counts: the system prompt, tool definitions, the conversation, tool results and the answer. A bigger window lets you send more, but more is not automatically better: quality and cost both change with length.
Related terms
- Context rot: Model quality drops as the context fills with old, irrelevant or conflicting material.
- Compaction: Replacing the older part of a long conversation with a summary so the agent can keep going.
- Tokens: The pieces of text models read and write, and the unit you pay for.
