bug: Write/Edit fails on Windows non-system drives (e.g. I:) with 'path does not exist'

Resolved 💬 3 comments Opened Mar 8, 2026 by William17738 Closed May 4, 2026

Summary

On Windows, Claude Code's Write and Edit tools fail when the working directory is on a non-system drive (e.g., I:\), reporting that the path does not exist. The same operations work correctly on C:\ and D:\.

Steps to reproduce

  1. Open a project on a non-system drive:

``
cd I:\some_project
``

  1. Ask Claude Code to write or edit a file.
  2. Claude Code attempts to write → fails with "path does not exist".

Expected behavior

All drive letters should work identically. File write/edit operations should succeed regardless of which Windows drive the project resides on.

Actual behavior

  • C:\ — works normally
  • D:\ — works normally
  • I:\fails, Claude Code reports the path does not exist

Possible root cause

This is likely a path normalization issue. Windows drive letters beyond the common C:/D: range may be handled incorrectly during path validation or canonicalization. Potential areas to investigate:

  • Path prefix validation rejecting unfamiliar drive letters
  • UNC path conversion stripping the drive letter
  • std::fs::canonicalize on Windows returns \\?\I:\... extended-length paths, which may fail downstream string matching or prefix checks

Workaround

Use Python to generate the file content as a workaround:

with open("path/to/file.py", "w") as f:
    f.write(content)

Environment

  • OS: Windows 10/11
  • Drive: I:\ (non-system drive, NTFS)
  • Claude Code: latest version

View original on GitHub ↗

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