AI Agents
What is Context window?
The maximum amount of text — instructions, history, and tool results — a model can consider at once, measured in tokens (~200K for current Claude models).
How it works
Everything the model 'knows' on a given call must fit in the window. When an agent's history plus retrieved context exceeds it, you must summarize, truncate, or offload to external memory. Hitting the limit mid-task is a design constraint, not a bug.
Example
In practiceA long research task accumulates tool results until the next call won't fit, so the agent summarizes older steps before continuing.
What happens when I exceed the context window?
The API rejects the request or you must trim. Plan for it: summarize history, retrieve only what's relevant, and keep tool results tight.
Go deeper: Deploy Your First AI Agent
The complete, step-by-step guide — every command, config, and the reasoning behind it.
Get the guide