You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows, a branch-strategy or merge-to-head run whose repo sits under an 8.3 short-name path (for example C:\Users\RUNNER~1\AppData\Local\Temp\...) can fail with:
HostGitError: Refusing to run git on the host…
The host git guard compares paths, and the short-name form (RUNNER~1) doesn't match the long-name form git or Node resolves (runneradmin), so the guard refuses a repo it should accept.
Evidence
Seen on 2026-11-01 in the windows CI job of #1380 (test migration of the structured output tests). The new e2e tests created their repo under os.tmpdir(), which on the GitHub Windows runner is a short-name path. Resolving the temp dir with fs.realpathSync.native first made the runs pass. That change is in the test only; the product code is unchanged.
Expected
A run started from a short-name path behaves the same as one started from the long-name path. Normalising both sides with realpathSync.native before comparing is the likely fix (not yet confirmed).
Repro (sketch)
On Windows, create a repo under %TEMP% without resolving the short name, then run({ branchStrategy: { type: "branch", branch: "x" }, ... }) with noSandbox().
This issue was AI-generated (Claude Code) on behalf of @mattpocock.
Activity