Bash tool returns empty output on Windows (MINGW64/Git Bash)

Resolved 💬 3 comments Opened Feb 19, 2026 by foss-contrib Closed Feb 23, 2026

Environment:

  • OS: Windows 10 (MINGW64_NT-10.0-19045)
  • Shell: Git Bash 3.6.5
  • Claude Code: latest

Problem:
All Bash tool invocations return empty output, even though commands execute successfully (files are created, git operations work, tests pass with exit code 0).

Observed shell invocation:
The spawned terminal window title shows:

/usr/bin/bash --login -i -c -l source ...

The first line printed in the window is always:

bash: : No such file or directory

Likely cause:
The -l flag is inserted between -c and the command string. With -c, bash expects the next argument to be the command to execute, so it interprets -l as the command (which fails with "No such file or directory") and the actual command (source ...) becomes a positional argument that never runs as intended. The correct invocation should place -l before -c, e.g.:

/usr/bin/bash -l -c "source ..."

Workaround:
Redirect output to a file and read it back:

some_command > /tmp/output.txt 2>&1

Then use the Read tool on the output file.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗