${PATH} in env settings not expanded on Windows (Git Bash)

Resolved 💬 2 comments Opened Mar 24, 2026 by GrosseLimace Closed Apr 23, 2026

Description

The env.PATH setting in ~/.claude/settings.json does not expand ${PATH} — it is treated as a literal string. This means subprocesses spawned by Claude Code (e.g., the /plugin marketplace cloner) cannot find executables that are on the Windows system/user PATH.

Environment

  • OS: Windows 11 Pro
  • Shell: Git Bash (via VS Code integrated terminal)
  • Claude Code: VS Code extension with "claudeCode.useTerminal": true

Steps to reproduce

  1. Set env.PATH in ~/.claude/settings.json:

``json
"env": {
"PATH": "/c/Users/me/.bun/bin:${PATH}"
}
``

  1. Ensure git is on the Windows User PATH (e.g., C:\Program Files\Git\cmd)
  2. Run /plugin — it fails:

``
Failed to clone marketplace repository: 'git' is not recognized as an
internal or external command, operable program or batch file.
``

Diagnosis

Running node -e "console.log(process.env.PATH)" from within Claude Code's bash shell shows the PATH ends with the literal text ${PATH} rather than the expanded system PATH:

C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\me\bin;/c/Users/me/.bun/bin:${PATH}

Meanwhile, git works fine from the bash shell itself (/mingw64/bin/git) and from Node.js child_process.execSync('git --version') in the same session — proving the issue is specific to how env settings are applied to plugin/marketplace subprocesses.

Expected behavior

${PATH} in env settings should expand to the inherited system PATH, similar to how shell profile files work.

Workaround

List all needed directories explicitly in env.PATH instead of relying on ${PATH} expansion:

"env": {
  "PATH": "/c/Users/me/.bun/bin:/c/Program Files/Git/cmd:/c/Program Files/nodejs:${PATH}"
}

View original on GitHub ↗

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