The Context Window Problem
Why agents forget between sessions. The context window is short-term memory โ and it vanishes.
You've now got an agent that can do real work. But there's a problem you're about to hit, and it's the single biggest frustration for new OpenClaw users: your agent has amnesia.
Every conversation with your agent operates within a context window โ a fixed amount of text that the AI model can process at once. Think of it as the agent's working memory. Everything said in the current conversation lives in this window. But when the session ends, that window is wiped clean. Gone. Your agent doesn't remember yesterday's conversation, the decisions you made, or the work it did.
This is not a bug. It's how large language models work. The context window is short-term memory by design. It's big enough to hold a complex conversation (modern models can handle 100K-200K tokens), but it's ephemeral. When you close the session, the context window is discarded. Your next conversation starts completely fresh.
The practical impact is brutal. You spend 30 minutes configuring a workflow with your agent. It understands your project, your preferences, your tech stack. You close the terminal. You come back tomorrow. Your agent has no idea who you are or what you were working on. Every. Single. Session. This is what drives people away from AI agents โ the feeling that you're constantly re-explaining yourself.
The good news: this is a solved problem. OpenClaw has memory systems specifically designed to persist information across sessions. That's what Stage 2 is entirely about. But first, you need to understand why the amnesia happens. It's not a limitation to work around โ it's a fundamental architectural reality that shapes how you build agent systems. The agents that work well in production are the ones built with this reality baked into their design from the start.
Walkthrough
- 1Start a conversation and tell your agent three specific facts about your project (tech stack, naming conventions, key files)
- 2Verify the agent remembers them by asking it to repeat them back
- 3End the session completely (close terminal or type
exit) - 4Start a new session and ask: 'What do you know about my project?'
- 5Observe: the agent has no memory of the previous conversation
- 6Check the context window size in your model's documentation (e.g., Claude Sonnet = 200K tokens)
- 7Reflect on which information you'd want to persist across sessions โ this becomes your memory design in Stage 2
Checkpoint
You've directly experienced context window amnesia. You can explain why it happens (ephemeral context window) and you've identified the key information you need to persist across sessions.