[BUG]
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
- Environment: Windows 11
- File type: .sql / .java / .md
- Error: "File has been unexpectedly modified. Read it again before attempting to write it."
- Steps to reproduce:
a. Read file with Read tool
b. Immediately attempt Edit tool on same file
c. Error occurs even when no other process touched the file
- Expected behavior: Edit should work since nothing modified the file
- Actual behavior: Edit fails with vague error and no diagnostic information
- Impact: Makes Edit tool completely unusable, forces workarounds with Bash/PowerShell which are unreliable
I am using Claude 2.0.37 (latest version as of 11 Novemeber 2025). The tooling for Claude is completely broken. When attempting to modify any file, the tooling reports "Error: File has been unexpectedly modified. Read it again before attempting to write it." despite the file not being touched.
It does this consistently for every file it needs to change. It then gets stuck in a loop of reading the file, confirming no changes occured, trying to write to the file again, and hitting the exact same error. A single write-to-file request can waste up to 30% of Pro token usage just from Claude running in an unbreakable loop.
Tooling provides no mention of what modification happened to the file or when. Claude is clearly caching some sort of invalid copies of the file and then bugging when it has to update them.
What Should Happen?
Tooling should identify that a file has not been modified and allow Claude to write to the file. Currently tooling is literally gaslighting your AI
Error Messages/Logs
Error: File has been unexpectedly modified. Read it again before attempting to write it.
Steps to Reproduce
Run latest Claude version on IntelliJ IDE and attempt to make edits to a file more than once in the session.
ALL files begin saying " Error: File has been unexpectedly modified. Read it again before attempting to write it." when attempting to write to them
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.30 +-
Claude Code Version
2.0.37
Platform
Anthropic API
Operating System
Windows 11
Terminal/Shell
Terminal.app (Windows 11 - IntelliJ IDE Terminal)
Additional Information
2.0.37
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗