James Layne ·
How To Fix Your OpenClaw's Memory FOR GOOD (Compaction & Indexing Fix)
OpenClaw memory fix for compaction, indexing, and memory loss issues. In this tutorial I show you how to fix the most common problems that cause your OpenClaw agents to forget context and lose track of conversations. I walk through the exact settings I changed to fix compaction errors, improve memory retention, and get indexing working properly. If your OpenClaw agents keep forgetting what you told them or losing context mid-conversation, these are the settings you need to change right now.
=== COMPACTION === “compaction”: { “mode”: “default”, “reserveTokens”: 16000, “keepRecentTokens”: 20000, “reserveTokensFloor”: 24000, “maxHistoryShare”: 0.65, “model”: “ADD A COMPACTION MODEL”, “memoryFlush”: { “enabled”: true, “softThresholdTokens”: 32000, “prompt”: “Save decisions, state changes, lessons, blockers, approved actions, and open tasks to memory/YYYY-MM-DD.md. Skip routine conversation. If nothing worth storing: NO_FLUSH”, “systemPrompt”: “Only persist what matters for session continuity. Be concise, no filler.” } }, “heartbeat”: { “every”: “30m”, “model”: “ADD A HEARTBEAT MODEL” }, “maxConcurrent”: 4, “subagents”: { “maxConcurrent”: 8
Video chapters
- 0:00 — OpenClaw Memory Fix
- 0:44 — OpenClaw Memory Explained
- 2:47 — Problems In Paradise
- 4:45 — Step 1. Compaction
- 8:16 — Step 2. Pruning
- 9:04 — Step 3. Memory Flush
- 11:17 — Step 4. QMD
Watch the full video and find the original resources on YouTube.