-
-
Notifications
You must be signed in to change notification settings - Fork 52.6k
Description
Summary
In isolated agentTurn cron jobs, the write tool consistently reports a failure (shown as lastError and lastDeliveryError in cron job state), but the file is actually created successfully on disk. This causes consecutiveErrors to increment on every run even though the job completed its work correctly.
Steps to Reproduce
- Create a cron job with
sessionTarget: "isolated"andpayload.kind: "agentTurn" - In the agent turn, instruct the agent to write a file to a path within an agent workspace (e.g.
/home/user/agents/project/agent/memory/DATE.md) - Observe: the file is written correctly to disk
- Observe: cron job state shows
lastRunStatus: "error"andlastError: "⚠️ ✍️ Write:to ~/agents/.../memory/DATE.md (NNN chars)failed"
Expected Behavior
If the file is written successfully, the job should report lastRunStatus: "ok". The error state should only trigger if the write genuinely failed.
Actual Behavior
Job reports error on every run. consecutiveErrors increments indefinitely. Files exist on disk with correct content. Example from a real job:
{
"lastRunStatus": "error",
"lastError": "⚠️ ✍️ Write: `to ~/agents/always-invert/cv/memory/2026-03-01-morning.md (682 chars)` failed",
"consecutiveErrors": 2
}Verified the file exists and contains correct content:
$ cat /home/george-agent/agents/always-invert/cv/memory/2026-03-01-morning.md
# ai-cv Morning Standup — 2026-03-01
...
This affects all isolated agentTurn cron jobs that write memory files — tested across 5 separate jobs (ai-cv, ai-infra, ai-data, ai-sim morning/nightly standups). Every job shows the same pattern.
Additional Notes
- The Telegram
messagetool calls in the same jobs succeed without error - The write path uses
~/agents/...(tilde expansion) — possible the sandbox reports a path resolution failure even after successfully writing - Issue may be related to Edit tool does not expand ~ (tilde) in file paths #30669 (Edit tool does not expand ~ in tilde paths) — write tool may be resolving the path correctly for the actual write but failing a post-write verification step against the unexpanded path
OpenClaw Version
2026.2.24
Operating System
Ubuntu (Linux 6.17.0-14-generic x64)
Install Method
npm global (npm install -g openclaw)