Bash tool ignores PATH from all config sources (settings.json env, .zshenv, .zprofile)
Resolved 💬 4 comments Opened Apr 5, 2026 by gg-d41 Closed May 19, 2026
Description
The Bash tool always runs with a minimal PATH (/usr/bin:/bin:/usr/sbin:/sbin), ignoring all user PATH configuration. This means common tools like uv, flutter, docker, etc. are not found.
Environment
- macOS (Darwin 25.3.0, Apple Silicon)
- Shell: zsh 5.9 (
/bin/zsh) - Claude Code: latest version (reinstalled from website installer on 2026-04-05)
What I tried (none worked)
env.PATHin~/.claude/settings.json— no effectenv.PATHin~/.claude/settings.local.json— no effect~/.zshenvwith PATH exports — not sourced (this file should be read by every zsh invocation, including non-interactive)~/.zprofilewith PATH exports — not sourced/etc/paths.d/entries (e.g. homebrew) — not picked up- Full reinstall of Claude Code + laptop reboot — no change
Evidence
The Bash tool confirms it's running zsh 5.9, but startup files are not being sourced:
$ echo "PATH=$PATH"
PATH=/usr/bin:/bin:/usr/sbin:/sbin
$ echo "ZSH_VERSION=$ZSH_VERSION"
ZSH_VERSION=5.9
Manually sourcing works fine:
$ source ~/.zshenv && echo "$PATH"
/Users/me/.local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/me/flutter/bin
Expected behavior
At minimum, one of these should work:
env.PATHin settings.json should override the Bash tool's PATH~/.zshenvshould be sourced (it's the zsh file specifically designed for non-interactive shells)
Workaround
Prefixing every command with source ~/.zshenv && works but is fragile and shouldn't be necessary.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗