Desktop app ignores env.PATH from settings.json (sandbox overrides)

Open 💬 4 comments Opened Apr 1, 2026 by ManfredM

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

  1. Set env.PATH in ~/.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"
}
}
``

  1. Launch Claude Code from the desktop app (not the CLI).
  2. Run echo $PATH via 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.json do work (e.g., permissions.allow rules are applied correctly).
  • Only the env section appears to be ignored.
  • The same env.PATH setting may work correctly when using the CLI entrypoint (claude in terminal), since the terminal inherits the shell profile. The issue is specific to the desktop app launch path.
  • A project-level .claude/settings.local.json with the same env.PATH is also ignored.

View original on GitHub ↗

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