Skip to content

memory_search fails: agent ID suffix appended to custom QMD collection names #52539

@lobsrice

Description

@lobsrice

OpenClaw version

2026.3.13 (61d171a)

Description

When using memory_search with custom QMD collections (e.g. notion-mirror, sheets-mirror), the tool fails because QmdMemoryManager appends the agent ID suffix to collection names at query time.

Steps to reproduce

  1. Configure QMD collections in openclaw.yaml:
qmd:
  collections:
    notion-mirror:
      source: /path/to/notion-mirror
    sheets-mirror:
      source: /path/to/sheets-mirror
  1. Run memory_search from an agent (e.g. agent ID main)

  2. The tool queries for collections named notion-mirror-main and sheets-mirror-main instead of notion-mirror and sheets-mirror

Expected behavior

memory_search should query collections using their configured names without modification.

Actual behavior

QmdMemoryManager creates per-agent isolated QMD instances and appends the agent ID suffix (-main, -lobssearch, etc.) to collection names. Collections registered as notion-mirror are queried as notion-mirror-main, which doesn't exist.

Root cause (source analysis)

In qmd-manager-rY-Y6sbN.js, QmdMemoryManager creates isolated instances per agent with separate XDG directories. The collection name resolution logic appends the agent ID to the collection name, causing a mismatch between the registered name and the queried name.

Workaround attempted

Renaming collections to include the agent ID suffix (e.g. notion-mirror-main) did not work — appears to double-append, resulting in notion-mirror-main-main.

Impact

Semantic search across custom QMD collections is completely broken for all agents. The default MEMORY.md + memory/*.md search still works (those use the built-in collection path), but any custom collections are inaccessible.

Metadata

Metadata

Assignees

Labels

No labels
No labels

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