Summary
With memory.backend = "qmd" and memory.qmd.includeDefaultMemory = true, OpenClaw can generate and later search a managed collection for lowercase memory.md even when the workspace only has uppercase MEMORY.md.
That can produce a phantom managed collection lookup like:
Collection not found: memory-alt-main
while QMD itself is otherwise healthy.
Why I think this is a real bug, not bad local state
In this repo checkout there is a concrete source inconsistency around default QMD collection generation:
packages/memory-host-sdk/src/host/backend-config.ts:330-333 still declares three default entries:
MEMORY.md -> memory-root
memory.md -> memory-alt
memory/ -> memory-dir
src/memory-host-sdk/host/backend-config.ts:337-340 only declares:
MEMORY.md -> memory-root
memory/ -> memory-dir
So at least one code path in the tree still models lowercase memory.md as a default managed collection, while another does not.
Relevant lines from this checkout:
// packages/memory-host-sdk/src/host/backend-config.ts
const entries = [
{ path: workspaceDir, pattern: "MEMORY.md", base: "memory-root" },
{ path: workspaceDir, pattern: "memory.md", base: "memory-alt" },
{ path: path.join(workspaceDir, "memory"), pattern: "**/*.md", base: "memory-dir" },
];
but:
// src/memory-host-sdk/host/backend-config.ts
const entries = [
{ path: workspaceDir, pattern: "MEMORY.md", base: "memory-root" },
{ path: path.join(workspaceDir, "memory"), pattern: "**/*.md", base: "memory-dir" },
];
There is also a matching test expectation in packages/memory-host-sdk/src/host/backend-config.test.ts:39-42 that still expects memory-alt-main to exist by default.
That matches the failure seen in a real install: published/runtime code can still end up generating or searching memory-alt-* even when lowercase memory.md is absent.
Environment
- OpenClaw: 2026.4.11 on macOS
- QMD: 2.1.0
- install style: global install / gateway restart
- workspace has
MEMORY.md
- workspace does not have lowercase
memory.md
- memory backend:
qmd
Relevant config shape
{
"memory": {
"backend": "qmd",
"qmd": {
"command": "/opt/homebrew/bin/qmd",
"includeDefaultMemory": true,
"sessions": { "enabled": true },
"limits": { "timeoutMs": 10000 }
}
}
}
Repro
- Use a workspace containing
MEMORY.md and memory/, but no lowercase memory.md
- Configure
memory.backend = "qmd"
- Leave
memory.qmd.includeDefaultMemory = true
- Restart OpenClaw
- Trigger QMD-backed recall or status paths
Actual behavior
OpenClaw can try to use a managed collection named like:
for lowercase memory.md, even though that file does not exist.
Observed failure:
Collection not found: memory-alt-main
At the same time, the actual QMD index can still be healthy. In my case the live QMD collections were the expected real ones only:
memory-root-main
memory-dir-main
sessions-main
basecamp
with no valid reason for a memory-alt-main lookup.
Expected behavior
If the workspace has MEMORY.md but not lowercase memory.md, OpenClaw should not create, repair, or search a managed memory-alt-* default collection.
More generally, default managed collections should only be generated for paths that are actually part of the active default set.
Current workaround
Disable default-memory auto-generation and declare explicit QMD paths instead:
{
"memory": {
"backend": "qmd",
"qmd": {
"includeDefaultMemory": false,
"paths": [
{ "name": "memory-root", "path": "/path/to/workspace", "pattern": "MEMORY.md" },
{ "name": "memory-dir", "path": "/path/to/workspace/memory", "pattern": "**/*.md" }
]
}
}
}
That avoided the bad default collection resolution and restored working recall on the real path.
Suggested fix direction
The smallest fix seems to be:
- remove lowercase
memory.md from the default QMD collection set wherever it still exists, or
- at minimum only emit/search
memory-alt-* when that file actually exists
But the bigger thing to fix is the duplication drift: the source tree should not have one default-collection definition that includes memory-alt and another that does not.
Summary
With
memory.backend = "qmd"andmemory.qmd.includeDefaultMemory = true, OpenClaw can generate and later search a managed collection for lowercasememory.mdeven when the workspace only has uppercaseMEMORY.md.That can produce a phantom managed collection lookup like:
while QMD itself is otherwise healthy.
Why I think this is a real bug, not bad local state
In this repo checkout there is a concrete source inconsistency around default QMD collection generation:
packages/memory-host-sdk/src/host/backend-config.ts:330-333still declares three default entries:MEMORY.md->memory-rootmemory.md->memory-altmemory/->memory-dirsrc/memory-host-sdk/host/backend-config.ts:337-340only declares:MEMORY.md->memory-rootmemory/->memory-dirSo at least one code path in the tree still models lowercase
memory.mdas a default managed collection, while another does not.Relevant lines from this checkout:
but:
There is also a matching test expectation in
packages/memory-host-sdk/src/host/backend-config.test.ts:39-42that still expectsmemory-alt-mainto exist by default.That matches the failure seen in a real install: published/runtime code can still end up generating or searching
memory-alt-*even when lowercasememory.mdis absent.Environment
MEMORY.mdmemory.mdqmdRelevant config shape
{ "memory": { "backend": "qmd", "qmd": { "command": "/opt/homebrew/bin/qmd", "includeDefaultMemory": true, "sessions": { "enabled": true }, "limits": { "timeoutMs": 10000 } } } }Repro
MEMORY.mdandmemory/, but no lowercasememory.mdmemory.backend = "qmd"memory.qmd.includeDefaultMemory = trueActual behavior
OpenClaw can try to use a managed collection named like:
for lowercase
memory.md, even though that file does not exist.Observed failure:
At the same time, the actual QMD index can still be healthy. In my case the live QMD collections were the expected real ones only:
memory-root-mainmemory-dir-mainsessions-mainbasecampwith no valid reason for a
memory-alt-mainlookup.Expected behavior
If the workspace has
MEMORY.mdbut not lowercasememory.md, OpenClaw should not create, repair, or search a managedmemory-alt-*default collection.More generally, default managed collections should only be generated for paths that are actually part of the active default set.
Current workaround
Disable default-memory auto-generation and declare explicit QMD paths instead:
{ "memory": { "backend": "qmd", "qmd": { "includeDefaultMemory": false, "paths": [ { "name": "memory-root", "path": "/path/to/workspace", "pattern": "MEMORY.md" }, { "name": "memory-dir", "path": "/path/to/workspace/memory", "pattern": "**/*.md" } ] } } }That avoided the bad default collection resolution and restored working recall on the real path.
Suggested fix direction
The smallest fix seems to be:
memory.mdfrom the default QMD collection set wherever it still exists, ormemory-alt-*when that file actually existsBut the bigger thing to fix is the duplication drift: the source tree should not have one default-collection definition that includes
memory-altand another that does not.