Memory 文件不存在导致中断:升级到 ENOENT 容错版本并做空文件回归
问题/场景:在新 workspace 或首次运行时,memory 文件缺失可能触发 ENOENT 中断。前置:可升级 OpenClaw 到含 `fix: memory ENOENT handling` 的提交版本。实施步骤:升级后在空 memory 场景回归读写流程,确认系统优雅处理不存在文件。关键命令:`openclaw gateway status`、`openclaw gateway restart`。验证:缺失 memory 文件时不再崩溃,流程可继续。风险:旧版本仍可能在同类场景中断。来源:GitHub commit + issue 线索交叉整理。
GITHUBDiscovered 2026-02-20Author openclaw
Prerequisites
- You can update OpenClaw to a build containing commit `083298a` or later.
- You have a test environment where missing-memory-file scenarios can be safely reproduced.
Steps
- Upgrade OpenClaw and confirm service health after restart.
- In test workspace, remove/rename target memory file to simulate first-run ENOENT case.
- Trigger a memory read/write flow and observe whether process continues without fatal crash.
- Restore normal files and run one end-to-end chat turn to ensure no regression.
Commands
openclaw gateway statusopenclaw gateway restartopenclaw statusVerify
Missing memory files are handled gracefully (no hard crash), and chat/session flow remains operational.
Caveats
- Use test/staging first; deleting files in production may remove valuable history.
- Exact fixed release tag mapping from commit hash should be confirmed in changelog(需验证).
Source attribution
This tip is aggregated from community/public sources and preserved with attribution.
Open original source ↗