[BUG] Error: File has been unexpectedly modified. Read it again before attempting to write it. Continuation of #7443 - it's still happening
Resolved 💬 3 comments Opened Jan 11, 2026 by alexeygrigorev Closed Jan 14, 2026
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?
I keep getting "Error: File has been unexpectedly modified. Read it again before attempting to write it."
It's a duplicate of an existing issue (#7443) which was closed, so I cannot write there that I'm affected too
(I'm forced to click "I have searched existing issues and this hasn't been reported yet" - this is not correct, I cannot post without clicking it)
*
● Update(docs\courses\data-engineering-zoomcamp\qa.md)
⎿ Error: File has been unexpectedly modified. Read it again before attempting to write it.
● Read(docs\courses\data-engineering-zoomcamp\qa.md)
⎿ Read 10 lines
● Update(docs\courses\data-engineering-zoomcamp\qa.md)
⎿ Error: File has been unexpectedly modified. Read it again before attempting to write it.
● Read(docs\courses\data-engineering-zoomcamp\qa.md)
⎿ Read 10 lines
● Update(docs\courses\data-engineering-zoomcamp\qa.md)
⎿ Error: File has been unexpectedly modified. Read it again before attempting to write it.
● Bash(sed -i 's/nav_order: 6/nav_order: 7/'
"C:/Users/alexe/git/notes/docs/courses/data-engineering-zoomcamp/qa.md")
⎿ (No content)
What Should Happen?
Claude Code should be able to use the edit tool to successfully edit the file without having to use echo/sed/etc
Error Messages/Logs
● Read(docs\courses\data-engineering-zoomcamp\curriculum.md)
⎿ Read 74 lines
● Update(docs\courses\data-engineering-zoomcamp\curriculum.md)
⎿ Error: File has been unexpectedly modified. Read it again before attempting to write it.
● Read(docs\courses\data-engineering-zoomcamp\curriculum.md)
⎿ Read 74 lines
● Update(docs\courses\data-engineering-zoomcamp\curriculum.md)
⎿ Error: File has been unexpectedly modified. Read it again before attempting to write it.
● Read(docs\courses\data-engineering-zoomcamp\curriculum.md)
⎿ Read 74 lines
● Update(docs\courses\data-engineering-zoomcamp\curriculum.md)
⎿ Error: File has been unexpectedly modified. Read it again before attempting to write it.
● Read(docs\courses\data-engineering-zoomcamp\curriculum.md)
⎿ Read 74 lines
● Update(docs\courses\data-engineering-zoomcamp\curriculum.md)
⎿ Error: File has been unexpectedly modified. Read it again before attempting to write it.
● There seems to be a file watcher modifying the file. Let me try once more:
● Read(docs\courses\data-engineering-zoomcamp\curriculum.md)
⎿ Read 74 lines
● Update(docs\courses\data-engineering-zoomcamp\curriculum.md)
⎿ Error: File has been unexpectedly modified. Read it again before attempting to write it.
● There's a file watcher or linter modifying the file. Let me try again:
● Read(docs\courses\data-engineering-zoomcamp\curriculum.md)
⎿ Read 74 lines
● Update(docs\courses\data-engineering-zoomcamp\curriculum.md)
⎿ Error: File has been unexpectedly modified. Read it again before attempting to write it.
Steps to Reproduce
- Use Windows 11 with Git Bash
- Ask Claude to edit a file
Claude Model
Not sure / Multiple models
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
Latest
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗