[BUG] `EINVAL: invalid argument` on Bash tool - output file creation fails on Windows (non-C: drive)

Resolved 💬 4 comments Opened Feb 25, 2026 by paq Closed Feb 25, 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 Bash tool fails with EINVAL: invalid argument every time it tries to create an .output file for task execution. This makes the Bash tool completely unusable.

What Should Happen?

The Bash tool should execute commands and capture output successfully.

Error Messages/Logs

EINVAL: invalid argument, open 'X:\tmp\claude\X--Project-Name\tasks\b<randomID>.output'

Steps to Reproduce

  1. Install Claude Code v2.1.53+ via standalone Windows installer
  2. Open a project on a non-C: drive (e.g. X:\Projects\MyProject)
  3. Ask Claude to run any Bash command (e.g. echo "test")
  4. Error occurs immediately — every Bash tool call fails

Notes:

  • The Write tool can create files in the same directory successfully
  • PowerShell FileMode::CreateNew works on the same path on running outside Claude Code
  • The tasks directory exists and has full permissions (verified with icacls)

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.51

Claude Code Version

2.1.53

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

Downgrading to v2.1.51 resolves the issue immediately.
The project drive is a physical non-C: drive (not network or virtual).
The bug appears to have been introduced in v2.1.53.

View original on GitHub ↗

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