# NousResearch/hermes-agent · Windows Git binary paths with spaces breaking review

## Open now

- Nothing open on GitHub.

Bug reports and fixes addressing simple-git failures on Windows when the Git binary path contains spaces, causing errors in the desktop review pane. Multiple fix attempts target the same underlying path-handling issue.

## TL;DR

- 5 member(s): 0 open issue(s), 2 closed issue(s), 0 open PR(s), 1 merged PR(s), 2 PR(s) closed without merging.
- A fix was merged to main in PR #67612. Verify it addresses your case.
- **Recommended:** read PR #67612 (and any competing PRs below) before filing. Confirm the merged change covers your symptom.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `partially_resolved` · deciding PR(s): `pr-67612`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_SPANNING`): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
- Pairwise link density `0.44`: the share of member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Closed / duplicate issues

- #54888: \[Bug\]: Hermes Desktop git-review errors on Windows — GitPluginError: restricted characters
- #64810: Bug: Desktop review pane shows "No diff to show" on Windows — simple-git rejects binary paths with spaces

## Prior & competing PRs

- **#67612: fix(desktop): support spaced Windows Git paths in review**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `apps/desktop/electron/git-review-ops.test.ts`, `apps/desktop/electron/git-review-ops.ts`
  - fix hunks:
  - `apps/desktop/electron/git-review-ops.test.ts`

    ```diff
    @@ -6,7 +6,7 @@ import path from 'node:path'
     
     import { afterEach, test } from 'vitest'
     
    -import { repoStatus, resolveRenamePath } from './git-review-ops'
    +import { gitFor, repoStatus, resolveRenamePath } from './git-review-ops'
     
     const tempDirs: string[] = []
     
    ```

    ```diff
    @@ -34,6 +34,30 @@ test('resolveRenamePath: plain path is unchanged', () => {
       assert.equal(resolveRenamePath('src/a.ts'), 'src/a.ts')
     })
     
    +test('gitFor accepts an internally resolved git binary path containing spaces', () => {
    +  assert.doesNotThrow(() => gitFor(process.cwd(), 'C:\\Program Files\\Git\\cmd\\git.exe'))
    +})
    +
    +test('gitFor runs git through a spaced binary path', async () => {
    +  if (process.platform !== 'win32') {
    +    return
    +  }
    +
    +  const gitBin = path.join(process.env.ProgramFiles || String.raw`C:\Program Files`, 'Git', 'cmd', 'git.exe')
    +
    +  if (!fs.existsSync(gitBin)) {
    +    return
    +  }
    +
    +  const repo = makeRepo()
    +
    +  fs.writeFileSync(path.join(repo, 'changed.txt'), 'review me\n')
    +
    +  const status = await gitFor(repo, gitBin).status()
    +
    +  assert.equal(status.not_added.includes('changed.txt'), true)
    +})
    +
     test('resolveRenamePath: simple rename resolves to the new path', () => {
       assert.equal(resolveRenamePath('old.ts => new.ts'), 'new.ts')
     })
    ```
  - `apps/desktop/electron/git-review-ops.ts`

    ```diff
    @@ -43,7 +43,20 @@ function runGh(args, cwd, ghBin): Promise<{ ok: boolean; stdout: string }> {
     }
     
     function gitFor(cwd, gitBin) {
    -  return simpleGit({ baseDir: cwd, binary: gitBin || 'git', maxConcurrentProcesses: 4, trimmed: false })
    +  // `gitBin` is resolved inside the Electron main process from known install
    +  // locations or PATH — never renderer/user input. simple-git's custom-binary
    +  // validation rejects paths containing spaces (the default Windows install is
    +  // `C:\Program Files\Git\cmd\git.exe`), which silently broke the Review pane.
    +  // For spaced paths, opt into simple-git's trusted-binary escape hatch instead
    +  // of falling back to PATH (often absent in GUI-launched apps, and PATH lookup
    +  // could resolve a repo-local git.exe).
    +  return simpleGit({
    +    baseDir: cwd,
    +    binary: gitBin || 'git',
    +    maxConcurrentProcesses: 4,
    +    trimmed: false,
    +    ...(gitBin && /\s/.test(gitBin) ? { unsafe: { allowUnsafeCustomBinary: true } } : {})
    +  })
     }
     
     // simple-git reports renames as `old => new` (and `dir/{old => new}/f`); resolve
    ```

    ```diff
    @@ -680,6 +693,7 @@ async function repoStatus(repoPath, gitBin) {
     export {
       branchBase,
       fileDiffVsHead,
    +  gitFor,
       repoStatus,
       resolveRenamePath,
       reviewCommit,
    ```
- **#64713: fix(desktop): support spaced Windows Git paths in review**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `e361c5e20`, `#67612`
- **#64812: fix(desktop): handle Windows simple-git binary paths with spaces**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `e361c5e20402375c74a65ca52810c6a380461226`, `#67612`, `#60156`, `#64713`, `#55337`, `#55337`

## Fix status

- Merged to main in PR #67612 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-07-19`.
- Subsystem: `apps/desktop`
