Context Window
A context window is the token budget a model can use for a request and its response. Instructions, conversation history, documents, tool results, and generated output compete for that budget; exact accounting depends on the model and API.
Also known as: context length
The context window limits what a model can work with during a response. It includes more than the user’s latest message: instructions, conversation history, tool definitions, and tool results also consume space. Generated output needs room too.
Exceeding the budget does not always silently drop the oldest text. Behavior depends on the API, model, and application. A request may be rejected, generation may stop at the limit, or the application may shorten the input through truncation or compaction. Compaction changes the information the next request receives; it does not enlarge the model’s window.
Anthropic’s context-window documentation explains its input/output accounting and model-dependent overflow behavior. Check the documentation for the particular model you deploy.
For builders, the useful check is whether the request preserves the instructions and evidence needed for the task while leaving room for the answer. A larger budget gives you more space, but does not tell you which information belongs there.
Go deeper
From the conversation
-
Context Poisoning is Killing Your AI Agents: How to Stop it -
Agent Memory: The Last Battleground in the AI Stack | Richmond Alake, Oracle -
The Enterprise AI Deployment Playbook | ServiceTitan, Indeed & Twilio -
Slack Wants to Be the Context Harness for Code | CPO Jaime DeLanghe -
The AI Framework Era Is Over: Why Context Is the Moat | Jerry Liu -
Architecting AI Agents: The Shift from Models to Systems | Aishwarya Srinivasan -
From Demo to Defensibility: How to Build an AI Business that Lasts | Aurimas Griciūnas -
Time to Exploit is Negative: AI Broke the Patch Cycle | Dan Lorenc