Back to Issue home

memory management

#memory-management

Sorted by views, then solution_desc, solution, and root_cause length (desc).

2615 issues

[Bug]: SafeOpenERROR after setting up QMD memory for multi-agent setup

After configuring the QMD memory engine for a multi‑agent setup, any operation that runs the **QMD boot/update pipeline via OpenClaw** fails with: - `qmd boot update failed: SafeOpenError: path is not a regular file under root` - `Memory index failed (<agentId>): path is not a regular file under root` At the same time, QMD works correctly when run **directly** with the documented XDG paths, and `openclaw memory status` reports a valid index under the expected per‑agent state directory. For example, `openclaw memory status` for one agent: ```text Memory Search (assistant) Provider: qmd (requested: qmd) Model: qmd Sources: memory, sessions Indexed: 13/19 files · 13 chunks Dirty: no Store: ~/.openclaw/agents/assistant/qmd/xdg-cache/qmd/index.sqlite Workspace: ~/.openclaw/workspace/assistant By source: memory · 13/13 files · 13 chunks sessions · 0/6 files · 0 chunks Vector: ready Batch: disabled (failures 0/0) ``` This `Store:` path lives under the documented per‑agent state directory (`~/.openclaw/agents/<agentId>/qmd/…`) and I don’t think it should trigger `SafeOpenError`. However, when I run `openclaw memory index --force --verbose`, or when the cron job runs the memory indexer, I consistently get: ```text 🦞 OpenClaw 2026.3.28 (f9b1079) Claws out, commit in—let's ship something mildly responsible. Memory Index (main) Provider: qmd (requested: qmd) Model: qmd Sources: memory (MEMORY.md + ~/.openclaw/workspace/memory/*.md), sessions (~/.openclaw/agents/main/sessions/*.jsonl) 19:39:09+00:00 [memory] qmd boot update failed: SafeOpenError: path is not a regular file under root Memory index failed (main): path is not a regular file under root Memory Index (assistant-1) Provider: qmd (requested: qmd) Model: qmd Sources: memory (MEMORY.md + ~/.openclaw/workspace/assistant-1/memory/*.md), sessions (~/.openclaw/agents/assistant-1/sessions/*.jsonl) 19:39:10+00:00 [memory] qmd boot update failed: SafeOpenError: path is not a regular file under root Memory index failed (assistant-1): path is not a regular file under root Memory Index (assistant-2) Provider: qmd (requested: qmd) Model: qmd Sources: memory (MEMORY.md + ~/.openclaw/workspace/assistant-2/memory/*.md), sessions (~/.openclaw/agents/assistant-2/sessions/*.jsonl) 19:39:10+00:00 [memory] qmd boot update failed: SafeOpenError: path is not a regular file under root Memory index failed (assistant-2): path is not a regular file under root ``` In contrast, running QMD directly inside the same container with the documented env vars works and **does not** raise `SafeOpenError`, for example: ```bash STATE_DIR="${OPENCLAW_STATE_DIR:-$HOME/.openclaw}" export XDG_CONFIG_HOME="$STATE_DIR/agents/assistant/qmd/xdg-config" export XDG_CACHE_HOME="$STATE_DIR/agents/assistant/qmd/xdg-cache" qmd update && qmd embed && qmd status # → succeeds, uses ~/.openclaw/agents/assistant/qmd/xdg-cache/qmd/index.sqlite ``` So the bug appears to be that **OpenClaw’s memory indexer / cron wrapper is invoking QMD with a different (or mismatched) “root” for the safe‑open check than the one that works when QMD is run directly with the documented XDG paths.**