[Bug] Edit tool reports file modified when hash unchanged on Windows with autocrlf
Resolved 💬 6 comments Opened Nov 29, 2025 by cerkon1 Closed Jan 15, 2026
Bug Description
Bug Report Summary
Issue: Edit tool reports "File has been unexpectedly modified" when the file hasn't actually changed
Evidence:
- md5sum shows file hash remains constant across multiple reads
- No external processes modifying files (verified by killing Jest watcher)
- VS Code was closed during testing
- package.json edits work fine, but .ts and .md files consistently fail
- Issue persists even with empty file watcher list
Environment:
- Windows 10 (version 10.0.26200.7171)
- Git Bash shell
- core.autocrlf=true in git config
- Claude Code CLI via npm
Steps to reproduce:
- Read a .ts or .md file
- Immediately attempt an Edit
- Error occurs even though file hasn't changed
Workaround: Use Write to create new file + mv to replace, or use sed for inline edits
Environment Info
- Platform: win32
- Terminal: null
- Version: 2.0.55
- Feedback ID: 6507f856-8081-4bb6-b62e-a593f1c7d6bb
Errors
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗