openclaw - ✅(Solved) Fix active-memory plugin: qmd search fails with "Collection not found: memory-alt-main" due to --glob flag bug [1 pull requests, 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#65769Fetched 2026-04-14 05:40:22
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
cross-referenced ×1

Root Cause

Root Cause (traced to source)

Fix Action

Workaround

Switch active-memory model to a lighter/faster one (e.g. claude-haiku-4-5) to reduce impact of the builtin fallback timeout. The collection missing issue persists either way.

PR fix notes

PR #65780: fix(agents+misc): compaction reload + memory-alt dedup + plugin model allowlist

Description (problem / solution / changelog)

Fixes\n\n### #65602 — reserveTokens overwritten by resourceLoader.reload()\nresourceLoader.reload() calls settingsManager.reload() which resets the override state set by applyPiCompactionSettingsFromConfig(). Fix: call it again after reload.\n\n### #65769 — memory-alt-main collection not found on macOS case-insensitive fs\nOn macOS HFS+/APFS, MEMORY.md and memory.md resolve to the same inode. Fix: stat both files and skip memory-alt if inode matches memory-root.\n\n### #65763 — Plugin-registered provider models return 'model not allowed'\nWhen allowAny=false (explicit allowlist configured), plugin-registered provider models were silently dropped because they are not in cfg.models.providers. Fix: mark plugin entries isFromPlugin=true in augmentModelCatalogWithProviderPlugins, then auto-add them to allowedKeys in buildAllowedModelSet.\n\n## Testing\n- pi-settings (8✅) + backend-config (19✅) + qmd-manager (83✅) + model-selection (82✅) + model-catalog (10✅)\n

Changed files

  • extensions/google/provider-models.ts (modified, +2/-2)

Code Example

XDG_CACHE_HOME=~/.openclaw/agents/main/qmd/xdg-cache XDG_CONFIG_HOME=~/.openclaw/agents/main/qmd/xdg-config qmd collection list
# Shows: memory-dir-main, openclaw-docs, memory-files, memory-root-main
# memory-alt-main is absent
RAW_BUFFERClick to expand / collapse

Version: 2026.4.10 OS: macOS 15.7.4 (arm64) — case-insensitive HFS+ filesystem

Root Cause (traced to source)

backend-config-Dd45Inug.js defines three default memory collections for the main agent:

  • memory-root-main → workspace path, pattern MEMORY.md
  • memory-alt-main → workspace path, pattern memory.md
  • memory-dir-main → workspace/memory path, pattern **/*.md

On macOS with a case-insensitive filesystem, memory.md and MEMORY.md resolve to the same inode. When ensureCollections() tries to add memory-alt-main with pattern memory.md, qmd either:

  1. Fails to create the collection because the resolved path conflicts with the already-created memory-root-main, OR
  2. Creates the collection but with 0 files (qmd uses case-sensitive glob internally)

Result: memory-alt-main is never present in the managed DB. Every search targeting it fails with Collection not found: memory-alt-main, triggering the builtin fallback. This also causes the active-memory plugin's embedded LLM call to time out at 15s (slower builtin path).

Confirmed via:

XDG_CACHE_HOME=~/.openclaw/agents/main/qmd/xdg-cache XDG_CONFIG_HOME=~/.openclaw/agents/main/qmd/xdg-config qmd collection list
# Shows: memory-dir-main, openclaw-docs, memory-files, memory-root-main
# memory-alt-main is absent

Proposed Fix

In resolveDefaultMemoryCollections() (backend-config.ts), skip creating memory-alt when the resolved canonical path of memory.md is identical (case-insensitive or inode comparison) to the already-added MEMORY.md entry. Or deduplicate by inode before calling addCollection.

Workaround

Switch active-memory model to a lighter/faster one (e.g. claude-haiku-4-5) to reduce impact of the builtin fallback timeout. The collection missing issue persists either way.

extent analysis

TL;DR

Modify the resolveDefaultMemoryCollections() function in backend-config.ts to skip creating memory-alt-main when its resolved path conflicts with memory-root-main on case-insensitive filesystems.

Guidance

  • Verify the issue by running the provided command to check if memory-alt-main is present in the managed DB.
  • To fix, update resolveDefaultMemoryCollections() to perform a case-insensitive comparison of the resolved paths for memory.md and MEMORY.md.
  • Consider deduplicating collections by inode before calling addCollection to prevent similar issues in the future.
  • As a temporary workaround, switch to a lighter active-memory model to reduce the impact of the builtin fallback timeout.

Example

// backend-config.ts
function resolveDefaultMemoryCollections() {
  // ...
  const memoryRootPath = 'MEMORY.md';
  const memoryAltPath = 'memory.md';
  if (isCaseInsensitiveFilesystem() && getCanonicalPath(memoryRootPath) === getCanonicalPath(memoryAltPath)) {
    // Skip creating memory-alt-main to avoid conflict
    return;
  }
  // ...
}

Notes

This fix assumes that the issue is specific to case-insensitive filesystems and that the conflict is due to the identical resolved paths. Additional testing may be necessary to ensure the fix works as expected.

Recommendation

Apply the proposed fix to resolveDefaultMemoryCollections() to correctly handle case-insensitive filesystems and prevent collection conflicts. This approach directly addresses the root cause and provides a more robust solution than relying on workarounds.

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