openclaw - 💡(How to fix) Fix Bug: Memory flush blocks writes to non-memory file paths

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

When a file write operation targets a non-memory path (e.g. workspace tasks or skill files), write requests are rejected with the error: This error message suggests the restriction only applies to writes outside memory/ directory, but it fires even when the write target is a completely unrelated path (e.g. ~/.openclaw/workspace/tasks/tasks/{uuid}/filename.md). Write is rejected with memory flush error, even though the target path is NOT in memory/.

  • Write target that triggered error: ~/.openclaw/workspace/tasks/tasks/b57c69c1-ca83-413f-90e1-6ea5cfd8a6d8/PDF支持能力建设.md The error message says memory flush writes are restricted to memory/ paths — which is the intended restriction. However, the enforcement logic appears to be incorrectly treating ALL write attempts as memory flush writes when the flush background job is running. This is likely a race condition where the write tool misattributes the destination due to a write lock held by the flush job. The write eventually succeeded on retry, confirming it is a transient race condition, not a permanent config error.

Root Cause

The error message says memory flush writes are restricted to memory/ paths — which is the intended restriction. However, the enforcement logic appears to be incorrectly treating ALL write attempts as memory flush writes when the flush background job is running. This is likely a race condition where the write tool misattributes the destination due to a write lock held by the flush job. The write eventually succeeded on retry, confirming it is a transient race condition, not a permanent config error.

Code Example

Memory flush writes are restricted to memory/2026-05-15.md; use that path only.
RAW_BUFFERClick to expand / collapse

Bug Description

When a file write operation targets a non-memory path (e.g. workspace tasks or skill files), write requests are rejected with the error:

Memory flush writes are restricted to memory/2026-05-15.md; use that path only.

This error message suggests the restriction only applies to writes outside memory/ directory, but it fires even when the write target is a completely unrelated path (e.g. ~/.openclaw/workspace/tasks/tasks/{uuid}/filename.md).

Steps to Reproduce

  1. Have a running OpenClaw session with memoryFlush enabled
  2. Concurrently write to a non-memory path (e.g. update a task tracker file under ~/.openclaw/workspace/tasks/)
  3. If memory flush happens to run at the same time as the write, the write is rejected

Expected Behavior

Writes to ~/.openclaw/workspace/tasks/ or other non-memory paths should not be rejected by memory flush mechanisms.

Actual Behavior

Write is rejected with memory flush error, even though the target path is NOT in memory/.

Environment

  • OpenClaw version: 2026.5.12-beta.5 (gateway) / 2026.5.7 (CLI)
  • macOS: Darwin 25.4.0 (arm64)
  • Node: v26.0.0
  • Runtime: Exo-Service node (agent=main)

Relevant Paths

  • Write target that triggered error: ~/.openclaw/workspace/tasks/tasks/b57c69c1-ca83-413f-90e1-6ea5cfd8a6d8/PDF支持能力建设.md
  • This path is NOT in the memory/ directory

Analysis

The error message says memory flush writes are restricted to memory/ paths — which is the intended restriction. However, the enforcement logic appears to be incorrectly treating ALL write attempts as memory flush writes when the flush background job is running. This is likely a race condition where the write tool misattributes the destination due to a write lock held by the flush job. The write eventually succeeded on retry, confirming it is a transient race condition, not a permanent config error.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING