Skip to content
zero2vibecodelearn vibe coding
Level 1 · How it sees your project 6 min Reviewed by the author · Aug 4, 2026

The context window, and why long sessions drift

Everything the agent has seen in this session sits in one finite space. When that space fills, quality quietly drops — and the fix is to notice early, not to argue harder.

Level 1 · 0 / 4 lessons0%

No hands-on task in this lesson — just read it through and answer the questions.

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.

Check your understanding

Answered 0/3
Mode:

What counts against the context window?

The agent starts contradicting a rule you set an hour ago. What is the best first move?

Why is a rule in a project instructions file more reliable than a rule you typed once?

Finish the task in the terminal and answer the questions to complete the lesson.

📝 My notes

Saved automatically in this browser · shows up on the Notes page.

Lesson Q&A

What counts against the context window?

A single command that prints a thousand lines of log can take more room than your last ten instructions.

The agent starts contradicting a rule you set an hour ago. What is the best first move?

If the rule has fallen out of view, no amount of restating inside the same crowded session reliably brings it back. A clean start is cheaper than a long argument.

Why is a rule in a project instructions file more reliable than a rule you typed once?

Durable rules belong in a file. Anything you only said once competes for room with everything said since.

Which of these eats the most context, usually?

You type a sentence; a test run prints a few hundred lines. Output is almost always the biggest consumer.

Move between lessons with · search with ⌘K