← All videos

James Layne ·

How To Fix Your OpenClaw's Memory FOR GOOD (Compaction & Indexing Fix)

How To Fix Your OpenClaw's Memory FOR GOOD (Compaction & Indexing Fix) Watch on YouTube ↗

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

Watch the full video and find the original resources on YouTube.