env.PATH in settings.json not applied to Bash tool shell environment

Resolved 💬 4 comments Opened Apr 2, 2026 by Julioacarrettoni Closed May 10, 2026

Bug Description

The env.PATH configuration in ~/.claude/settings.json is not being applied to the Bash tool's shell environment. Commands run via the Bash tool do not see the configured PATH.

Steps to Reproduce

  1. Add a PATH override to ~/.claude/settings.json:
{
  "env": {
    "PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
  }
}
  1. Restart Claude Code (completely close and reopen)
  2. Run echo $PATH via the Bash tool

Expected Behavior

The PATH should include /opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin as configured.

Actual Behavior

The PATH only contains /usr/bin:/bin:/usr/sbin:/sbin. The env configuration is completely ignored.

This means Homebrew-installed tools (gh, node, python3, etc.) are not found by the Bash tool, even though they are explicitly configured in settings.

Environment

  • macOS (Darwin 25.3.0, Apple Silicon)
  • Shell: zsh
  • Claude Code: latest
  • gh binary exists at /opt/homebrew/bin/gh and works when called with full path

Workaround

Moving eval "$(/opt/homebrew/bin/brew shellenv)" to ~/.zshenv (which is sourced by all shell types) fixes the PATH issue, but the env setting in settings.json should still work as documented.

View original on GitHub ↗

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