Description
The env.PATH setting in ~/.claude/settings.json is not being injected into the Bash tool's shell environment when Claude Code is launched from the macOS desktop app.
Steps to Reproduce
- Add the following to
~/.claude/settings.json:
{
"env": {
"PATH": "/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
}
}
- Quit the desktop app (Cmd + Q) and relaunch
- Run
echo $PATH via the Bash tool
Expected Behavior
PATH should include /opt/homebrew/bin:/opt/homebrew/sbin as configured.
Actual Behavior
PATH is /usr/bin:/bin:/usr/sbin:/sbin — the env setting is ignored. Homebrew-installed tools (php, composer, pnpm, gh, node, npm) are not found.
Interestingly, INFOPATH does show /opt/homebrew/share/info: (likely inherited from the system), but PATH does not reflect the settings.json value.
Environment
- macOS (Darwin 25.4.0, Apple Silicon)
- Claude Code desktop app
- Homebrew installed at
/opt/homebrew
- settings.json is valid JSON (verified with Python json module)
Workaround
Prefixing every Bash command with export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH" && via a CLAUDE.md instruction.
Description
The
env.PATHsetting in~/.claude/settings.jsonis not being injected into the Bash tool's shell environment when Claude Code is launched from the macOS desktop app.Steps to Reproduce
~/.claude/settings.json:{ "env": { "PATH": "/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" } }echo $PATHvia the Bash toolExpected Behavior
PATH should include
/opt/homebrew/bin:/opt/homebrew/sbinas configured.Actual Behavior
PATH is
/usr/bin:/bin:/usr/sbin:/sbin— theenvsetting is ignored. Homebrew-installed tools (php,composer,pnpm,gh,node,npm) are not found.Interestingly,
INFOPATHdoes show/opt/homebrew/share/info:(likely inherited from the system), butPATHdoes not reflect the settings.json value.Environment
/opt/homebrewWorkaround
Prefixing every Bash command with
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH" &&via a CLAUDE.md instruction.