v2.1.45: Bash broken on Windows - bad file descriptor on stdout pipe
Description
All bash commands inside Claude Code fail with exit code 1 on Windows after updating to v2.1.45. The underlying error is:
Bash itself works fine — it cannot write to the stdout pipe that Claude Code (Node.js) creates. Even hello fails.
Reproduction
- Update to Claude Code v2.1.45 on Windows with Git Bash
- Run any bash command (e.g. hello, /c/CC_Projects/Original-Writing_LOCAL)
- All fail silently with exit code 1
Running bash through PowerShell reveals the actual error:
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS C:\CC_Projects\Original-Writing_LOCAL> hello
Bash can still write to files (just not stdout):
test
Version comparison
Confirmed across multiple sessions using conversation export transcripts:
| Date | CC Version | Bash |
|------|-----------|------|
| 13 Feb | v2.1.39 | Working |
| 14 Feb | v2.1.41 | Working |
| 17 Feb | v2.1.44 | Working (x3 sessions) |
| 18 Feb | v2.1.45 | Broken (x2 sessions) |
The break correlates with the v2.1.45 changelog entry: Improved memory usage for shell commands that produce large output — RSS no longer grows unboundedly with command output size
Workaround
Downgrade to v2.1.44:
changed 2 packages in 3s
1 package is looking for funding
run npm fund for details
Note: if you also have the native installer at , it auto-updates independently and will override the npm version. Rename it to prevent it taking priority.
Environment
- Windows 11 Home 10.0.26200
- Git for Windows 2.52.0 (MSYS2/Cygwin)
- Node.js v24.12.0
- Claude Code v2.1.44 (npm) — working
- Claude Code v2.1.45 (native + npm) — broken
12 Comments
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Additional: Bun runtime crash in v2.1.45
In the same v2.1.45 session (native installer binary), the Bun runtime itself crashed while executing a
git addcommand:This killed the session entirely. The native
claude.exeat.local\binis a Bun standalone executable, so v2.1.45 had instability beyond the stdout pipe issue — the runtime itself was crashing.Screenshot available if helpful.
Is there no basic testing done before a release is thrown into the wild? Not the first time very essential things break!
can confirm its the latest version, downgraded to .44 and it works
No testing and no bug support either
I suppose in a few days they will ask for a screenshot or a PR or something
FWIW 1.45 is not stable in npm, so fix with
Literally unusable. Need fix ASAP.
This issue was fixed in Claude Code v2.1.47. Please run
claude updateto get the latest version.Thanks @Jarred-Sumner
Great that that the bug has been squatted. I do still wonder how this gets passed release testing. Is there also a change in the tests run before release to prevent this in the future ?
More importantly, has a new test been added for this exactly?
Thank you @Jarred-Sumner !
Related: Bun v1.3.10 I/O Handling on Windows
Bad file descriptor errors are another facet of Bun's broken Windows I/O. Part of a broader crash family: 20+ issues, 90+ users — segfaults, "switch on corrupt value" panics, TUI escapes, pipe crashes. Root cause (N-API race condition) documented on #21875 with 27 memory dumps. Zero staff response in 30+ days.
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.