Knaph

Depth 1 · 170 s

The filling bar

Why an agent forgets what you said an hour ago. The context is everything the model sees in one request, the context window is the most it can hold, and an agent fills it with what it reads and runs.

About this video

An hour into a session, an AI agent answers as if it had never heard something you told it at the very start. Nothing is broken. To see why, you need to know exactly what the model can see.

A language model keeps nothing between requests, so every request carries everything it needs. All of that is called the context. For an agent it holds much more than your messages: the app's instructions, the descriptions of the tools it can ask for, notes you or your team wrote for it, the conversation so far, and everything it has read or run, the contents of files and the output of commands. It is all text, so it is all tokens, and the model reads all of it on every request, and nothing else.

The context window is the most a model can take in at once, and the reply it writes has to fit in it too. In late 2026 that is about a million tokens for Claude's current models, roughly 750,000 words; some smaller or older models have 200,000. A chat rarely comes close. An agent does: it reads twenty files, one of them 3,000 lines long, and runs the tests five times, and every file and every output stays in the context for every later request.

The reply is written into the same window, one token at a time, so the space left is also the room the model has to answer or to think. When the window is nearly full, the app has to shorten or remove older parts, and that is how something from the start can be lost. In Claude Code, the /context command shows how much each part takes.

Using it well: point the agent at what the task needs, ask for a summary or a search instead of a huge output, say important things again in a long session, and check the bar when it feels forgetful.

This video shows depth 1 of Context window.

Learn Context window

Transcript

  1. 0:00An hour into a session, the agent forgets something you said at the very start. Nothing is broken. It's about what the model can see.
  2. 0:18Every request carries everything the model will see. The app's instructions, the tool descriptions, your notes, the conversation, and every file and output the agent has read. That's the context. It's all tokens, and the model reads all of it, every time.
  3. 0:48But there's a limit. The context window is the most a model can take in at once, and the reply has to fit too. For Claude's current models in late 2026, that's about a million tokens, several long novels. A chat rarely comes close.
  4. 1:12An agent is different. It reads twenty files. One of them is three thousand lines long. It runs the tests five times. Every file and every output stays in the context, for every later request. A long session can fill even a million.
  5. 1:40The reply is written into the same window, one token at a time, after everything else. The space that's left is all the room it has to answer, or to think.
  6. 2:04When the window is nearly full, something has to give. The app shortens or removes older parts, and that's how your first words get lost. In Claude Code, slash context shows you the bar.
  7. 2:22So give it what the task needs, not everything you have. Ask for a summary instead of a huge output. Say important things again. And when it feels forgetful, check the bar.
  8. 2:42It sees only its context. Choose what goes in.