Bash tool stdout is always empty on Windows 11
Resolved 💬 3 comments Opened May 16, 2026 by xibaoxuan Closed May 19, 2026
Environment
- OS: Windows 11 Home 10.0.26200
- Shell: bash (Git for Windows / MSYS2)
- Claude Code backend: DeepSeek API proxy (api.deepseek.com/anthropic)
- Model: deepseek-v4-pro
Symptoms
All bash commands return empty stdout/stderr in tool results, even basic commands like echo hello world. The commands themselves execute successfully (exit code 0, file redirects work correctly).
Steps to Reproduce
- Run
echo hello worldvia Bash tool - Tool result shows "Bash completed with no output"
- Repeat with any command (
pwd,git --version,ls, etc.)
Evidence
echo test > file.txt→ Read tool confirms file contains "test" (commands execute correctly)- Background tasks show exit code 0 but empty output files
gh auth statusworks (confirmed login succeeded) but stdout not shown in tool results- File redirect + Read workaround works correctly
Workaround
Redirect output to file then read with Read tool:
command > result.txt 2>&1
Then Read result.txt.
Additional Context
The bash shell appears to use Windows-style PATH (semicolons) which bash cannot parse, making basic Unix utilities unavailable (which, ls, uname not found). Full paths to Windows executables do work (e.g., "/c/Program Files/GitHub CLI/gh.exe").
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗