[BUG] Empty command outputs on Windows 11 caused by Git for Windows v2.53.0 (Works perfectly on git 2.52.0)
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?
When using Claude Code on Windows 11 alongside the latest Git for Windows release (v2.53.0), the CLI is unable to read the output of terminal commands. Commands execute, but Claude receives a completely empty string as the output. This renders the agent "blind" and unable to evaluate the results of the commands it runs.
I have tested multiple installation methods (npm, winget, native) and different versions of Claude Code, but the issue persists. However, if I downgrade my system's Git for Windows installation from v2.53.0 back to v2.52.0, Claude Code immediately starts working perfectly again.
What Should Happen?
Claude Code should successfully capture and read stdout/stderr from terminal commands on Windows regardless of the Git for Windows version installed (specifically, it should be compatible with Git v2.53.0).
Error Messages/Logs
There are no outright crashes from Claude Code, but the agent constantly replies with variations of:
"The command produced no output" or "I received an empty output".
Under the hood, this is likely causing a `write error: Bad file descriptor` in the background bash process.
Steps to Reproduce
- Install Git for Windows v2.53.0 on a Windows 11 machine.
- Launch Claude Code (v2.1.89).
- Ask Claude to run a simple terminal command that generates output (e.g., echo or service version).
- Observe that Claude complains about receiving no output/empty output.
- Downgrade Git for Windows to v2.52.0.
- Ask Claude to run the exact same command.
- Observe that Claude successfully reads the output.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.89
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
Root cause context for the devs: This issue is directly tied to changes made in the MSYS2 runtime included in Git for Windows v2.53.0 (specifically, updates to how standard I/O pipes and stdout/stderr are handled natively to remove the need for winpty). Claude Code's background bash capture mechanism on Windows seems completely incompatible with these new pipe mechanics, breaking the stream and returning empty text. V2.52.0 used the older MSYS2 I/O handling, which Claude Code hooks into without issue.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗