openclaw - 💡(How to fix) Fix memory_search falls back because qmd managed collection memory-alt-main is missing and repair does not recreate it [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#59073Fetched 2026-04-08 02:29:03
View on GitHub
Comments
2
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
subscribed ×3commented ×2

On OpenClaw 2026.3.31, memory_search attempts to query qmd with a managed collection named memory-alt-main, but that collection does not exist. The repair path logs that it is repairing missing managed collections and retrying once, but the collection still is not created/rebound successfully. Search then falls back to the builtin index and still returns results.

Error Message

qmd search failed because a managed collection is missing; repairing collections and retrying once qmd collection add skipped for memory-alt-main: qmd collection add /Users/geo/.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

Use 'qmd update' to re-index it, or remove it first with 'qmd collection remove memory-root-main'

qmd search failed: Error: qmd search <query> --json -n 5 -c memory-alt-main failed (code 1): Collection not found: memory-alt-main qmd memory failed; switching to builtin index: qmd search <query> --json -n 5 -c memory-alt-main failed (code 1): Collection not found: memory-alt-main

Root Cause

qmd search failed because a managed collection is missing; repairing collections and retrying once
qmd collection add skipped for memory-alt-main: qmd collection add /Users/geo/.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

Code Example

qmd search failed because a managed collection is missing; repairing collections and retrying once
qmd collection add skipped for memory-alt-main: qmd collection add /Users/geo/.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

Use 'qmd update' to re-index it, or remove it first with 'qmd collection remove memory-root-main'

qmd search failed: Error: qmd search <query> --json -n 5 -c memory-alt-main failed (code 1): Collection not found: memory-alt-main
qmd memory failed; switching to builtin index: qmd search <query> --json -n 5 -c memory-alt-main failed (code 1): Collection not found: memory-alt-main

---

fallback.from: qmd
reason: qmd search IBKR preferences long-term memory --json -n 5 -c memory-alt-main failed (code 1): Collection not found: memory-alt-main

---

Collections (2):

daily-logs (qmd://daily-logs/)
 Pattern: **/*.md
 Files: 12
 Updated: 43m ago

workspace (qmd://workspace/)
 Pattern: *.md
 Files: 8
 Updated: 3d ago

---

qmd collection remove daily-logs
qmd collection remove workspace
RAW_BUFFERClick to expand / collapse

Summary

On OpenClaw 2026.3.31, memory_search attempts to query qmd with a managed collection named memory-alt-main, but that collection does not exist. The repair path logs that it is repairing missing managed collections and retrying once, but the collection still is not created/rebound successfully. Search then falls back to the builtin index and still returns results.

Environment

  • OpenClaw: 2026.3.31 (213a704)
  • OS: macOS arm64
  • Session/agent context: main agent
  • Memory status from openclaw status --deep:
    • Memory | 61 files · 61 chunks · sources memory · plugin memory-core · vector ready

Symptoms

Warnings observed:

qmd search failed because a managed collection is missing; repairing collections and retrying once
qmd collection add skipped for memory-alt-main: qmd collection add /Users/geo/.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

Use 'qmd update' to re-index it, or remove it first with 'qmd collection remove memory-root-main'

qmd search failed: Error: qmd search <query> --json -n 5 -c memory-alt-main failed (code 1): Collection not found: memory-alt-main
qmd memory failed; switching to builtin index: qmd search <query> --json -n 5 -c memory-alt-main failed (code 1): Collection not found: memory-alt-main

A later memory_search tool call also reported fallback details consistent with this:

fallback.from: qmd
reason: qmd search IBKR preferences long-term memory --json -n 5 -c memory-alt-main failed (code 1): Collection not found: memory-alt-main

What I checked

qmd collection list showed user-visible collections that did not match the managed collection name OpenClaw was searching for:

Collections (2):

daily-logs (qmd://daily-logs/)
 Pattern: **/*.md
 Files: 12
 Updated: 43m ago

workspace (qmd://workspace/)
 Pattern: *.md
 Files: 8
 Updated: 3d ago

After removing those collections manually:

qmd collection remove daily-logs
qmd collection remove workspace

OpenClaw still did not recreate a working memory-alt-main collection, and subsequent memory searches still failed against -c memory-alt-main and fell back to builtin memory.

Also, grepping the built dist for a literal memory-alt-main string returned nothing, which suggests the managed collection name is generated dynamically rather than hardcoded.

Expected behavior

If qmd-backed memory expects a managed collection such as memory-alt-main, then one of these should happen:

  1. OpenClaw should create/rebind that collection successfully during initialization or repair, or
  2. the repair path should migrate older/unexpected collection names robustly, or
  3. qmd search should target the actually managed collection name instead of a missing derived name.

Actual behavior

  • qmd search targets memory-alt-main
  • collection is missing
  • repair path logs that it is repairing
  • collection still remains missing
  • memory falls back to builtin index

Possible root cause

It looks like a managed-collection naming mismatch during/after a migration to scoped collection names (for example <base>-<agentId>), where the repair flow only understands legacy names of the form <base> and does not recover from other pre-existing collection names or conflicting bindings. Another possibility is that repair runs in a different qmd config/env context than the visible CLI state, so creation/rebinding is not taking effect as intended.

Repro sketch

  1. Start on OpenClaw 2026.3.31
  2. Have qmd enabled for memory
  3. Trigger memory_search
  4. Observe qmd search targeting -c memory-alt-main
  5. Observe repair warning and fallback to builtin index
  6. qmd collection list does not show memory-alt-main

Impact

Memory functionality still works due to builtin fallback, but qmd-backed search appears unusable/noisy in this state and emits confusing warnings.

extent analysis

TL;DR

The most likely fix is to manually create or rebind the missing memory-alt-main collection using the qmd collection add command.

Guidance

  • Verify that the memory-alt-main collection does not exist by running qmd collection list and checking the output for the collection name.
  • Try creating the memory-alt-main collection manually using the qmd collection add command, as suggested in the error message: qmd collection add /Users/geo/.openclaw/workspace --name memory-alt-main --glob memory.md.
  • If the collection creation fails due to a conflicting collection, remove the conflicting collection using qmd collection remove and then retry creating the memory-alt-main collection.
  • After creating the collection, retry the memory_search operation to see if it succeeds.

Example

qmd collection add /Users/geo/.openclaw/workspace --name memory-alt-main --glob memory.md

Note: Replace the path and glob pattern with the actual values for your environment.

Notes

The issue seems to be related to a managed-collection naming mismatch, and the repair flow not recovering from pre-existing collection names or conflicting bindings. Manually creating or rebinding the missing collection may resolve the issue, but it's unclear why the repair flow is not working as expected.

Recommendation

Apply a workaround by manually creating or rebinding the missing memory-alt-main collection, as this is the most straightforward way to resolve the issue and get qmd-backed search working again.

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

If qmd-backed memory expects a managed collection such as memory-alt-main, then one of these should happen:

  1. OpenClaw should create/rebind that collection successfully during initialization or repair, or
  2. the repair path should migrate older/unexpected collection names robustly, or
  3. qmd search should target the actually managed collection name instead of a missing derived name.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING