v2.1.53: EINVAL on every Bash command when launched from PowerShell on Windows
Bug: v2.1.53 EINVAL on every Bash command when launched from PowerShell on Windows
Environment
- OS: Windows 11 Pro 10.0.26200
- Shell: PowerShell 7.5.4
- Claude Code: v2.1.53 (binary updated 2026-02-25 08:13 AWST)
- User profile:
ben.d_zento(contains.— Windows 8.3 short name:BEN~1.D_Z)
Description
After auto-update from v2.1.51 to v2.1.53, every Bash tool call fails with EINVAL: invalid argument, open when Claude Code is launched from PowerShell. The error references the task output file in the temp directory:
Error: EINVAL: invalid argument, open
'C:\Users\BEN~1.D_Z\AppData\Local\Temp\claude\D--GitHub-zento-dev-platform\tasks\bw5x1085q.output'
No Bash commands execute — even echo "test" fails with the same error. Sessions are completely non-functional.
Reproduction
- Windows machine with a user profile containing
.in the name (e.g.,ben.d_zento) - Open PowerShell 7.x
- Run
claudefrom any project directory - Attempt any Bash command (e.g.,
echo "test") - Observe EINVAL error on the
.outputfile
Investigation findings
- v2.1.51 works — rolled back to yesterday's binary (
claude.exe.old.*), PowerShell sessions work perfectly - v2.1.53 fails — every Bash command hits EINVAL
- Git Bash sessions work on v2.1.53 — a session launched from VS Code's Git Bash terminal (where
TEMP=/tmp) worked fine on v2.1.53 - Not a path/permissions issue — the
tasks/directory exists, is writable, and Node.jsfs.writeFileSync()succeeds at the same path - Not an 8.3 short name issue — overriding TEMP to the long path (
C:\Users\ben.d_zento\...) still produces EINVAL - Not a
.claude.jsonissue — config file is valid JSON; a separate corruption was detected and repaired but did not resolve the EINVAL
Workaround
Rolled back to v2.1.51:
Move-Item "$env:USERPROFILE\.local\bin\claude.exe" "$env:USERPROFILE\.local\bin\claude.exe.broken"
Move-Item "$env:USERPROFILE\.local\bin\claude.exe.old.*" "$env:USERPROFILE\.local\bin\claude.exe"
Likely cause
Something changed in the Bash tool's task output file creation between v2.1.51 and v2.1.53 that fails under PowerShell's process environment on Windows. The Bun runtime's open() call returns EINVAL for the .output file, but only when the parent process is PowerShell — not Git Bash. Standard Node.js fs operations succeed at the same path, suggesting a Bun-specific or Claude Code-specific regression.
This issue has 12 comments on GitHub. Read the full discussion on GitHub ↗