Ever had a long chat where the AI slowly “forgot” your first instructions? That’s not a bug in your conversation. It’s how models work.
The context window
A model can only consider a limited amount of text at once, called its context window. It’s like a desk: only so many papers fit. Once it’s full, older material is dropped or summarized, and details get lost.
Two kinds of memory
- Short-term: what’s in the current conversation.
- Long-term: notes, files and databases the agent can save to and read from later.
The model itself doesn’t remember between sessions. If an agent seems to remember you, the harness stored something and loaded it back.
What the harness does about it
- Summarizes old parts of the conversation.
- Writes notes to files, so progress survives a restart.
- Retrieves only what’s relevant from large documents (this is the idea behind RAG).
- Keeps a progress log, so a fresh session can pick up where the last one stopped.
In a well-built agent, the project has memory even when the model doesn’t.
What you can do
- One task per conversation. Don’t mix unrelated jobs.
- Put key facts in a short notes file and point the agent to it: goals, preferences, rules.
- Ask for checkpoints: “Summarize what we decided so far.”
- Start fresh with a summary when a chat gets long and strange.
Watch out
- Old memories can become wrong. Update or delete them.
- Don’t store private data you wouldn’t want saved.
Next step
Memory and context are a big part of how the “How It Works” level explains tokens and RAG, with simulators instead of formulas.