A context window is the maximum number of tokens a model can attend to at once. For an agent, it limits what can fit into the current prompt: recent conversation, instructions, retrieved information, and tool results. Text length is not the same as token length, so measure tokens when planning the budget. section 1.3.4 section 2.6
Think of the window as working space, not a permanent archive. Recent turns can live directly in it; information needed across sessions belongs in external storage and is retrieved when relevant. Calling these short-term and long-term memory is useful shorthand, but the practical distinction is whether information is inside the current prompt or outside it. section 1.3.4 section 6.4.1
When the working space gets crowded, decide what earns a place:
- Summarize or remove older conversation turns rather than keeping the entire history. section 1.3.4
- Filter or chunk tool output; rank and trim retrieved results before inserting them. section 1.3.4
- Measure the token budget instead of estimating it from visible text length. section 2.6
Divide a task by context
If one agent cannot hold everything needed for a large task, several agents can each work with the relevant slice. This makes context management one reason to distribute work, alongside specialization and parallelism. section 1.4
A larger window reduces pressure but does not remove the need to select carefully: longer contexts cost more, slow inference, and can eventually hurt reasoning quality. Ask what the agent needs for this call, what can be retrieved later, and what can be left out. section 1.3.4





















