Subprocess Environment: Homebrew Bash Not Respected in PATH
Resolved 💬 4 comments Opened Jul 19, 2025 by dmmalam Closed Jan 4, 2026
Bug Description
## Bug: Claude CLI uses system bash instead of Homebrew bash despite correct PATH in user shells
### Environment
- OS: macOS 15.5 (24F74)
- Architecture: arm64 (Apple Silicon)
- Claude CLI version: 1.0.53 (Claude Code)
- System bash: GNU bash 3.2.57(1)-release at /bin/bash
- Homebrew bash: GNU bash 5.3.0(1)-release at /opt/homebrew/bin/bash
### Description
Claude CLI environment defaults to system bash (/bin/bash) instead of Homebrew bash (/opt/homebrew/bin/bash), even though PATH is correctly configured in user's default shells (zsh and
fish) to prioritize Homebrew binaries.
### Current Behavior
- Claude CLI's PATH has system directories (/usr/bin, /bin) before Homebrew directory (/opt/homebrew/bin)
- Results in outdated bash 3.2.57 being used instead of modern bash 5.3.0
- User shell configurations are not inherited by Claude CLI environment
### Expected Behavior
- Claude CLI should respect user's PATH configuration from their default shell
- Homebrew bash (5.3.0) should be used when available and configured in user's PATH
- Modern shell features should be available in Claude CLI environment
### Steps to Reproduce
- Install bash via Homebrew:
brew install bash - Configure PATH in .zshrc/.config/fish to prioritize /opt/homebrew/bin
- Open Claude CLI with
claude - Run
which bashorbash --versionin Claude CLI - Observe that /bin/bash (3.2.57) is used instead of /opt/homebrew/bin/bash (5.3.0)
### Impact
- Inconsistent behavior between user's shell and Claude CLI environment
- Claude gets confused with syntax.
### Suggested Fix
Claude CLI should either:
- Source user's shell configuration files to inherit PATH
- Provide a way to configure environment variables for Claude CLI sessions
- Use the user's default shell's PATH when launching subprocesses
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 1.0.53
- Feedback ID: 7b8fd571-1abb-4b30-8a90-8ed547a07b3c
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗