openclaw - 💡(How to fix) Fix QMD extraCollections cross-agent: collections created but 0 files indexed [2 comments, 2 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#58644Fetched 2026-04-08 01:59:48
View on GitHub
Comments
2
Participants
2
Timeline
5
Reactions
0
Assignees
Timeline (top)
commented ×2assigned ×1closed ×1locked ×1

When configuring agents.list[].memorySearch.qmd.extraCollections to point at another agent's QMD sessions directory, the collection is registered in QMD but contains 0 files even after qmd update.

Root Cause

When configuring agents.list[].memorySearch.qmd.extraCollections to point at another agent's QMD sessions directory, the collection is registered in QMD but contains 0 files even after qmd update.

Code Example

{
  "agents": {
    "list": [
      {
        "id": "researcher",
        "memorySearch": {
          "qmd": {
            "extraCollections": [
              { "path": "/home/ubuntu/.openclaw/agents/main/qmd/sessions", "name": "main" },
              { "path": "/home/ubuntu/.openclaw/agents/coder/qmd/sessions", "name": "coder" }
            ]
          }
        }
      }
    ]
  }
}

---

$ ls ~/.openclaw/agents/main/qmd/sessions/*.md | head -3
/home/ubuntu/.openclaw/agents/main/qmd/sessions/05358796...jsonl.reset.2026-03-05T17-37-31.601Z.md
/home/ubuntu/.openclaw/agents/main/qmd/sessions/066388ae...jsonl.reset.2026-02-23T15-31-45.456Z.md
RAW_BUFFERClick to expand / collapse

Bug Report

Version: v2026.3.31 Platform: Linux arm64 (Ubuntu), npm global install

Summary

When configuring agents.list[].memorySearch.qmd.extraCollections to point at another agent's QMD sessions directory, the collection is registered in QMD but contains 0 files even after qmd update.

Configuration

{
  "agents": {
    "list": [
      {
        "id": "researcher",
        "memorySearch": {
          "qmd": {
            "extraCollections": [
              { "path": "/home/ubuntu/.openclaw/agents/main/qmd/sessions", "name": "main" },
              { "path": "/home/ubuntu/.openclaw/agents/coder/qmd/sessions", "name": "coder" }
            ]
          }
        }
      }
    ]
  }
}

Steps to Reproduce

  1. Enable QMD backend with sessions indexing (memory.backend: "qmd", memory.qmd.sessions.enabled: true)
  2. Configure extraCollections pointing at another agent's ~/.openclaw/agents/<id>/qmd/sessions directory
  3. Start gateway — collections are added to QMD index
  4. Run qmd collection list — cross-agent collections show Files: 0
  5. Run qmd update manually — still 0 files

Expected Behavior

Collections should index the markdown session transcript files present in the target path.

Observed Behavior

Collections are registered with the correct path but show 0 files. The target directories contain valid .md files (e.g. abc123.jsonl.reset.2026-03-05T17-37.md):

$ ls ~/.openclaw/agents/main/qmd/sessions/*.md | head -3
/home/ubuntu/.openclaw/agents/main/qmd/sessions/05358796...jsonl.reset.2026-03-05T17-37-31.601Z.md
/home/ubuntu/.openclaw/agents/main/qmd/sessions/066388ae...jsonl.reset.2026-02-23T15-31-45.456Z.md

Hypothesis

Each agent has its own QMD index database at ~/.openclaw/agents/<agentId>/qmd/xdg-cache/qmd/index.sqlite. Cross-agent extraCollections may require a shared QMD index to work, which is not documented and not the current default. Alternatively, the collection add may be passing incorrect glob/path parameters that don't match the compound filenames in the sessions directory.

Related

  • Issue #58598 (diffs plugin broken — same session)
  • Issue #58643 (memory-alt conflict warnings)

extent analysis

TL;DR

  • The issue may be resolved by ensuring a shared QMD index database for cross-agent collections or verifying the glob/path parameters used when adding collections.

Guidance

  • Verify that the QMD index database is shared among agents or consider using a shared index database for cross-agent collections.
  • Check the glob/path parameters used when adding collections to ensure they match the compound filenames in the sessions directory.
  • Review the documentation for extraCollections to see if there are any specific requirements or limitations for cross-agent collections.
  • Test the collection addition process with a simplified filename or path to isolate the issue.

Example

  • No code snippet is provided as the issue is more related to configuration and indexing rather than code.

Notes

  • The issue may be related to the fact that each agent has its own QMD index database, and cross-agent collections may require a shared index.
  • The filenames in the sessions directory have a compound format, which may not be matched by the default glob/path parameters.

Recommendation

  • Apply workaround: Use a shared QMD index database for cross-agent collections or modify the glob/path parameters to match the compound filenames in the sessions directory.
  • Reason: This approach addresses the potential issue of each agent having its own QMD index database and ensures that the collection addition process can handle compound filenames.

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