[BUG] Edit/Write tools fail with EPERM on Windows drive root paths (e.g. D:\)

Resolved 💬 3 comments Opened May 11, 2026 by raducoriu Closed Jun 10, 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?

The Edit and Write tools fail when operating on files located at the root of a Windows drive (e.g. D:\windows_watermark_v6.py).

What Should Happen?

The tools should handle drive root paths correctly on Windows, since the directory already exists.

Error Messages/Logs

EPERM: operation not permitted, mkdir 'D:\'

Steps to Reproduce

  1. Place a file at a Windows drive root, e.g. D:\example.py
  2. Attempt to use the Edit or Write tool on that file
  3. The operation fails with the above error

Claude Model

Not sure / Multiple models

Is this a regression?

No, this never worked

Last Working Version

v2.1.129

Claude Code Version

2.1.129

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

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