Description
When using the edit tool, if the oldText does not match exactly (including whitespace and newlines), the edit fails with an error. There is no staleness detection or retry mechanism.
Expected behavior
The tool should either:
- Detect if the file was modified between read and edit
- Provide a retry option
- Show current file content on match failure
Related Issues
Workaround
Using exec + echo/append to write to files instead.
Environment
- OpenClaw version: 2026.3.11
- Node: 22.22.1
Description
When using the edit tool, if the oldText does not match exactly (including whitespace and newlines), the edit fails with an error. There is no staleness detection or retry mechanism.
Expected behavior
The tool should either:
Related Issues
Workaround
Using exec + echo/append to write to files instead.
Environment