[BUG] `EINVAL: invalid argument` on Bash tool - output file creation fails on Windows (non-C: drive)
Status Fixed / completed
Reported on v2.1.51
Maintainer reply None cached
Activity 4 comments · opened Feb 25, 2026 · 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
- Install Claude Code v2.1.53+ via standalone Windows installer
- Open a project on a non-C: drive (e.g. X:\Projects\MyProject)
- Ask Claude to run any Bash command (e.g.
echo "test") - 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.
4 Comments
Having this same issue now! Claude Code updated automatically and it ruined everything. Thanks, Anthropic!
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Closing as duplicate of https://github.com/anthropics/claude-code/issues/28343
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.