Preflight Checklist
What's Wrong?
Claude Code CLI Bug Report: Bash Tool Returns No Output on macOS 26
Summary
Claude Code CLI's Bash tool returns "(No content)" for all commands on macOS 26.2, but the same Bash tool works perfectly in Claude Desktop on the same machine.
Environment
Platform:
- macOS 26.2 (Build 25C56)
- Darwin 25.2.0
- Mac Studio M4 Max, 64GB RAM
Claude Code Version: 2.1.14
Terminals Tested:
Shell: zsh (SHELL=/bin/zsh)
Issue Description
When running Claude Code via CLI (claude command in terminal), all Bash tool commands return "(No content)" with no stdout or stderr captured. However, the exact same Bash tool works perfectly when using Claude Code through Claude Desktop app.
CLI (BROKEN) - Example Output
❯ Run: echo "test"
⏺ Bash(echo "test")
⎿ (No content)
Desktop (WORKS) - Same Command
Run: echo "test"
Ran 1 command
Done:
Echo: test
Key Finding: CLI vs Desktop
Same machine, same OS, same version - different results:
| Environment |
Bash Output |
Status |
| Claude Code CLI |
(No content) |
❌ Broken |
| Claude Desktop (Claude Code feature) |
Output displayed |
✅ Works |
This strongly suggests the issue is specific to how the CLI handles subprocess stdio in terminal environments on macOS 26, not a fundamental Bash tool problem.
Installation History
Claude Code was installed via npm initially (through fnm), then tested with Homebrew installation. Both methods show identical broken behavior in CLI.
Most recent npm install: 2026-01-20 18:18 (version 2.1.14)
System Checks
Node/npm Environment (when using npm):
- Node via fnm with multishells
- Path:
/Users/rk/.local/state/fnm_multishells/[session]/bin/node
Homebrew Installation:
- Binary:
/opt/homebrew/bin/claude
- Completely outside npm/fnm environment
Both installations broken identically in CLI.
Debug Log Excerpt
From ~/.claude/debug/*.txt:
[DEBUG] executePreToolHooks called for tool: Bash
[DEBUG] Getting matching hook commands for PreToolUse with query: Bash
[DEBUG] Found 0 hook matchers in settings
[DEBUG] Matched 0 unique hooks for query "Bash" (0 before deduplication)
No errors in logs - commands appear to execute, but output is never captured.
Expected Behavior
Bash commands should return stdout/stderr output like they do in Claude Desktop.
Actual Behavior
All Bash commands return "(No content)" in CLI.
Workarounds
- Use Claude Desktop's Claude Code feature (works perfectly)
- Use file-based tools (Read/Write/Edit/Glob/Grep) which work fine
- Run bash commands manually in terminal
Impact
- CLI is effectively broken for any workflow requiring bash command execution
- Users must switch to Claude Desktop or manually run all bash commands
- Critical for CI/CD, scripting, git operations, builds, tests
Additional Context
Issue was discovered during extensive debugging session on 2026-01-20. Multiple hypotheses tested:
- Shell configuration interference (ruled out)
- fnm/npm environment issues (ruled out - Homebrew install same)
- macOS 26 incompatibility (ruled out - Desktop works)
- Version regression (ruled out - all versions broken)
The CLI-vs-Desktop difference is the smoking gun: this is a terminal stdio capture issue in the CLI implementation on macOS 26.
Related Issues
Request
This is a critical bug affecting macOS 26 users of Claude Code CLI. Desktop workaround exists but CLI should be fixed.
Suggested investigation areas:
- How CLI spawns subprocess vs Desktop
- Terminal stdio file descriptor handling on macOS 26
- Differences in Electron (Desktop) vs Node.js (CLI) subprocess spawning
Reporter: Randy Kerber
Date: 2026-01-20
Contact: (add if desired)
What Should Happen?
Should run as it does in 'Code' tab in Claude Desktop:
Run: echo "test with claude code in claude desktop"
Run: pwd
Run: date
I'll run those three commands for you.
Ran 3 commands
Done:
Echo: test with claude code in claude desktop
Working directory: /Users/rk/tmp
Date: Tue Jan 20 23:26:37 MST 2026
To confirm, those 'Bash(...)' commands produced output?
Yes, all three commands ran successfully and produced output:
echo → test with claude code in claude desktop
pwd → /Users/rk/tmp
date → Tue Jan 20 23:26:37 MST 2026
Everything worked as expected.
Error Messages/Logs
❯ Run: echo "test with homebrew install"
Run: pwd
Run: date
⏺ I'll run those three commands for you.
⏺ Bash(echo "test with homebrew install")
⎿ (No content)
⏺ Bash(pwd)
⎿ (No content)
⏺ Bash(date)
⎿ (No content)
⏺ The commands ran but produced no output, which is unusual for pwd and date. Let me try again with a combined command
to see if there's an output issue.
⏺ Bash(echo "test with homebrew install" && pwd && date)
⎿ (No content)
⏺ This is unusual - the commands should produce output. Let me try writing to a file and reading it back to verify
execution.
⏺ Bash((echo "test with homebrew install" && pwd && date) > /tmp/claude/test_output.txt)
⎿ (No content)
⏺ Read(/tmp/claude/test_output.txt)
⎿ Error reading file
⏺ Bash(ls -la /tmp/claude/ 2>&1)
⎿ (No content)
⏺ There appears to be an issue with command output. Let me try with the sandbox disabled to see if that's the cause.
⏺ Bash(echo "test with homebrew install" && pwd && date)
⎿ (No content)
⏺ I'm encountering an unusual issue where bash commands are executing without errors, but producing no output. Even
simple commands like echo, pwd, and date that should always produce output are returning nothing.
This appears to be a system-level issue with how command output is being captured. The commands you requested are:
1. echo "test with homebrew install" - Should print "test with homebrew install"
2. pwd - Should print the current working directory (/Users/rk based on your environment)
3. date - Should print the current system date and time
All three executed without errors, but the output isn't being displayed. This might be a configuration issue with the
Bash tool or the environment. Would you like me to try a different approach or investigate further?
Steps to Reproduce
Reproduction Steps
CLI Test (Fails)
- Open Terminal.app or Warp
- Run:
claude
- Execute:
Run: echo "test"
- Result: "(No content)"
Desktop Test (Works)
- Open Claude Desktop app
- Use Claude Code feature
- Execute:
Run: echo "test"
- Result: Output displays correctly
Extensive Diagnostics Performed
✅ Bash Works Directly in Terminal
/bin/bash -c "echo test" # ✅ Works
/bin/bash --noprofile --norc -c "echo test" # ✅ Works
✅ Tested with Zero Shell Init Files
Renamed all shell init files (.bashrc, .bash_profile, .zshrc, .zshenv, .zprofile) to completely clean environment - issue persists.
✅ SHELL Environment Variable Correct
echo $SHELL
# /bin/zsh (correct absolute path, not /usr/bin/env)
✅ Tested Multiple Claude Code Versions
All versions show same issue:
- 2.0.76
- 2.1.11
- 2.1.12
- 2.1.14
✅ Tested Multiple Installation Methods
- npm install (broken)
- Homebrew cask (broken)
- Both show identical behavior
✅ Tested with Sandbox Disabled
No change - still broken.
✅ Tested in Multiple Terminals
- Warp: Broken
- Terminal.app: Broken
✅ File Tools Work Perfectly
- Read tool: ✅ Works
- Write tool: ✅ Works
- Edit tool: ✅ Works
- Glob tool: ✅ Works
- Grep tool: ✅ Works
Only Bash tool is affected.
Test Commands That Fail
All return "(No content)":
echo "test"
pwd
date
ls
whoami
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.14
Platform
Other
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Selected model is '4. Opus Plan Mode (Opus 4.5 / Sonnet)'
Preflight Checklist
What's Wrong?
Claude Code CLI Bug Report: Bash Tool Returns No Output on macOS 26
Summary
Claude Code CLI's Bash tool returns "(No content)" for all commands on macOS 26.2, but the same Bash tool works perfectly in Claude Desktop on the same machine.
Environment
Platform:
Claude Code Version: 2.1.14
Terminals Tested:
Shell: zsh (SHELL=/bin/zsh)
Issue Description
When running Claude Code via CLI (
claudecommand in terminal), all Bash tool commands return "(No content)" with no stdout or stderr captured. However, the exact same Bash tool works perfectly when using Claude Code through Claude Desktop app.CLI (BROKEN) - Example Output
Desktop (WORKS) - Same Command
Key Finding: CLI vs Desktop
Same machine, same OS, same version - different results:
This strongly suggests the issue is specific to how the CLI handles subprocess stdio in terminal environments on macOS 26, not a fundamental Bash tool problem.
Installation History
Claude Code was installed via npm initially (through fnm), then tested with Homebrew installation. Both methods show identical broken behavior in CLI.
Most recent npm install: 2026-01-20 18:18 (version 2.1.14)
System Checks
Node/npm Environment (when using npm):
/Users/rk/.local/state/fnm_multishells/[session]/bin/nodeHomebrew Installation:
/opt/homebrew/bin/claudeBoth installations broken identically in CLI.
Debug Log Excerpt
From
~/.claude/debug/*.txt:No errors in logs - commands appear to execute, but output is never captured.
Expected Behavior
Bash commands should return stdout/stderr output like they do in Claude Desktop.
Actual Behavior
All Bash commands return "(No content)" in CLI.
Workarounds
Impact
Additional Context
Issue was discovered during extensive debugging session on 2026-01-20. Multiple hypotheses tested:
The CLI-vs-Desktop difference is the smoking gun: this is a terminal stdio capture issue in the CLI implementation on macOS 26.
Related Issues
Request
This is a critical bug affecting macOS 26 users of Claude Code CLI. Desktop workaround exists but CLI should be fixed.
Suggested investigation areas:
Reporter: Randy Kerber
Date: 2026-01-20
Contact: (add if desired)
What Should Happen?
Should run as it does in 'Code' tab in Claude Desktop:
Run: echo "test with claude code in claude desktop"
Run: pwd
Run: date
I'll run those three commands for you.
Ran 3 commands
Done:
Echo: test with claude code in claude desktop
Working directory: /Users/rk/tmp
Date: Tue Jan 20 23:26:37 MST 2026
To confirm, those 'Bash(...)' commands produced output?
Yes, all three commands ran successfully and produced output:
echo → test with claude code in claude desktop
pwd → /Users/rk/tmp
date → Tue Jan 20 23:26:37 MST 2026
Everything worked as expected.
Error Messages/Logs
Steps to Reproduce
Reproduction Steps
CLI Test (Fails)
claudeRun: echo "test"Desktop Test (Works)
Run: echo "test"Extensive Diagnostics Performed
✅ Bash Works Directly in Terminal
✅ Tested with Zero Shell Init Files
Renamed all shell init files (.bashrc, .bash_profile, .zshrc, .zshenv, .zprofile) to completely clean environment - issue persists.
✅ SHELL Environment Variable Correct
✅ Tested Multiple Claude Code Versions
All versions show same issue:
✅ Tested Multiple Installation Methods
✅ Tested with Sandbox Disabled
No change - still broken.
✅ Tested in Multiple Terminals
✅ File Tools Work Perfectly
Only Bash tool is affected.
Test Commands That Fail
All return "(No content)":
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.14
Platform
Other
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Selected model is '4. Opus Plan Mode (Opus 4.5 / Sonnet)'