openclaw - 💡(How to fix) Fix QMD session collections not registered in index.yml — memory_search can't find sessions [1 comments, 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#58000Fetched 2026-04-08 01:55:01
View on GitHub
Comments
1
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
closed ×1commented ×1locked ×1

Code Example

# QMD config file only has workspace
$ cat ~/.openclaw/agents/main/qmd/xdg-config/qmd/index.yml
collections:
  workspace:
    path: /root/.openclaw/workspace
    pattern: "**/*.md"

# But the gateway uses additional collections:
$ openclaw logs | grep 'qmd query'
qmd query Don Freed ... -c memory-dir-main timed out

# Session files exist but aren't searchable:
$ ls ~/.openclaw/agents/main/qmd/sessions/ | wc -l
98
$ qmd search "test" -c sessions-main
Collection not found: sessions-main
RAW_BUFFERClick to expand / collapse

Problem

When memory.qmd.sessions.enabled = true, the gateway:

  1. ✅ Exports sanitized session transcripts as markdown to ~/.openclaw/agents/<id>/qmd/sessions/
  2. ✅ Knows about the collection internally (passes -c sessions-main to QMD CLI)
  3. ❌ Does NOT register the collection in QMD's index.yml config file

The result is that qmd search -c sessions-main returns Collection not found: sessions-main, and qmd ls only shows the workspace collection.

The same issue affects the per-source memory collections (memory-root-main, memory-alt-main, memory-dir-main, knowledge-base-main). The gateway passes these as -c flags at runtime, but they're not in index.yml either — though they seem to work when called through the gateway (perhaps via a different config path).

Evidence

# QMD config file only has workspace
$ cat ~/.openclaw/agents/main/qmd/xdg-config/qmd/index.yml
collections:
  workspace:
    path: /root/.openclaw/workspace
    pattern: "**/*.md"

# But the gateway uses additional collections:
$ openclaw logs | grep 'qmd query'
qmd query Don Freed ... -c memory-dir-main timed out

# Session files exist but aren't searchable:
$ ls ~/.openclaw/agents/main/qmd/sessions/ | wc -l
98
$ qmd search "test" -c sessions-main
Collection not found: sessions-main

Expected Behavior

When the gateway initializes QMD for an agent, it should ensure all managed collections (memory splits + sessions) are registered in QMD's index so both the gateway's runtime calls AND direct qmd CLI calls can find them.

Environment

  • OpenClaw 2026.3.28
  • memory.qmd.sessions.enabled: true
  • memory.qmd.searchMode: search

extent analysis

Fix Plan

To fix the issue, we need to register the collections in QMD's index.yml config file. Here are the steps:

  • Modify the gateway to update the index.yml file when memory.qmd.sessions.enabled is true.
  • Add the missing collections to the index.yml file.

Example code to update the index.yml file:

collections:
  workspace:
    path: /root/.openclaw/workspace
    pattern: "**/*.md"
  sessions-main:
    path: ~/.openclaw/agents/<id>/qmd/sessions/
    pattern: "**/*.md"
  memory-root-main:
    path: ~/.openclaw/agents/<id>/qmd/memory-root/
    pattern: "**/*.md"
  memory-alt-main:
    path: ~/.openclaw/agents/<id>/qmd/memory-alt/
    pattern: "**/*.md"
  memory-dir-main:
    path: ~/.openclaw/agents/<id>/qmd/memory-dir/
    pattern: "**/*.md"
  knowledge-base-main:
    path: ~/.openclaw/agents/<id>/qmd/knowledge-base/
    pattern: "**/*.md"

Replace <id> with the actual agent ID.

Verification

To verify the fix, run the following commands:

  • qmd ls should show all the registered collections, including sessions-main and the per-source memory collections.
  • qmd search "test" -c sessions-main should return the expected results.

Extra Tips

  • Make sure to update the index.yml file only when the gateway initializes QMD for an agent.
  • Use the correct agent ID when updating the index.yml file.
  • Test the fix thoroughly to ensure that both the gateway's runtime calls and direct qmd CLI calls work as expected.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING