Skip to content

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

Description

@rahulv3a

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:
    {
      "env": {
        "PATH": "/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
      }
    }
  2. Quit the desktop app (Cmd + Q) and relaunch
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions