Bash tool PATH contains literal unexpanded ${PATH} string
Resolved 💬 2 comments Opened Apr 9, 2026 by davesecops Closed Apr 9, 2026
Bug Description
The Bash tool initializes the shell with a PATH that contains a literal ${PATH} string instead of the expanded system PATH. This causes /usr/bin, /bin, /usr/sbin, /sbin, and /opt/homebrew/bin to be missing, so common commands like git, ssh, gh, ls, cat, wc, etc. are not found.
Reproduction
- Open Claude Code
- Run in the Bash tool:
echo "PATH=$PATH" - Observe a literal
${PATH}in the output:
PATH=/Users/user/.local/bin:/Users/user/.local/share/fnm/aliases/default/bin:/Users/user/.bun/bin:${PATH}:/Users/user/.claude/plugins/cache/anthropic-agent-skills/document-skills/887114fd09f8/bin:/Users/user/.claude/plugins/cache/openai-codex/codex/1.0.2/bin
The ${PATH} between .bun/bin and the .claude/plugins entries is a literal string, not expanded. As a result, system directories are never included.
Expected Behavior
PATH should contain the fully expanded system PATH (including /usr/bin, /bin, /usr/sbin, /sbin, /opt/homebrew/bin, etc.) so that standard tools work without full path prefixes.
Impact
- Every command needs a full path prefix (e.g.,
/usr/bin/gitinstead ofgit) - Tools like
git pushfail because they spawnsshwhich also is not on PATH (requiresGIT_SSH_COMMAND=/usr/bin/ssh) ghCLI cannot findgit, causinggh repo create --pushto fail
Environment
- macOS (Darwin 25.4.0, Apple Silicon)
- Shell: zsh
- Homebrew installed at /opt/homebrew
- Claude Code plugins installed (document-skills, codex) — these appear to be the source of the
${PATH}injection
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗