v2.1.53: EINVAL on every Bash command when launched from PowerShell on Windows

Status Fixed / completed
Maintainer reply None cached
Activity 12 comments · opened Feb 25, 2026 · closed Feb 25, 2026

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

  1. Windows machine with a user profile containing . in the name (e.g., ben.d_zento)
  2. Open PowerShell 7.x
  3. Run claude from any project directory
  4. Attempt any Bash command (e.g., echo "test")
  5. Observe EINVAL error on the .output file

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.js fs.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.json issue — 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.

View original on GitHub ↗

12 Comments

delphiprofi · 6 months ago

Same problem with User Name containing spaces like: "c:\Users\Jon Dow\claude"

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/28370
  2. https://github.com/anthropics/claude-code/issues/28358
  3. https://github.com/anthropics/claude-code/issues/28357

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

jgonxo · 6 months ago

I'm getting the same error message on 2.1.53 unfortunately.

k-kruusi · 6 months ago

same here

zhaojiaboyi · 6 months ago

I'm getting the same error message on 2.1.53 unfortunately.

andiamine · 6 months ago

Same problem on v2.1.53

danaug23 · 6 months ago

same problem, same errors

Jurph · 6 months ago

Reproduced same bug on Win10, v2.1.53. Ruled out the following:

  • Not an I/O or permissions error on the directory
  • Not a long file path
  • Persists through reboot(s)
  • Persists across wsl.exe and Windows Git bash
k-kruusi · 6 months ago

i made a workaround by hosting a mcp server bash-proxy

shawnm-anthropic · 6 months ago

Hi, thanks for reporting. We just released v2.1.55 which should fix this.

github-actions[bot] · 5 months ago

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.