#QMD SafeOpenError when indexing sessions

1 messages · Page 1 of 1 (latest)

vital meteor
#

The memory subsystem is failing to index sessions (memory files work correctly) because the agent sessions live outside of the agent's workspace directory.

  • workspace: .openclaw/workspace/my-agent
  • agentDir: .openclaw/agents/my-agent

I believe that as the agentDir is outside of the workspace when the memory subsystem tries to index the sessions it fails and thros the error:

16:23:48+00:00 warn memory {"subsystem":"memory"} qmd boot update failed: SafeOpenError: path is not a regular file under root
16:23:48+00:00 error Memory index failed (my-agent): path is not a regular file under root | spawn python3 ENOENT

I have already filed a bug about that but I wanted to see if I'm misconfiguring something or if there's a workaround to be able to index the agent's sessions that do not involve me running an external cron job that calls qmd directly.

solar owlBOT
exotic hatchBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

solar owlBOT
rocky charmBOT
#

Let me check the docs and source so I don't guess.

#

I found the session indexing path in source, and it's a bit different than your hypothesis. I'm checking the exact failure path now.

#

I don’t think this is a workspace vs agentDir misconfig.

I checked the current docs/source, and QMD session indexing is supposed to work with transcripts living outside the workspace. OpenClaw exports the raw session JSONL from ~/.openclaw/agents/<id>/sessions/ into sanitized Markdown under ~/.openclaw/agents/<id>/qmd/sessions/, then QMD indexes that.

The big clue is here:

... | spawn python3 ENOENT

That points to the real blocker. The safe writer used during session export shells out to python3, and if python3 is missing in the gateway/container PATH, OpenClaw currently wraps that up as the misleading:

SafeOpenError: path is not a regular file under root

So my read is:

#
  • not a bad workspace / agentDir layout
  • likely missing python3 in the runtime that’s running the gateway

Workarounds that should help without an external cron job:

  • install python3 in the container/host running OpenClaw
  • or set OPENCLAW_PINNED_WRITE_PYTHON=/absolute/path/to/python3
  • leave memory.qmd.sessions.exportDir unset for now, so it uses the default export dir

Also, if you’re still on 2026.3.28, I’d update first. There were a few QMD session fixes right after that.

Can you paste these?

openclaw --version
which python3