The model can hold a limited amount of text at once. That space is the , and everything in your session lives in it.
Your instructions. Every file the agent opened. Every command it ran and everything that command printed. Its own replies. All of it, in one budget.
Why this bites
You start clean. The first few turns are sharp — it reads the two files it needs, makes the change, you approve it.
Twenty turns later it has read fifteen files, run the test suite four times, and printed a long stack trace. The window is crowded. The constraint you set at the beginning is now buried under a lot of newer material, and newer material wins.
It is not forgetting, exactly
The model is not deciding to ignore you. What you said either is or is not in front of it. When room runs out, the oldest parts of a long session get condensed or fall away — and a condensed version of your instruction is a weaker version of your instruction.
How drift actually looks
You will not get an error. You get these instead:
- It reintroduces a pattern you told it to avoid, three files ago.
- It re-reads a file it already read, and reaches a different conclusion.
- Its answers get vaguer and more hedged.
- It “fixes” something that was already correct.
- It starts summarizing what it plans to do instead of doing it.
Any one of those is a signal to stop and reset, not to explain yourself again.
Quick check
Which of these eats the most context, usually?
Working with the window instead of against it
One task per session. Finish the thing, then start clean for the next thing. A session is not precious.
Point, do not dump. Naming the two files that matter costs a fraction of what “have a look around the project” costs. The next lesson is entirely about this.
Keep output small. If a command prints a thousand lines and only the last twenty matter, say so, or have the agent look at just the failing part.
Put durable rules in a file. Anything you would have to repeat every session — the commands to run, the conventions, the thing that must never be touched — belongs in project instructions, not in a message you type once. That is level 3, and it exists mostly because of this lesson.
A cheap reset
When a session feels heavy, write one paragraph that captures the state — what is done, what is left, what must not change — then start fresh and paste that paragraph in. You keep the useful part of the session and drop the rest.
The honest trade-off
A bigger window does not remove this problem, it moves it. More room means more material competing for attention, and attention is not evenly spread across a huge context. A tight, relevant session beats a large, cluttered one at any size.
The skill is not “fit more in”. It is noticing early that you are working with a tired conversation, and being willing to throw it away.
Should I just start a new session for every single message?
How do I know how full the window is?
Try it yourself
A session ninety minutes old, and a rule it was given at the start.