[Bug] Claude fails to self-correct on file read-before-write errors
Resolved 💬 3 comments Opened May 4, 2026 by ikari-pl Closed May 7, 2026
Bug Description
Claude stops on 'file must be read before write' and other errors, instead of self correcting. For example:
⏺ Update(/Users/ikari/src/gada/runtime/bench/bench_runner.adb)
⎿ Error: File has not been read yet. Read it first before writing to it.
✻ Brewed for 18m 57s · 6 shells still running
This happens often and is unpredictable.
Environment Info
- Platform: darwin
- Terminal: WarpTerminal
- Version: 2.1.126
- Feedback ID: e5772239-aaa4-4b64-997d-59d119fbca99
Errors
[{"error":"Error: ensureToolResultPairing: repaired missing tool_result blocks (10 -> 10 messages). Message structure: [0] user; [1] user; [2] assistant(id=msg_0133QBamcwnbLmZbTzzbVQRv, tool_uses=[toolu_01MFQ7Rkn2jAVdniz1t37HUG]); [3] user(tool_results=[toolu_01MFQ7Rkn2jAVdniz1t37HUG]); [4] assistant(id=msg_01XBtUVNv3uXTnUXmvfewWX8, tool_uses=[toolu_01Sa2cJwAm1VJuZU8wbUgkZj]); [5] user(tool_results=[toolu_01Sa2cJwAm1VJuZU8wbUgkZj]); [6] assistant(id=msg_01T3ErZ5FrjHRvbMGqJxqHCf, tool_uses=[toolu_016274MAQw38RzYdPtDCGA41]); [7] user(tool_results=[toolu_016274MAQw38RzYdPtDCGA41]); [8] assistant(id=msg_01GrrXwo9qYj93Vfvp49H93i, tool_uses=[toolu_01C8sRM56FBCL2Bux4mpNo8U]); [9] user\n at YQ7 (/$bunfs/root/src/entrypoints/cli.js:5385:10309)\n at vJK (/$bunfs/root/src/entrypoints/cli.js:8908:10975)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-02T21:08:52.827Z"}]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗