openclaw - 💡(How to fix) Fix [Bug]: QMD memory index healthy, but memory_search always returns empty results (per‑agent QMD, OpenClaw 2026.4.5) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#63317Fetched 2026-04-09 07:55:19
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2

Version / Environment

  • OpenClaw: 2026.4.5 (3e72c03)
  • Host: macOS (Administrator’s Mac mini, Apple Silicon)
  • Agent: bot_1 (Supervisor), workspace ~/.openclaw/bot-1-supervisor
  • Memory backend: qmd

Symptom

From inside the bot_1 agent:

  • Every memory_search call returns:
      {
        "results": [],
        "provider": "qmd",
        "model": "qmd",
        "citations": "auto"
      }
  • This happens for many queries that definitely exist in the indexed memory (e.g. mlx_openai_server.py, backup.sh, Network/IP policy, Qdrant indexer, Elhaus-Labs, etc.).

At the same time, openclaw memory status shows a fully populated QMD index for bot_1 and bot_2.

Evidence from openclaw memory status

  openclaw memory status

Output (relevant parts):

  🦞 OpenClaw 2026.4.5 (3e72c03)

  Memory Search (bot_1)
  Provider: qmd (requested: qmd)
  Model: qmd
  Sources: memory
  Indexed: 1596/12 files · 1596 chunks
  Dirty: no
  Store: ~/.openclaw/agents/bot_1/qmd/xdg-cache/qmd/index.sqlite
  Workspace: ~/.openclaw/bot-1-supervisor
  By source:
   memory · 1596/12 files · 1596 chunks
  Vector: ready
  QMD audit: ~/.openclaw/agents/bot_1/qmd/xdg-cache/qmd/index.sqlite · 112001024 bytes · 10 collections

  Memory Search (bot_2)
  Provider: qmd (requested: qmd)
  Model: qmd
  Sources: memory
  Indexed: 1596/0 files · 1596 chunks
  Dirty: no
  Store: ~/.openclaw/agents/bot_2/qmd/xdg-cache/qmd/index.sqlite
  Workspace: ~/.openclaw/bot-2-worker
  By source:
   memory · 1596/0 files · 1596 chunks
  Vector: ready
  QMD audit: ~/.openclaw/agents/bot_2/qmd/xdg-cache/qmd/index.sqlite · 117489664 bytes · 10 collections

So:

  • QMD is the active provider.
  • Both agents point at the correct per‑agent QMD stores under ~/.openclaw/agents/.../qmd/xdg-cache/qmd/index.sqlite.
  • The stores are ~100 MB, 10 collections, 1596 chunks.

Config snippets

openclaw.json (relevant parts):

  "env": {
    "QMD_EMBED_MODEL": "hf:Qwen/Qwen3-Embedding-0.6B-GGUF/Qwen3-Embedding-0.6B-Q8_0.gguf",
    "QMD_RERANK_MODEL": "hf:sinjab/Qwen3-Reranker-4B-Q4_K_M-GGUF/Qwen3-Reranker-4B-Q4_K_M.gguf",
    ...
  },

  "agents": {
    "defaults": {
      "memorySearch": {
        "enabled": true,
        "sources": ["memory"],
        "qmd": {
          "extraCollections": []
        },
        ...
      },
      "workspace": "/Users/bot/.openclaw/bot-1-supervisor",
      ...
    },
    "list": [
      {
        "id": "bot_1",
        "default": true,
        "name": "Supervisor",
        "model": "openai/gpt-5.1",
        "heartbeat": { "every": "0" },
        "params": {
          "thinking": "low",
          "env": {
            "XDG_CACHE_HOME": "/Users/bot/.openclaw/agents/bot_1/qmd/xdg-cache"
          }
        },
        "memorySearch": {
          "qmd": {
            "extraCollections": [
              {
                "name": "bot1-memory-root",
                "path": "/Users/bot/.openclaw/bot-1-supervisor",
                "pattern": "MEMORY.md"
              },
              {
                "name": "bot1-memory-dir",
                "path": "/Users/bot/.openclaw/bot-1-supervisor/memory",
                "pattern": "**/*.md"
              },
              {
                "name": "bot1-archive",
                "path": "/Users/bot/.openclaw/bot-1-supervisor/archive",
                "pattern": "**/*.{md,mdx,txt,json,jsonl,yml,yaml}"
              },
              {
                "name": "bot1-meetings",
                "path": "/Users/bot/.openclaw/bot-1-supervisor/meetings",
                "pattern": "**/*.{md,mdx,txt,json,jsonl,yml,yaml}"
              }
            ]
          }
        },
        "workspace": "/Users/bot/.openclaw/bot-1-supervisor"
      },
      {
        "id": "bot_2",
        "name": "Worker",
        "workspace": "/Users/bot/.openclaw/bot-2-worker",
        "model": "openai/gpt-5.2-codex",
        "heartbeat": { "every": "0" },
        "params": {
          "thinking": "medium",
          "env": {
            "XDG_CACHE_HOME": "/Users/bot/.openclaw/agents/bot_2/qmd/xdg-cache"
          }
        },
        "memorySearch": {
          "qmd": {
            "extraCollections": [
              {
                "name": "bot2-memory-root",
                "path": "/Users/bot/.openclaw/bot-2-worker",
                "pattern": "MEMORY.md"
              },
              {
                "name": "bot2-memory-dir",
                "path": "/Users/bot/.openclaw/bot-2-worker/memory",
                "pattern": "**/*.md"
              }
            ]
          }
        }
      }
    ]
  },

  "memory": {
    "backend": "qmd",
    "citations": "auto",
    "qmd": {
      "command": "/opt/homebrew/bin/qmd",
      "searchMode": "query",
      "includeDefaultMemory": false,
      "paths": [
        {
          "name": "knowledgebase",
          "path": "/Volumes/OpenClaw/Knowledgebase",
          "pattern": "**/*.{md,mdx,txt,json,jsonl,yml,yaml}"
        },
        {
          "name": "codebase",
          "path": "/Volumes/OpenClaw/Elhaus-Labs",
          "pattern":
"**/*.{ts,tsx,js,jsx,mjs,cjs,py,go,rs,java,kt,swift,cs,cpp,c,h,hpp,sql,sh,ps1,php,rb,lua,r,scala,clj,json,jsonl,yaml,yml,toml,ini,env,md,mdx,txt,html,htm,css,scss,sass,less,st
yl,vue,svelte,astro,xml,svg,graphql,gql,proto,ipynb}"
        },
        {
          "name": "mail-archive",
          "path": "/Volumes/OpenClaw/mail_archive",
          "pattern": "**/*.{json,jsonl,eml,txt,md}"
        },
        {
          "name": "sms-archive",
          "path": "/Volumes/OpenClaw/sms_archive",
          "pattern": "**/*.{json,jsonl,txt,md}"
        },
        {
          "name": "bot1-memory-root",
          "path": "/Users/bot/.openclaw/bot-1-supervisor",
          "pattern": "MEMORY.md"
        },
        {
          "name": "bot1-memory-dir",
          "path": "/Users/bot/.openclaw/bot-1-supervisor/memory",
          "pattern": "**/*.md"
        },
        {
          "name": "bot1-archive",
          "path": "/Users/bot/.openclaw/bot-1-supervisor/archive",
          "pattern": "**/*.{md,mdx,txt,json,jsonl,yml,yaml}"
        },
        {
          "name": "bot1-meetings",
          "path": "/Users/bot/.openclaw/bot-1-supervisor/meetings",
          "pattern": "**/*.{md,mdx,txt,json,jsonl,yml,yaml}"
        },
        {
          "name": "bot2-memory-root",
          "path": "/Users/bot/.openclaw/bot-2-worker",
          "pattern": "MEMORY.md"
        },
        {
          "name": "bot2-memory-dir",
          "path": "/Users/bot/.openclaw/bot-2-worker/memory",
          "pattern": "**/*.md"
        }
      ],
      "sessions": { "enabled": false },
      "update": {
        "interval": "2m",
        "debounceMs": 10000,
        "onBoot": true,
        "waitForBootSync": false,
        "embedInterval": "15m",
        "commandTimeoutMs": 30000,
        "updateTimeoutMs": 600000,
        "embedTimeoutMs": 28800000
      },
      "limits": {
        "maxResults": 8,
        "maxSnippetChars": 900,
        "maxInjectedChars": 12000,
        "timeoutMs": 12000
      },
      "scope": {
        "default": "allow"
      },
      "mcporter": {
        "enabled": true,
        "serverName": "qmd",
        "startDaemon": true
      }
    }
  }

Root Cause

Version / Environment

  • OpenClaw: 2026.4.5 (3e72c03)
  • Host: macOS (Administrator’s Mac mini, Apple Silicon)
  • Agent: bot_1 (Supervisor), workspace ~/.openclaw/bot-1-supervisor
  • Memory backend: qmd

Symptom

From inside the bot_1 agent:

  • Every memory_search call returns:
      {
        "results": [],
        "provider": "qmd",
        "model": "qmd",
        "citations": "auto"
      }
  • This happens for many queries that definitely exist in the indexed memory (e.g. mlx_openai_server.py, backup.sh, Network/IP policy, Qdrant indexer, Elhaus-Labs, etc.).

At the same time, openclaw memory status shows a fully populated QMD index for bot_1 and bot_2.

Evidence from openclaw memory status

  openclaw memory status

Output (relevant parts):

  🦞 OpenClaw 2026.4.5 (3e72c03)

  Memory Search (bot_1)
  Provider: qmd (requested: qmd)
  Model: qmd
  Sources: memory
  Indexed: 1596/12 files · 1596 chunks
  Dirty: no
  Store: ~/.openclaw/agents/bot_1/qmd/xdg-cache/qmd/index.sqlite
  Workspace: ~/.openclaw/bot-1-supervisor
  By source:
   memory · 1596/12 files · 1596 chunks
  Vector: ready
  QMD audit: ~/.openclaw/agents/bot_1/qmd/xdg-cache/qmd/index.sqlite · 112001024 bytes · 10 collections

  Memory Search (bot_2)
  Provider: qmd (requested: qmd)
  Model: qmd
  Sources: memory
  Indexed: 1596/0 files · 1596 chunks
  Dirty: no
  Store: ~/.openclaw/agents/bot_2/qmd/xdg-cache/qmd/index.sqlite
  Workspace: ~/.openclaw/bot-2-worker
  By source:
   memory · 1596/0 files · 1596 chunks
  Vector: ready
  QMD audit: ~/.openclaw/agents/bot_2/qmd/xdg-cache/qmd/index.sqlite · 117489664 bytes · 10 collections

So:

  • QMD is the active provider.
  • Both agents point at the correct per‑agent QMD stores under ~/.openclaw/agents/.../qmd/xdg-cache/qmd/index.sqlite.
  • The stores are ~100 MB, 10 collections, 1596 chunks.

Config snippets

openclaw.json (relevant parts):

  "env": {
    "QMD_EMBED_MODEL": "hf:Qwen/Qwen3-Embedding-0.6B-GGUF/Qwen3-Embedding-0.6B-Q8_0.gguf",
    "QMD_RERANK_MODEL": "hf:sinjab/Qwen3-Reranker-4B-Q4_K_M-GGUF/Qwen3-Reranker-4B-Q4_K_M.gguf",
    ...
  },

  "agents": {
    "defaults": {
      "memorySearch": {
        "enabled": true,
        "sources": ["memory"],
        "qmd": {
          "extraCollections": []
        },
        ...
      },
      "workspace": "/Users/bot/.openclaw/bot-1-supervisor",
      ...
    },
    "list": [
      {
        "id": "bot_1",
        "default": true,
        "name": "Supervisor",
        "model": "openai/gpt-5.1",
        "heartbeat": { "every": "0" },
        "params": {
          "thinking": "low",
          "env": {
            "XDG_CACHE_HOME": "/Users/bot/.openclaw/agents/bot_1/qmd/xdg-cache"
          }
        },
        "memorySearch": {
          "qmd": {
            "extraCollections": [
              {
                "name": "bot1-memory-root",
                "path": "/Users/bot/.openclaw/bot-1-supervisor",
                "pattern": "MEMORY.md"
              },
              {
                "name": "bot1-memory-dir",
                "path": "/Users/bot/.openclaw/bot-1-supervisor/memory",
                "pattern": "**/*.md"
              },
              {
                "name": "bot1-archive",
                "path": "/Users/bot/.openclaw/bot-1-supervisor/archive",
                "pattern": "**/*.{md,mdx,txt,json,jsonl,yml,yaml}"
              },
              {
                "name": "bot1-meetings",
                "path": "/Users/bot/.openclaw/bot-1-supervisor/meetings",
                "pattern": "**/*.{md,mdx,txt,json,jsonl,yml,yaml}"
              }
            ]
          }
        },
        "workspace": "/Users/bot/.openclaw/bot-1-supervisor"
      },
      {
        "id": "bot_2",
        "name": "Worker",
        "workspace": "/Users/bot/.openclaw/bot-2-worker",
        "model": "openai/gpt-5.2-codex",
        "heartbeat": { "every": "0" },
        "params": {
          "thinking": "medium",
          "env": {
            "XDG_CACHE_HOME": "/Users/bot/.openclaw/agents/bot_2/qmd/xdg-cache"
          }
        },
        "memorySearch": {
          "qmd": {
            "extraCollections": [
              {
                "name": "bot2-memory-root",
                "path": "/Users/bot/.openclaw/bot-2-worker",
                "pattern": "MEMORY.md"
              },
              {
                "name": "bot2-memory-dir",
                "path": "/Users/bot/.openclaw/bot-2-worker/memory",
                "pattern": "**/*.md"
              }
            ]
          }
        }
      }
    ]
  },

  "memory": {
    "backend": "qmd",
    "citations": "auto",
    "qmd": {
      "command": "/opt/homebrew/bin/qmd",
      "searchMode": "query",
      "includeDefaultMemory": false,
      "paths": [
        {
          "name": "knowledgebase",
          "path": "/Volumes/OpenClaw/Knowledgebase",
          "pattern": "**/*.{md,mdx,txt,json,jsonl,yml,yaml}"
        },
        {
          "name": "codebase",
          "path": "/Volumes/OpenClaw/Elhaus-Labs",
          "pattern":
"**/*.{ts,tsx,js,jsx,mjs,cjs,py,go,rs,java,kt,swift,cs,cpp,c,h,hpp,sql,sh,ps1,php,rb,lua,r,scala,clj,json,jsonl,yaml,yml,toml,ini,env,md,mdx,txt,html,htm,css,scss,sass,less,st
yl,vue,svelte,astro,xml,svg,graphql,gql,proto,ipynb}"
        },
        {
          "name": "mail-archive",
          "path": "/Volumes/OpenClaw/mail_archive",
          "pattern": "**/*.{json,jsonl,eml,txt,md}"
        },
        {
          "name": "sms-archive",
          "path": "/Volumes/OpenClaw/sms_archive",
          "pattern": "**/*.{json,jsonl,txt,md}"
        },
        {
          "name": "bot1-memory-root",
          "path": "/Users/bot/.openclaw/bot-1-supervisor",
          "pattern": "MEMORY.md"
        },
        {
          "name": "bot1-memory-dir",
          "path": "/Users/bot/.openclaw/bot-1-supervisor/memory",
          "pattern": "**/*.md"
        },
        {
          "name": "bot1-archive",
          "path": "/Users/bot/.openclaw/bot-1-supervisor/archive",
          "pattern": "**/*.{md,mdx,txt,json,jsonl,yml,yaml}"
        },
        {
          "name": "bot1-meetings",
          "path": "/Users/bot/.openclaw/bot-1-supervisor/meetings",
          "pattern": "**/*.{md,mdx,txt,json,jsonl,yml,yaml}"
        },
        {
          "name": "bot2-memory-root",
          "path": "/Users/bot/.openclaw/bot-2-worker",
          "pattern": "MEMORY.md"
        },
        {
          "name": "bot2-memory-dir",
          "path": "/Users/bot/.openclaw/bot-2-worker/memory",
          "pattern": "**/*.md"
        }
      ],
      "sessions": { "enabled": false },
      "update": {
        "interval": "2m",
        "debounceMs": 10000,
        "onBoot": true,
        "waitForBootSync": false,
        "embedInterval": "15m",
        "commandTimeoutMs": 30000,
        "updateTimeoutMs": 600000,
        "embedTimeoutMs": 28800000
      },
      "limits": {
        "maxResults": 8,
        "maxSnippetChars": 900,
        "maxInjectedChars": 12000,
        "timeoutMs": 12000
      },
      "scope": {
        "default": "allow"
      },
      "mcporter": {
        "enabled": true,
        "serverName": "qmd",
        "startDaemon": true
      }
    }
  }

Code Example

{
      "results": [],
      "provider": "qmd",
      "model": "qmd",
      "citations": "auto"
    }

---

openclaw memory status

---

🦞 OpenClaw 2026.4.5 (3e72c03)

  Memory Search (bot_1)
  Provider: qmd (requested: qmd)
  Model: qmd
  Sources: memory
  Indexed: 1596/12 files · 1596 chunks
  Dirty: no
  Store: ~/.openclaw/agents/bot_1/qmd/xdg-cache/qmd/index.sqlite
  Workspace: ~/.openclaw/bot-1-supervisor
  By source:
   memory · 1596/12 files · 1596 chunks
  Vector: ready
  QMD audit: ~/.openclaw/agents/bot_1/qmd/xdg-cache/qmd/index.sqlite · 112001024 bytes · 10 collections

  Memory Search (bot_2)
  Provider: qmd (requested: qmd)
  Model: qmd
  Sources: memory
  Indexed: 1596/0 files · 1596 chunks
  Dirty: no
  Store: ~/.openclaw/agents/bot_2/qmd/xdg-cache/qmd/index.sqlite
  Workspace: ~/.openclaw/bot-2-worker
  By source:
   memory · 1596/0 files · 1596 chunks
  Vector: ready
  QMD audit: ~/.openclaw/agents/bot_2/qmd/xdg-cache/qmd/index.sqlite · 117489664 bytes · 10 collections

---

"env": {
    "QMD_EMBED_MODEL": "hf:Qwen/Qwen3-Embedding-0.6B-GGUF/Qwen3-Embedding-0.6B-Q8_0.gguf",
    "QMD_RERANK_MODEL": "hf:sinjab/Qwen3-Reranker-4B-Q4_K_M-GGUF/Qwen3-Reranker-4B-Q4_K_M.gguf",
    ...
  },

  "agents": {
    "defaults": {
      "memorySearch": {
        "enabled": true,
        "sources": ["memory"],
        "qmd": {
          "extraCollections": []
        },
        ...
      },
      "workspace": "/Users/bot/.openclaw/bot-1-supervisor",
      ...
    },
    "list": [
      {
        "id": "bot_1",
        "default": true,
        "name": "Supervisor",
        "model": "openai/gpt-5.1",
        "heartbeat": { "every": "0" },
        "params": {
          "thinking": "low",
          "env": {
            "XDG_CACHE_HOME": "/Users/bot/.openclaw/agents/bot_1/qmd/xdg-cache"
          }
        },
        "memorySearch": {
          "qmd": {
            "extraCollections": [
              {
                "name": "bot1-memory-root",
                "path": "/Users/bot/.openclaw/bot-1-supervisor",
                "pattern": "MEMORY.md"
              },
              {
                "name": "bot1-memory-dir",
                "path": "/Users/bot/.openclaw/bot-1-supervisor/memory",
                "pattern": "**/*.md"
              },
              {
                "name": "bot1-archive",
                "path": "/Users/bot/.openclaw/bot-1-supervisor/archive",
                "pattern": "**/*.{md,mdx,txt,json,jsonl,yml,yaml}"
              },
              {
                "name": "bot1-meetings",
                "path": "/Users/bot/.openclaw/bot-1-supervisor/meetings",
                "pattern": "**/*.{md,mdx,txt,json,jsonl,yml,yaml}"
              }
            ]
          }
        },
        "workspace": "/Users/bot/.openclaw/bot-1-supervisor"
      },
      {
        "id": "bot_2",
        "name": "Worker",
        "workspace": "/Users/bot/.openclaw/bot-2-worker",
        "model": "openai/gpt-5.2-codex",
        "heartbeat": { "every": "0" },
        "params": {
          "thinking": "medium",
          "env": {
            "XDG_CACHE_HOME": "/Users/bot/.openclaw/agents/bot_2/qmd/xdg-cache"
          }
        },
        "memorySearch": {
          "qmd": {
            "extraCollections": [
              {
                "name": "bot2-memory-root",
                "path": "/Users/bot/.openclaw/bot-2-worker",
                "pattern": "MEMORY.md"
              },
              {
                "name": "bot2-memory-dir",
                "path": "/Users/bot/.openclaw/bot-2-worker/memory",
                "pattern": "**/*.md"
              }
            ]
          }
        }
      }
    ]
  },

  "memory": {
    "backend": "qmd",
    "citations": "auto",
    "qmd": {
      "command": "/opt/homebrew/bin/qmd",
      "searchMode": "query",
      "includeDefaultMemory": false,
      "paths": [
        {
          "name": "knowledgebase",
          "path": "/Volumes/OpenClaw/Knowledgebase",
          "pattern": "**/*.{md,mdx,txt,json,jsonl,yml,yaml}"
        },
        {
          "name": "codebase",
          "path": "/Volumes/OpenClaw/Elhaus-Labs",
          "pattern":
"**/*.{ts,tsx,js,jsx,mjs,cjs,py,go,rs,java,kt,swift,cs,cpp,c,h,hpp,sql,sh,ps1,php,rb,lua,r,scala,clj,json,jsonl,yaml,yml,toml,ini,env,md,mdx,txt,html,htm,css,scss,sass,less,st
yl,vue,svelte,astro,xml,svg,graphql,gql,proto,ipynb}"
        },
        {
          "name": "mail-archive",
          "path": "/Volumes/OpenClaw/mail_archive",
          "pattern": "**/*.{json,jsonl,eml,txt,md}"
        },
        {
          "name": "sms-archive",
          "path": "/Volumes/OpenClaw/sms_archive",
          "pattern": "**/*.{json,jsonl,txt,md}"
        },
        {
          "name": "bot1-memory-root",
          "path": "/Users/bot/.openclaw/bot-1-supervisor",
          "pattern": "MEMORY.md"
        },
        {
          "name": "bot1-memory-dir",
          "path": "/Users/bot/.openclaw/bot-1-supervisor/memory",
          "pattern": "**/*.md"
        },
        {
          "name": "bot1-archive",
          "path": "/Users/bot/.openclaw/bot-1-supervisor/archive",
          "pattern": "**/*.{md,mdx,txt,json,jsonl,yml,yaml}"
        },
        {
          "name": "bot1-meetings",
          "path": "/Users/bot/.openclaw/bot-1-supervisor/meetings",
          "pattern": "**/*.{md,mdx,txt,json,jsonl,yml,yaml}"
        },
        {
          "name": "bot2-memory-root",
          "path": "/Users/bot/.openclaw/bot-2-worker",
          "pattern": "MEMORY.md"
        },
        {
          "name": "bot2-memory-dir",
          "path": "/Users/bot/.openclaw/bot-2-worker/memory",
          "pattern": "**/*.md"
        }
      ],
      "sessions": { "enabled": false },
      "update": {
        "interval": "2m",
        "debounceMs": 10000,
        "onBoot": true,
        "waitForBootSync": false,
        "embedInterval": "15m",
        "commandTimeoutMs": 30000,
        "updateTimeoutMs": 600000,
        "embedTimeoutMs": 28800000
      },
      "limits": {
        "maxResults": 8,
        "maxSnippetChars": 900,
        "maxInjectedChars": 12000,
        "timeoutMs": 12000
      },
      "scope": {
        "default": "allow"
      },
      "mcporter": {
        "enabled": true,
        "serverName": "qmd",
        "startDaemon": true
      }
    }
  }

---

"params": {
      "thinking": "low",
      "env": {
        "XDG_CACHE_HOME": "/Users/bot/.openclaw/agents/bot_1/qmd/xdg-cache"
      }
    }

---

openclaw memory index --force
    openclaw memory status

---
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Version / Environment

  • OpenClaw: 2026.4.5 (3e72c03)
  • Host: macOS (Administrator’s Mac mini, Apple Silicon)
  • Agent: bot_1 (Supervisor), workspace ~/.openclaw/bot-1-supervisor
  • Memory backend: qmd

Symptom

From inside the bot_1 agent:

  • Every memory_search call returns:
      {
        "results": [],
        "provider": "qmd",
        "model": "qmd",
        "citations": "auto"
      }
  • This happens for many queries that definitely exist in the indexed memory (e.g. mlx_openai_server.py, backup.sh, Network/IP policy, Qdrant indexer, Elhaus-Labs, etc.).

At the same time, openclaw memory status shows a fully populated QMD index for bot_1 and bot_2.

Evidence from openclaw memory status

  openclaw memory status

Output (relevant parts):

  🦞 OpenClaw 2026.4.5 (3e72c03)

  Memory Search (bot_1)
  Provider: qmd (requested: qmd)
  Model: qmd
  Sources: memory
  Indexed: 1596/12 files · 1596 chunks
  Dirty: no
  Store: ~/.openclaw/agents/bot_1/qmd/xdg-cache/qmd/index.sqlite
  Workspace: ~/.openclaw/bot-1-supervisor
  By source:
   memory · 1596/12 files · 1596 chunks
  Vector: ready
  QMD audit: ~/.openclaw/agents/bot_1/qmd/xdg-cache/qmd/index.sqlite · 112001024 bytes · 10 collections

  Memory Search (bot_2)
  Provider: qmd (requested: qmd)
  Model: qmd
  Sources: memory
  Indexed: 1596/0 files · 1596 chunks
  Dirty: no
  Store: ~/.openclaw/agents/bot_2/qmd/xdg-cache/qmd/index.sqlite
  Workspace: ~/.openclaw/bot-2-worker
  By source:
   memory · 1596/0 files · 1596 chunks
  Vector: ready
  QMD audit: ~/.openclaw/agents/bot_2/qmd/xdg-cache/qmd/index.sqlite · 117489664 bytes · 10 collections

So:

  • QMD is the active provider.
  • Both agents point at the correct per‑agent QMD stores under ~/.openclaw/agents/.../qmd/xdg-cache/qmd/index.sqlite.
  • The stores are ~100 MB, 10 collections, 1596 chunks.

Config snippets

openclaw.json (relevant parts):

  "env": {
    "QMD_EMBED_MODEL": "hf:Qwen/Qwen3-Embedding-0.6B-GGUF/Qwen3-Embedding-0.6B-Q8_0.gguf",
    "QMD_RERANK_MODEL": "hf:sinjab/Qwen3-Reranker-4B-Q4_K_M-GGUF/Qwen3-Reranker-4B-Q4_K_M.gguf",
    ...
  },

  "agents": {
    "defaults": {
      "memorySearch": {
        "enabled": true,
        "sources": ["memory"],
        "qmd": {
          "extraCollections": []
        },
        ...
      },
      "workspace": "/Users/bot/.openclaw/bot-1-supervisor",
      ...
    },
    "list": [
      {
        "id": "bot_1",
        "default": true,
        "name": "Supervisor",
        "model": "openai/gpt-5.1",
        "heartbeat": { "every": "0" },
        "params": {
          "thinking": "low",
          "env": {
            "XDG_CACHE_HOME": "/Users/bot/.openclaw/agents/bot_1/qmd/xdg-cache"
          }
        },
        "memorySearch": {
          "qmd": {
            "extraCollections": [
              {
                "name": "bot1-memory-root",
                "path": "/Users/bot/.openclaw/bot-1-supervisor",
                "pattern": "MEMORY.md"
              },
              {
                "name": "bot1-memory-dir",
                "path": "/Users/bot/.openclaw/bot-1-supervisor/memory",
                "pattern": "**/*.md"
              },
              {
                "name": "bot1-archive",
                "path": "/Users/bot/.openclaw/bot-1-supervisor/archive",
                "pattern": "**/*.{md,mdx,txt,json,jsonl,yml,yaml}"
              },
              {
                "name": "bot1-meetings",
                "path": "/Users/bot/.openclaw/bot-1-supervisor/meetings",
                "pattern": "**/*.{md,mdx,txt,json,jsonl,yml,yaml}"
              }
            ]
          }
        },
        "workspace": "/Users/bot/.openclaw/bot-1-supervisor"
      },
      {
        "id": "bot_2",
        "name": "Worker",
        "workspace": "/Users/bot/.openclaw/bot-2-worker",
        "model": "openai/gpt-5.2-codex",
        "heartbeat": { "every": "0" },
        "params": {
          "thinking": "medium",
          "env": {
            "XDG_CACHE_HOME": "/Users/bot/.openclaw/agents/bot_2/qmd/xdg-cache"
          }
        },
        "memorySearch": {
          "qmd": {
            "extraCollections": [
              {
                "name": "bot2-memory-root",
                "path": "/Users/bot/.openclaw/bot-2-worker",
                "pattern": "MEMORY.md"
              },
              {
                "name": "bot2-memory-dir",
                "path": "/Users/bot/.openclaw/bot-2-worker/memory",
                "pattern": "**/*.md"
              }
            ]
          }
        }
      }
    ]
  },

  "memory": {
    "backend": "qmd",
    "citations": "auto",
    "qmd": {
      "command": "/opt/homebrew/bin/qmd",
      "searchMode": "query",
      "includeDefaultMemory": false,
      "paths": [
        {
          "name": "knowledgebase",
          "path": "/Volumes/OpenClaw/Knowledgebase",
          "pattern": "**/*.{md,mdx,txt,json,jsonl,yml,yaml}"
        },
        {
          "name": "codebase",
          "path": "/Volumes/OpenClaw/Elhaus-Labs",
          "pattern":
"**/*.{ts,tsx,js,jsx,mjs,cjs,py,go,rs,java,kt,swift,cs,cpp,c,h,hpp,sql,sh,ps1,php,rb,lua,r,scala,clj,json,jsonl,yaml,yml,toml,ini,env,md,mdx,txt,html,htm,css,scss,sass,less,st
yl,vue,svelte,astro,xml,svg,graphql,gql,proto,ipynb}"
        },
        {
          "name": "mail-archive",
          "path": "/Volumes/OpenClaw/mail_archive",
          "pattern": "**/*.{json,jsonl,eml,txt,md}"
        },
        {
          "name": "sms-archive",
          "path": "/Volumes/OpenClaw/sms_archive",
          "pattern": "**/*.{json,jsonl,txt,md}"
        },
        {
          "name": "bot1-memory-root",
          "path": "/Users/bot/.openclaw/bot-1-supervisor",
          "pattern": "MEMORY.md"
        },
        {
          "name": "bot1-memory-dir",
          "path": "/Users/bot/.openclaw/bot-1-supervisor/memory",
          "pattern": "**/*.md"
        },
        {
          "name": "bot1-archive",
          "path": "/Users/bot/.openclaw/bot-1-supervisor/archive",
          "pattern": "**/*.{md,mdx,txt,json,jsonl,yml,yaml}"
        },
        {
          "name": "bot1-meetings",
          "path": "/Users/bot/.openclaw/bot-1-supervisor/meetings",
          "pattern": "**/*.{md,mdx,txt,json,jsonl,yml,yaml}"
        },
        {
          "name": "bot2-memory-root",
          "path": "/Users/bot/.openclaw/bot-2-worker",
          "pattern": "MEMORY.md"
        },
        {
          "name": "bot2-memory-dir",
          "path": "/Users/bot/.openclaw/bot-2-worker/memory",
          "pattern": "**/*.md"
        }
      ],
      "sessions": { "enabled": false },
      "update": {
        "interval": "2m",
        "debounceMs": 10000,
        "onBoot": true,
        "waitForBootSync": false,
        "embedInterval": "15m",
        "commandTimeoutMs": 30000,
        "updateTimeoutMs": 600000,
        "embedTimeoutMs": 28800000
      },
      "limits": {
        "maxResults": 8,
        "maxSnippetChars": 900,
        "maxInjectedChars": 12000,
        "timeoutMs": 12000
      },
      "scope": {
        "default": "allow"
      },
      "mcporter": {
        "enabled": true,
        "serverName": "qmd",
        "startDaemon": true
      }
    }
  }

Steps to reproduce

Repro steps

  1. Configure memory.backend = "qmd" with the above memory.qmd.paths.
  2. Configure bot_1 and bot_2 with per‑agent QMD env:
  "params": {
    "thinking": "low",
    "env": {
      "XDG_CACHE_HOME": "/Users/bot/.openclaw/agents/bot_1/qmd/xdg-cache"
    }
  }

and similarly for bot_2. 3. Run:

  openclaw memory index --force
  openclaw memory status

Confirm that: - bot_1 and bot_2 show ~1600 chunks, ~10 collections. - Stores are under ~/.openclaw/agents/bot_1/qmd/xdg-cache/qmd/index.sqlite etc. 4. In a chat session as bot_1, call the memory_search tool (or trigger a question that explicitly asks it to search memory) for terms known to be in the indexed files (e.g. mlx_openai_server.py, “Network/IP policy”, “qdrant indexer”, “backup.sh” from recent MEMORY.md / memory/*.md).

Observed behaviour

  • memory_search returns an empty results array every time, even though openclaw memory status confirms QMD has those files indexed.

Expected behavior

Expected behaviour

  • memory_search should query the QMD index shown in openclaw memory status for the active agent and return matching snippets/documents.

Actual behavior

Hypothesis

  • The memory-core → QMD integration for agents is not actually using the same QMD collection set as openclaw memory status reports, or:
    • It is filtering out all collections by name/scope, or
    • It is constructing a query with filters (e.g. source=sessions only) that exclude the memory source, or
    • It is using a different QMD config/index than the one openclaw memory status inspects, despite both saying provider: qmd.

From the outside, it looks like:

  • QMD is correctly populated and per‑agent XDG cache paths are correct.
  • memory_search plumbing is silently dropping or misrouting queries.

Request

  • Please verify that the code path for the memory_search tool:
    • Uses the same QMD index / XDG paths as openclaw memory status.
    • Includes the memory source (and, if relevant, extraCollections) in its query.
  • If there’s additional logging I can enable for QMD / memory-core to capture the exact query/collections, I’m happy to run that and attach logs.

OpenClaw version

latest

Operating system

macOs latest

Install method

No response

Model

gpt5.1

Provider / routing chain

api to openai

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The memory search issue may be caused by the memory-core → QMD integration not using the same QMD collection set as reported by openclaw memory status, and can be fixed by verifying the code path for the memory_search tool.

Guidance

  • Verify that the memory_search tool uses the same QMD index and XDG paths as openclaw memory status.
  • Check if the memory_search query includes the memory source and extra collections.
  • Enable additional logging for QMD and memory-core to capture the exact query and collections used.
  • Review the openclaw.json configuration file to ensure that the memory and qmd settings are correctly configured for each agent.

Example

No specific code example is provided, but the issue can be debugged by adding logging statements to the memory_search tool to print the QMD index and query used.

Notes

The issue is likely caused by a mismatch between the QMD index used by openclaw memory status and the one used by the memory_search tool. Verifying the code path and logging can help identify the root cause.

Recommendation

Apply a workaround by verifying the code path and logging for the memory_search tool to ensure it uses the correct QMD index and query. This can help identify and fix the issue without requiring an upgrade to a fixed version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Expected behaviour

  • memory_search should query the QMD index shown in openclaw memory status for the active agent and return matching snippets/documents.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING