env.PATH in settings.json not applied when launching from desktop app

Resolved 💬 3 comments Opened Apr 2, 2026 by rahulv3a Closed Apr 6, 2026

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

  1. Add the following to ~/.claude/settings.json:

``json
{
"env": {
"PATH": "/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
}
}
``

  1. Quit the desktop app (Cmd + Q) and relaunch
  2. 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.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗