Context window
also: context windows, context limit, context length
The maximum amount of text an AI can consider at one time, including your messages, its replies, and files it has read. Anything beyond that limit is out of view.
The maximum number of tokens (small chunks of text) a language model can process at once, covering instructions, conversation history, file contents, and tool output. As a session nears the limit, agents drop or summarize older content, and details can be lost.
A desk that only fits so many papers. As new pages pile on, older ones get pushed off or replaced by a short sticky note summarizing them. You can only work with what's on the desk.
In long sessions or big codebases, your agent can lose track of rules you set early, or never read the file that matters. Knowing this, you can restate key rules, start fresh sessions, and point it at the right files.
This codebase is too large to load at once, so I'll search for where invoices are created and read only those files rather than the whole repository.
We're deep into this session, so here's a recap of the rules: don't touch payments, keep changes small, and run tests after each change. Confirm them before continuing.
Assuming the agent remembers everything from the whole session and has read your whole codebase. It only knows what's currently in its context window.