Making OpenClaw remember what it's doing after compaction
Source: Dev.to
Why this happens
Although AI looks like magic and works like magic, under the hood it still has its boundaries, and in this case, its context window. The mighty AI can only process a certain amount of information, and if your threads go beyond that, OpenClaw uses compaction to summarize previous conversations, thus reducing the amount of information AI needs to process.
The thing is, compaction is not (and cannot be) lossless. Your critical guidance, rules you must follow, tasks in progress, all could be lost during the compaction, and voilà, your agent has amnesia.
The fix
Instead of putting everything inside your conversation only, I created openclaw-pawpad to give each individual OpenClaw session a freeform note file and a structured task list to read and update. This information is persisted on disk and does not get impacted by compaction.
How? The plugin registers a hook that reads the files and injects their content into the system prompt on every agent turn. The injected context looks like this:
Your persistent session state — survives context compaction.
Update via pawpad_tasks and pawpad_note tools.
- [x] (high) Set up Docker build + Nginx reverse proxy
- [x] (high) Fix TLS certificate error (switched to distroless)
- [ ] (low) Write deployment docs
- Runtime image: gcr.io/distroless/static-debian12 (not Alpine — TLS issues)
- LLM backend: localhost:4141, model gpt-5-mini
- Nginx: proxy_cache keys_zone needs restart (not reload) to clear
- This is an open source project — no local-only dependencies allowedThe agent gets tools to manage the task list and freeform notes. Writes are atomic so you don’t end up with half‑written files.
Setup
It’s easy to set up:
openclaw plugins install openclaw-pawpadNo configuration needed. Restart OpenClaw and it works.
Does it help?
I’ve been playing with it for a few weeks. Before pawpad, my agent would get amnesia after ~15 minutes of heavy conversation. Now the tasks and notes persist across compactions and the agent never forgets.
But since I’m the one creating this plugin, my experience could just be placebo and your mileage may vary. So feel free to test and let me know your thoughts!