plugin install fails on Windows when git is installed under user home directory (false "git not on PATH" error)

Resolved 💬 3 comments Opened Apr 18, 2026 by Keson74 Closed May 26, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

/plugin install throws git-subdir plugin source requires git to be
installed and on PATH even when git is correctly installed and visible
via where.exe git, Get-Command git, and PowerShell.

What Should Happen?

Root Cause

In claude.exe (v2.1.114), the which('git') implementation (function
ox7) runs where.exe git to locate git, then passes results through a
filter (KD6) that removes any path located under the current working
directory:

function KD6(H) {
let $ = process.cwd().toLowerCase();
return H.filter((q) => {
let K = path.resolve(q).toLowerCase();
return path.dirname(K).toLowerCase() !== $ && !K.startsWith($ +
path.sep)
})
}

When the user's working directory is their home folder
(C:\Users\<name>) and git is installed at the default user-local
location (C:\Users\<name>\AppData\Local\Programs\Git), all paths
returned by where.exe git are under the home directory and get
filtered out, making git appear not found.

Error Messages/Logs

Steps to Reproduce

  1. Install Git for Windows using the per-user installer (default on

many machines) → installs to
C:\Users\<name>\AppData\Local\Programs\Git

  1. Launch Claude Code CLI from or with cwd set to C:\Users\<name> (the

home directory)

  1. Run /plugin install <any-git-subdir-plugin>
  2. Error: git-subdir plugin source requires git to be installed and on

PATH

Note: where.exe git, Get-Command git, and git --version all succeed —
git is genuinely on PATH.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

  1. Install Git for Windows using the per-user installer (default on many machines) → installs to C:\Users\<name>\AppData\Local\Programs\Git 2. Launch Claude Code CLI from or with cwd set to C:\Users\<name> (the home directory) 3. Run /plugin install <any-git-subdir-plugin> 4. Error: git-subdir plugin source requires git to be installed and on PATH Note: where.exe git, Get-Command git, and git --version all succeed — git is genuinely on PATH.

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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