Edit/Write tools fail with false 'file modified' error on Windows
Resolved 💬 4 comments Opened Dec 12, 2025 by alanorus Closed Dec 12, 2025
Bug Description
Edit and Write tools consistently fail with false positive errors on Windows:
- Edit: 'File has been unexpectedly modified'
- Write: 'File has not been read yet'
The file is NOT actually modified - verified by checking MD5 hash and modification timestamp before and after the error.
Environment
- OS: Windows (win32)
- IDE: Cursor with Claude Code extension
Reproduction
- Read any file using Read tool
- Immediately attempt Edit or Write
- Tool fails with error
- File hash and mtime prove file was never modified
Duration
This is a persistent systemic issue, not a one-time occurrence. Affects ALL files regardless of:
- File size (tested small and large files)
- File location (different directories)
- File type (tsx, ts, txt, json)
- Whether file is open in editor or not
Workaround
Bash tool works fine for file operations. Only Edit/Write tools affected.
Possible Cause
Suspicion: Line ending normalization (CRLF vs LF) during Read causes content mismatch when Edit/Write compare cached vs actual file content.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗