Plugin Version
1.1.0-beta.10
OpenClaw Version
2026.4.9 (commit 0512059)
Bug Description
When mdMirror.enabled: true but mdMirror.dir is not set, the fallback directory resolves to {CWD}/memory-md instead of a stable absolute path like ~/.openclaw/memory/md-mirror.
In index.ts, createMdMirrorWriter() computes:
const fallbackDir = api.resolvePath(config.mdMirror.dir || "memory-md");
Since "memory-md" is a relative path, api.resolvePath() resolves it relative to the current working directory. During gateway startup, openclaw doctor runs, or CLI invocations, the CWD varies — so the mirror files end up in arbitrary locations and the following warning is logged on every plugin load:
[plugins] mdMirror: no agent workspaces found, writes will use fallback dir: /some/random/cwd/memory-md
The existing getDefaultDbPath() function already follows the correct pattern — resolving to ~/.openclaw/memory/lancedb-pro using homedir() + join(). The mdMirror default should follow the same convention.
This bug was identified with the assistance of Claude Code (AI). The accompanying fix PR was also AI-assisted.
Expected Behavior
When mdMirror.dir is not explicitly configured, the fallback should resolve to ~/.openclaw/memory/md-mirror (an absolute path inside the OpenClaw data directory), regardless of CWD.
Steps to Reproduce
- Set
plugins.entries.memory-lancedb-pro.config.mdMirror.enabled: true in ~/.openclaw/openclaw.json
- Do not set
mdMirror.dir
- Restart the gateway (
systemctl --user restart openclaw-gateway.service)
- Observe the log warning showing the CWD-relative fallback path:
[plugins] mdMirror: no agent workspaces found, writes will use fallback dir: /home/user/memory-md
- Run
openclaw doctor from a different directory — the fallback path changes to match that CWD
Error Logs / Screenshots
2026-04-14T21:43:39.614-05:00 [plugins] mdMirror: no agent workspaces found, writes will use fallback dir: /home/eric/memory-md
Embedding Provider
OpenAI
OS / Platform
Linux Mint (Ubuntu 24.04 base), Node.js v24.6.0
Plugin Version
1.1.0-beta.10
OpenClaw Version
2026.4.9 (commit 0512059)
Bug Description
When
mdMirror.enabled: truebutmdMirror.diris not set, the fallback directory resolves to{CWD}/memory-mdinstead of a stable absolute path like~/.openclaw/memory/md-mirror.In
index.ts,createMdMirrorWriter()computes:Since
"memory-md"is a relative path,api.resolvePath()resolves it relative to the current working directory. During gateway startup,openclaw doctorruns, or CLI invocations, the CWD varies — so the mirror files end up in arbitrary locations and the following warning is logged on every plugin load:The existing
getDefaultDbPath()function already follows the correct pattern — resolving to~/.openclaw/memory/lancedb-prousinghomedir()+join(). The mdMirror default should follow the same convention.This bug was identified with the assistance of Claude Code (AI). The accompanying fix PR was also AI-assisted.
Expected Behavior
When
mdMirror.diris not explicitly configured, the fallback should resolve to~/.openclaw/memory/md-mirror(an absolute path inside the OpenClaw data directory), regardless of CWD.Steps to Reproduce
plugins.entries.memory-lancedb-pro.config.mdMirror.enabled: truein~/.openclaw/openclaw.jsonmdMirror.dirsystemctl --user restart openclaw-gateway.service)openclaw doctorfrom a different directory — the fallback path changes to match that CWDError Logs / Screenshots
Embedding Provider
OpenAI
OS / Platform
Linux Mint (Ubuntu 24.04 base), Node.js v24.6.0