[BUG] Bash tool fails with EINVAL when project is on non-C: drive (Windows)

Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 0 comments · opened Oct 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?

Every Bash tool call fails with EINVAL error. The temp output file cannot be created by Claude Code's Node.js process, even though the directory exists and is manually writable.

What Should Happen?

Bash tool should execute commands and capture output normally.

Error Messages/Logs

EINVAL: invalid argument, open 'C:\Users\USER\AppData\Local\Temp\claude\e--Code-Code\tasks\<random>.output'

Steps to Reproduce

  1. Open VSCode on Windows 11 with project located on E: drive (e.g., E:\Code\Code)
  2. Open Claude Code extension
  3. Try any Bash tool call (e.g., echo test)
  4. Error: EINVAL: invalid argument, open '...claude\e--Code-Code\tasks\*.output'

Note: The directory exists and is manually writable (echo test > file.txt works in CMD).
The issue is specific to Claude Code's Node.js process writing to the temp file.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.220 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

Project is on E: drive. Moving to C: drive likely fixes the issue but is not a viable long-term solution.

View original on GitHub ↗