Description
The edit tool sometimes returns a failure message ("Edit failed") even though the file was actually successfully modified. This has been observed multiple times (2026-03-12, 2026-03-14).
Steps to Reproduce
- Use the edit tool to modify a file
- The tool returns "⚠️ 📝 Edit: in (XX chars) failed"
- However, grep verification shows the file was actually modified successfully
Expected Behavior
If the edit is successful, the tool should return a success message. If it fails, it should return a clear failure reason.
Actual Behavior
- Tool returns "failed" but file is modified
- This causes confusion about whether the operation succeeded
- Workaround: Use grep to verify if file was actually modified
Environment
- OpenClaw version: 2026.3.12
- macOS
- Channel: Discord (observed)
Logs
From gateway.err.log:
Note: This log entry shows a "failed" message, but grep confirms the file was modified successfully.
Additional Context
This is a false positive - the operation actually succeeds but the tool reports failure.
Description
The edit tool sometimes returns a failure message ("Edit failed") even though the file was actually successfully modified. This has been observed multiple times (2026-03-12, 2026-03-14).
Steps to Reproduce
Expected Behavior
If the edit is successful, the tool should return a success message. If it fails, it should return a clear failure reason.
Actual Behavior
Environment
Logs
From gateway.err.log:
Note: This log entry shows a "failed" message, but grep confirms the file was modified successfully.
Additional Context
This is a false positive - the operation actually succeeds but the tool reports failure.