Remote OpenClaw

Remote OpenClaw Blog

OpenClaw Memory Failing? Skills and Configurations That Actually Fix It

6 min read ·

OpenClaw agents forget things. It happens to everyone. You spend twenty minutes explaining your project requirements, and an hour later the agent acts like you never spoke. The frustration is universal, but the causes are specific and fixable.

The problem is not that OpenClaw has bad memory. The problem is that OpenClaw has four separate memory layers, and most operators only understand one of them. When you know which layer failed, you know exactly which skill or configuration change will solve it.

This guide walks through the most common memory breakdowns that skill users on OpenClaw Bazaar encounter, explains why each one happens, and gives you the targeted fix for every scenario.

The Four Memory Layers Every Skill User Should Understand

Before troubleshooting, you need a mental model of how OpenClaw stores and retrieves information.

Layer 1 -- Bootstrap files. These are files like MEMORY.md and AGENTS.md that load from disk every single session. They survive compaction, restarts, and daily resets. If something lives in a bootstrap file, your agent will always have access to it.

Layer 2 -- The session transcript. This is your live conversation history. It gets rebuilt every turn, but when the context window fills up, OpenClaw runs compaction to summarize older messages. The summary is lossy. Details vanish.

Layer 3 -- The context window. This is the fixed-size bucket (usually 200K tokens) where everything coexists: system prompt, workspace files, conversation history, tool results, and loaded skills. When skills consume a large portion of this window, there is less room for everything else.

Layer 4 -- The retrieval index. This is the searchable layer over your memory files. The agent can query it, but only if information was written to files in the first place.

Every memory failure traces back to one of these layers. Once you identify which layer broke, the fix becomes obvious.

Failure: Your Agent Forgets Preferences After Installing New Skills

This is the most reported memory issue on OpenClaw Bazaar. You install several skills from the directory, and suddenly your agent stops following preferences it used to respect.

The cause is almost always context window pressure. Each installed skill adds its definition to the context window. If you install ten skills at once, you might consume 20,000 to 40,000 tokens of context space just for skill definitions. That leaves less room for your conversation history and memory files, which means compaction fires earlier and more aggressively.

The fix has two parts.

First, audit your installed skills. Run /context list in your OpenClaw session. This shows every file loaded into context, including skill definitions, and their sizes. Remove any skills you are not actively using. The Bazaar makes reinstallation easy, so there is no reason to keep dormant skills loaded.

Second, move your critical preferences into MEMORY.md so they survive compaction. Chat-based instructions are the first thing to disappear when the context window tightens. Tell your agent explicitly:

Save this to MEMORY.md: Always use TypeScript for new projects. Never delete files without confirmation. Prefer concise responses.

Skills from the Bazaar that include their own memory protocols can help automate this. Look for skills tagged with "memory management" in the directory -- several community-contributed skills handle automatic preference capture.

Failure: Compaction Wipes Out Skill-Specific Context

You are midway through a complex task using a research skill or a code-generation skill. The context window fills up, compaction fires, and suddenly the agent loses track of what the skill was doing. It starts over or produces inconsistent output.

The fix: Configure the pre-compaction memory flush so that important working context gets saved to disk before compaction summarizes it away.

{
  "agents": {
    "defaults": {
      "compaction": {
        "reserveTokensFloor": 40000,
        "memoryFlush": {
          "enabled": true,
          "softThresholdTokens": 4000,
          "systemPrompt": "Session nearing compaction. Store durable memories now.",
          "prompt": "Write any lasting notes to memory/YYYY-MM-DD.md; reply with NO_REPLY if nothing to store."
        }
      }
    }
  }
}

The reserveTokensFloor value of 40000 is critical. The default (around 20K) is too tight when you have multiple skills loaded, because skill definitions plus a single large tool output can jump past the threshold before the flush fires.

You should also learn to use /compact proactively. Save your current context to memory files, run /compact, then continue your task. Your new instructions land in fresh post-compaction context with maximum lifespan.

Failure: Memory Search Cannot Find Skill Output

You used a skill that generated valuable analysis or research findings. Later you ask the agent to recall those findings, and it returns nothing. The information was never indexed.

The built-in memory search relies on an embedding model that downloads on first use. If that download was interrupted or the configuration is missing, search fails silently.

Marketplace

Free skills and AI personas for OpenClaw — browse the marketplace.

Browse the Marketplace →

The fix: Verify your memory search configuration includes a valid provider and enable hybrid search for better recall:

{
  "agents": {
    "defaults": {
      "memorySearch": {
        "enabled": true,
        "provider": "local",
        "local": {
          "modelPath": "hf:ggml-org/embeddinggemma-300m-qat-q8_0-GGUF/embeddinggemma-300m-qat-Q8_0.gguf"
        },
        "query": {
          "hybrid": {
            "enabled": true,
            "vectorWeight": 0.7,
            "textWeight": 0.3
          }
        }
      }
    }
  }
}

Hybrid search combines keyword matching with semantic matching. If a skill wrote "we selected the $29 pricing tier" and you later search for "pricing decision," keyword search alone will miss it. Semantic search understands the relationship between those phrases.

Also add a retrieval protocol to your AGENTS.md so the agent checks its notes before answering:

## Retrieval Protocol
Before doing non-trivial work:
1. memory_search for the project/topic/user preference
2. memory_get the referenced file chunk if needed
3. Then proceed with the task

Without this rule, the agent guesses from whatever is in the current context window. It will not consult stored skill output unless you instruct it to.

Failure: Agent Forgets Everything After an Overnight Reset

OpenClaw resets sessions at 4:00 AM local time by default. A new session ID is assigned, and only bootstrap files and searchable memory files carry over. Everything that existed only in conversation is gone.

This hits particularly hard when you spent an evening configuring skills and establishing workflows with your agent. The next morning, the agent has no recollection of any of it.

The fix: Build the habit of telling your agent to save progress before ending a session:

Write today's key decisions, active tasks, and open questions to today's memory log.

The pre-compaction memory flush handles this automatically if you have memoryFlush.enabled set to true in your configuration. But relying solely on automatic flushing is risky. An explicit save command at the end of each working session costs you ten seconds and guarantees nothing is lost.

Failure: Memory Search Degrades as Your Skill Library Grows

Over weeks and months of using skills from the Bazaar, your memory files accumulate. The agent starts pulling irrelevant context from old projects into current conversations. Search results become noisy and unhelpful.

The fix for smaller setups: Weekly memory hygiene. Once a week, promote important decisions and rules from daily logs into MEMORY.md and remove anything outdated.

The fix for larger setups: Graduate to QMD (Query Markdown Documents). QMD replaces the built-in indexer and handles large-scale search much better, returning small relevant snippets instead of entire files:

{
  "memory": {
    "backend": "qmd",
    "qmd": {
      "searchMode": "search",
      "includeDefaultMemory": true,
      "paths": [
        { "name": "notes", "path": "~/Documents/Notes", "pattern": "**/*.md" }
      ]
    }
  }
}

The Three Changes That Solve 95 Percent of Memory Problems

If you take nothing else from this guide, implement these three changes:

  1. Store durable rules in files, not chat. MEMORY.md and AGENTS.md survive compaction. Chat instructions do not. Every preference, every workflow rule, every skill-specific configuration belongs in a file.

  2. Enable the memory flush with adequate buffer. Set reserveTokensFloor to 40000 and confirm memoryFlush.enabled is true. This prevents compaction from silently erasing context before it can be saved.

  3. Make retrieval mandatory. Add "search memory before acting" to your AGENTS.md. Without it, the agent guesses instead of checking its stored notes, and all your carefully saved context goes unused.

These three changes alone put you ahead of the vast majority of OpenClaw operators and save you from the kind of silent failures that waste hours of productive work.


Browse the Skills Directory

Find the right skill for your workflow. The OpenClaw Bazaar skills directory has over 2,300 community-rated skills -- searchable, sortable, and free to install.

Browse Skills -->

Want a Pre-Built Setup?

If you would rather skip the browsing, OpenClaw personas come with curated skill sets already configured. Pick a persona that matches your role and start working immediately. Compare personas -->