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

  1. Read any file using Read tool
  2. Immediately attempt Edit or Write
  3. Tool fails with error
  4. 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.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗