NousResearch/hermes-agent · critical

Git for Windows is required for Hermes on Windows (provides

Error message

Git for Windows is required for Hermes on Windows (provides Git Bash, which the agent's terminal tool uses). Install it from https://git-scm.com/download/win or run `winget install -e --id Git.Git`, then relaunch Hermes.

What it means

Windows-only preflight in ensureRuntime: findGitBash() found no bash.exe. Hermes' terminal tool invokes bash.exe directly (tools/environments/local.py), so the agent cannot run terminal commands without Git for Windows. install.ps1's Stage-Git normally places PortableGit under %LOCALAPPDATA%\hermes\git\, which findGitBash picks up — hitting this means bootstrap didn't complete or the user runs an external `hermes` from PATH.

Source

Thrown at apps/desktop/electron/main.ts:4091

  // wired into the backend before launch. Same code path the old factory
  // sync flow exited through, minus all the factory/pip/marker machinery
  // (install.ps1 owns those concerns now and the bootstrap-complete marker
  // attests they ran successfully).
  if (!isHermesSourceRoot(ACTIVE_HERMES_ROOT)) {
    throw new Error(
      `Hermes install at ${ACTIVE_HERMES_ROOT} is missing or incomplete. ` +
        'Reinstall via the desktop installer or scripts/install.ps1.'
    )
  }

  // On Windows, preflight Git Bash. Hermes' terminal tool calls bash.exe
  // directly (tools/environments/local.py); without it the agent can't run
  // terminal commands. install.ps1's Stage-Git puts PortableGit at
  // %LOCALAPPDATA%\hermes\git\, which findGitBash() picks up, so for any
  // user who completed the bootstrap this is a no-op. For users who got
  // here via an external `hermes` on PATH, this check still helps.
  if (IS_WINDOWS && !findGitBash()) {
    throw new Error(
      'Git for Windows is required for Hermes on Windows (provides Git Bash, ' +
        "which the agent's terminal tool uses). Install it from " +
        'https://git-scm.com/download/win or run `winget install -e --id Git.Git`, ' +
        'then relaunch Hermes.'
    )
  }

  const venvPython = getVenvPython(VENV_ROOT)

  if (!fileExists(venvPython)) {
    // No venv at the expected location AND no bootstrap-needed sentinel
    // means we have a half-installed checkout: .git exists, source files
    // exist, but venv is missing or broken. This shouldn't happen in
    // normal flow because activeRuntimeState() requires isHermesSourceRoot()
    // plus an importable hermes_cli before it hands back the active runtime.
    // If we hit this, the user (or a deleted venv) broke the invariant; tell
    // them to re-run the install.
    throw new Error(

View on GitHub (pinned to c896c09c42)

Solutions

  1. Install Git for Windows from https://git-scm.com/download/win or `winget install -e --id Git.Git`, then relaunch.
  2. If PortableGit was deleted from %LOCALAPPDATA%\hermes\git\, re-run the desktop installer / install.ps1 to restore Stage-Git.
  3. Ensure bash.exe is on PATH or at the location findGitBash() probes.
Defensive patterns

Strategy: validation

Validate before calling

function gitBashAvailable() {
  return findGitBash() !== null // same probe the main process uses
}
if (IS_WINDOWS && !gitBashAvailable()) {
  showInstallGitPrompt()
}

Prevention

When it happens

Trigger: Launching the desktop on Windows with Git for Windows uninstalled; using an external hermes on PATH without the installer's PortableGit stage; PortableGit directory deleted after install.

Common situations: Fresh Windows boxes that never had Git; users who uninstalled Git thinking the app bundled everything; cleaned-up LOCALAPPDATA.

Related errors


AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14). Data as JSON: /api/errors/817630511ce3eb14. Report an issue: GitHub.