Desktop app ignores env.PATH from settings.json (sandbox overrides)
Description
When running Claude Code via the macOS desktop app (com.anthropic.claudefordesktop), the env.PATH setting in ~/.claude/settings.json is silently ignored. The session PATH remains the minimal system default (/usr/bin:/bin:/usr/sbin:/sbin) instead of the configured value.
Steps to Reproduce
- Set
env.PATHin~/.claude/settings.json:
``json``
{
"env": {
"PATH": "/opt/homebrew/bin:/opt/homebrew/sbin:/Users/me/go/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
}
}
- Launch Claude Code from the desktop app (not the CLI).
- Run
echo $PATHvia the Bash tool.
Expected Behavior
PATH should be /opt/homebrew/bin:/opt/homebrew/sbin:/Users/me/go/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin as configured.
Actual Behavior
PATH is /usr/bin:/bin:/usr/sbin:/sbin — the macOS sandbox default. Tools like go, gh, and gcloud installed via Homebrew are not found.
Environment
- Entrypoint:
CLAUDE_CODE_ENTRYPOINT=claude-desktop - Bundle:
__CFBundleIdentifier=com.anthropic.claudefordesktop - Sandbox:
OPERON_SANDBOXED_NETWORK=1 - Platform: macOS (Darwin 25.3.0, arm64)
Notes
- Other settings from
settings.jsondo work (e.g.,permissions.allowrules are applied correctly). - Only the
envsection appears to be ignored. - The same
env.PATHsetting may work correctly when using the CLI entrypoint (claudein terminal), since the terminal inherits the shell profile. The issue is specific to the desktop app launch path. - A project-level
.claude/settings.local.jsonwith the sameenv.PATHis also ignored.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗