v2.1.45: Bash broken on Windows - bad file descriptor on stdout pipe

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

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

View original on GitHub ↗

12 Comments

github-actions[bot] · 6 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/26413
  2. https://github.com/anthropics/claude-code/issues/26430

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

texturalbeing · 6 months ago

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 add command:

Bun Canary v1.3.10-canary.63 (1979c945) Windows x64 (baseline)
Windows v.win11_dt
CPU: sse42 avx avx2
Args: "C:\Users\cogni\.local\bin\claude.exe"

panic(main thread): switch on corrupt value
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

This killed the session entirely. The native claude.exe at .local\bin is a Bun standalone executable, so v2.1.45 had instability beyond the stdout pipe issue — the runtime itself was crashing.

Screenshot available if helpful.

rweijnen · 6 months ago

Is there no basic testing done before a release is thrown into the wild? Not the first time very essential things break!

mwebber92 · 6 months ago

can confirm its the latest version, downgraded to .44 and it works

duzenko · 6 months ago
Is there no basic testing done before a release is thrown into the wild? Not the first time very essential things break!

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

npm install -g @anthropic-ai/claude-code@stable

$ claude --version
2.1.37 (Claude Code)
privacyguy123 · 6 months ago

Literally unusable. Need fix ASAP.

Jarred-Sumner · 6 months ago

This issue was fixed in Claude Code v2.1.47. Please run claude update to get the latest version.

rweijnen · 6 months ago

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 ?

duzenko · 6 months ago

More importantly, has a new test been added for this exactly?

texturalbeing · 6 months ago

Thank you @Jarred-Sumner !

ThatDragonOverThere · 6 months ago

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.

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.