[BUG] Bash command only outputting (No content)
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
<img width="717" height="285" alt="Image" src="https://github.com/user-attachments/assets/7ce45087-0c0e-4924-8dfd-36eb05fdb46f" />
What's Wrong?
It was working recently, but now when CC runs Bash commands, it instantly shows "(No Content)". I've tried several things:
---
ENVIRONMENT
OS: Windows 11 (MINGW64_NT-10.0-26200)
Shell: Git Bash
Claude Code: v2.1.11
Node/pnpm: Installed via nvm4w
PROBLEM
Claude Code invokes Bash commands like Bash(pnpm lint), Bash(npm install), etc. return immediately with "No content". Native bash commands (ls, echo, pwd) work fine. The issue is specific to pnpm/npm wrapper scripts.
ROOT CAUSE
The pnpm/npm wrapper scripts at /c/nvm4w/nodejs/pnpm use exec to replace the shell process:
exec node "$basedir/node_modules/corepack/dist/pnpm.js" "$@"
Claude Code's bash tool cannot capture stdout/stderr from scripts that use exec to spawn child processes.
FIX ATTEMPTS (ALL FAILED)
- Aliases in ~/.bashrc
Added aliases to bypass wrapper scripts. FAILED
- BASH_ENV in ~/.bash_profile
Set BASH_ENV to source bashrc. FAILED
- CLAUDE_CODE_GIT_BASH_PATH environment variable
Set to C:\Program Files\Git\bin\bash.exe. FAILED
- CLAUDE_ENV_FILE environment variable
Created ~/.claude-env.sh with aliases and set CLAUDE_ENV_FILE=C:\Users\<username>\.claude-env.sh. FAILED - Variable appears to be ignored/non-functional in Claude Code v2.1.11 on Windows/Git Bash.
- bash -i -c wrapper
Running bash -i -c 'pnpm lint' forces interactive mode. WORKS BUT IMPRACTICAL - Every command needs this wrapper.
Any suggestions appreciated!
What Should Happen?
Bash commands should work normally and show proper outputs. Example: Bash(pnpm lint) should show the lint results.
Error Messages/Logs
Steps to Reproduce
I ask CC to lint the monorepo, it invokes Bash(pnpm lint), then it simply outputs (Non content) instead of the normal outputs.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.11
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗