[BUG] Claude Code Desktop session has incomplete PATH — misses Homebrew, bun, and other user-installed tools
Resolved 💬 3 comments Opened Apr 15, 2026 by taige Closed Apr 18, 2026
Description
Claude Code Desktop sessions start with a minimal PATH that only includes system directories:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
This is missing common user-installed tool paths:
/opt/homebrew/bin(Homebrew on Apple Silicon) —gh,node, etc.~/.bun/bin(bun runtime)- Any other paths added in
~/.zshrcor~/.bash_profile
The Desktop app appears to not source the user's shell profile when initializing the Bash environment.
Impact
Tools like gh, bun, node, npm etc. appear as "command not found" and require manual export PATH=... workarounds in every session. This breaks:
- GitHub CLI operations (
gh issue create,gh pr view) - Package managers (
bun,npm,pnpm,yarn) - Any Homebrew-installed CLI tool
Steps to Reproduce
- Install tools via Homebrew or bun (which add to PATH via shell profile)
- Open Claude Code Desktop, start a session
- Run
which ghorwhich bun→ "not found" - Run
echo $PATH→ only system paths, no Homebrew or user paths
Expected Behavior
The Bash tool should inherit the user's full PATH as configured in their shell profile (~/.zshrc, ~/.bash_profile, ~/.bashrc), same as opening a terminal.
Workaround
Manually prepend paths in each command:
export PATH="/opt/homebrew/bin:$HOME/.bun/bin:$PATH"
Environment
- Claude Code Desktop (macOS, Apple Silicon)
- Shell: bash (invoked by Bash tool)
- User shell: zsh (with Homebrew and bun paths in .zshrc)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗