Skip to content

[Bug]: QMD backend falls back to builtin on live openclaw memory search due to managed collection mismatch (memory-alt-main vs memory-root-main) #65890

@chrissuarez

Description

@chrissuarez

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

With memory.backend = "qmd", live openclaw memory search falls back to builtin because OpenClaw requests memory-alt-main while the managed QMD state reports an existing collection named memory-root-main for the same workspace path/pattern.

Steps to reproduce

  1. Set memory.backend to "qmd" in openclaw.json.
  2. Restart the gateway with openclaw gateway restart.
  3. Run openclaw memory search "Bert WSL IP".
  4. Observe that the command logs a QMD collection mismatch for memory-alt-main, then reports qmd memory failed; switching to builtin index.

Expected behavior

If memory.backend is set to "qmd", openclaw memory search should execute against the managed QMD backend without logging qmd memory failed; switching to builtin index.

Actual behavior

openclaw memory search "Bert WSL IP" logs the following observed errors and then falls back to builtin results:

qmd collection add skipped for memory-alt-main: qmd collection add /home/chris/.openclaw/workspace --name memory-alt-main --glob memory.md failed (code 1): A collection already exists for this path and pattern:
  Name: memory-root-main (qmd://memory-root-main/)
  Pattern: **/*.md
...
qmd search failed: Error: qmd search Bert WSL IP --json -n 6 -c memory-alt-main failed (code 1): Collection not found: memory-alt-main
...
qmd memory failed; switching to builtin index

Observed managed QMD config contained:

collections:
  memory-dir-main:
    path: /home/chris/.openclaw/workspace/memory
    pattern: "**/*.md"
  sessions-main:
    path: /home/chris/.openclaw/agents/main/qmd/sessions
    pattern: "**/*.md"
  memory-root-main:
    path: /home/chris/.openclaw/workspace
    pattern: "**/*.md"

After manually adding memory-alt-main to the managed index.yml, openclaw memory status --deep showed QMD as active with embeddings/vector ready, but live openclaw memory search still logged the same collection-mismatch failure and fell back to builtin.

OpenClaw version

2026.4.11

Operating system

Ubuntu 24.04 in WSL2 on Windows

Install method

Global npm install under Node v24.14.1 (npm i -g openclaw@latest was used during debugging on Bert WSL)

Model

Memory backend under test: QMD

Provider / routing chain

OpenClaw main agent -> configured memory backend qmd -> OpenClaw-managed QMD state under ~/.openclaw/agents/main/qmd/... -> fallback to builtin memory when live QMD search fails

Additional provider/model setup details

  • OpenClaw was configured with memory.backend = "qmd" and QMD sessions enabled.
  • Managed QMD state path observed in status output: ~/.openclaw/agents/main/qmd/xdg-cache/qmd/index.sqlite.
  • Standalone qmd status in the user shell used a different QMD index at ~/.cache/qmd/index.sqlite and showed healthy collections/embeddings there.
  • QMD in WSL ran on CPU only. qmd status reported no GPU acceleration and a failed Vulkan build fallback.
  • The issue being reported here is the managed collection mismatch and fallback behavior, not the CPU-only acceleration warning.

Logs, screenshots, and evidence

Observed `openclaw memory search "Bert WSL IP"` output:


qmd collection add skipped for memory-alt-main: qmd collection add /home/chris/.openclaw/workspace --name memory-alt-main --glob memory.md failed (code 1): A collection already exists for this path and pattern:
  Name: memory-root-main (qmd://memory-root-main/)
  Pattern: **/*.md

qmd search failed because a managed collection is missing; repairing collections and retrying once

qmd search failed: Error: qmd search Bert WSL IP --json -n 6 -c memory-alt-main failed (code 1): Collection not found: memory-alt-main

qmd memory failed; switching to builtin index


Observed `openclaw memory status --deep` after manually adding `memory-alt-main`:


Memory Search (main)
Provider: qmd (requested: qmd)
Model: qmd
Sources: memory, sessions
Indexed: 168/56 files · 168 chunks
Embeddings: ready
Vector: ready
QMD audit: ~/.openclaw/agents/main/qmd/xdg-cache/qmd/index.sqlite · 11173888 bytes · 4 collections


Observed managed QMD config file contents from `~/.openclaw/agents/main/qmd/xdg-config/qmd/index.yml` before manual patch:


collections:
  memory-dir-main:
    path: /home/chris/.openclaw/workspace/memory
    pattern: "**/*.md"
  sessions-main:
    path: /home/chris/.openclaw/agents/main/qmd/sessions
    pattern: "**/*.md"
  memory-root-main:
    path: /home/chris/.openclaw/workspace
    pattern: "**/*.md"


Observed standalone `qmd status` in shell:


Index: /home/chris/.cache/qmd/index.sqlite
Documents
  Total:    219 files indexed
  Vectors:  1762 embedded
Collections
  .openclaw (qmd://.openclaw/)

Impact and severity

When memory.backend is set to "qmd", live openclaw memory search can fail over to builtin instead of using QMD, even while status output suggests QMD is active. This affects reliability of the configured backend and makes it difficult to verify or use QMD as the actual memory engine. Severity appears moderate based on direct observation because memory search still returns results through builtin fallback, but the requested QMD backend is not reliably serving live queries.

Additional information

  • The issue was observed repeatedly across gateway restarts and a full wsl --shutdown / restart cycle.
  • Manual edits to the managed QMD index.yml improved status output but did not stop live searches from failing over to builtin.
  • Standalone QMD and OpenClaw-managed QMD appear to use different state directories, which may be relevant to triage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions