claude-code - 💡(How to fix) Fix [BUG] Bash tool returns no output on Windows - all shells affected, WSL works [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54037Fetched 2026-04-28 06:40:57
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

Error Message

Error Messages/Logs

Fix Action

Fix / Workaround

▎ - Windows 11 Enterprise 10.0.26100 ▎ - Git for Windows bash at C:\Program Files\Git\usr\bin\bash.exe ▎ - File redirect workaround works: command > file.txt 2>&1 then Read tool ▎ - WSL works perfectly, confirming the capture logic is fine, the issue is Windows-specific pipe/ConPTY handling

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

On Windows, the Bash tool returns "(Bash completed with no output)" for ALL commands. Commands execute correctly, only stdout capture is broken. Tested Git Bash, CMD (cmd /c), and changing $SHELL to the Git bin wrapper. All fail. A separate Claude Code install on WSL/Ubuntu works perfectly. When commands run on Windows, a brief popup window appears for the child process, suggesting it gets its own console instead of inheriting pipes.

What Should Happen?

Bash tool should capture and return stdout on Windows, same as on macOS/Linux/WSL.

Error Messages/Logs

Steps to Reproduce

  1. Launch Claude Code on Windows (any terminal)
  2. Run ! echo hello or ! curl -I https://example.com
  3. Returns "(Bash completed with no output)"
  4. Same command in WSL Claude install works fine

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.112

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

Terminal/Shell: Windows Terminal + Git Bash, also tested CMD and PowerShell

Additional Information:

▎ - Windows 11 Enterprise 10.0.26100 ▎ - Git for Windows bash at C:\Program Files\Git\usr\bin\bash.exe ▎ - File redirect workaround works: command > file.txt 2>&1 then Read tool ▎ - WSL works perfectly, confirming the capture logic is fine, the issue is Windows-specific pipe/ConPTY handling

extent analysis

TL;DR

The issue can be worked around by using file redirect to capture stdout, as the pipe/ConPTY handling seems to be the culprit on Windows.

Guidance

  • Verify that the issue is indeed related to pipe/ConPTY handling by testing with different terminals and shells on Windows.
  • Try using the file redirect workaround (command > file.txt 2>&1) and then reading the output file using the Read tool to confirm that the issue is with stdout capture.
  • Investigate if there are any known issues or limitations with ConPTY handling in Windows Terminal or Git Bash that might be contributing to this problem.
  • Consider testing with a different version of Git for Windows or updating to the latest version to see if the issue persists.

Example

No code snippet is provided as the issue seems to be related to the environment and shell configuration rather than a specific code problem.

Notes

The issue appears to be Windows-specific and related to how pipes and ConPTY are handled. The fact that WSL works perfectly suggests that the capture logic is fine, and the problem lies in the Windows environment.

Recommendation

Apply workaround: Use file redirect to capture stdout until a more permanent fix is found, as it has been confirmed to work in the given scenario.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Bash tool returns no output on Windows - all shells affected, WSL works [1 comments, 2 participants]