{"record":{"id":"817630511ce3eb14","repo":"NousResearch/hermes-agent","slug":"git-for-windows-is-required-for-hermes-on-windows","errorCode":null,"errorMessage":"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.","messagePattern":"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\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"apps/desktop/electron/main.ts","lineNumber":4091,"sourceCode":"  // wired into the backend before launch. Same code path the old factory\n  // sync flow exited through, minus all the factory/pip/marker machinery\n  // (install.ps1 owns those concerns now and the bootstrap-complete marker\n  // attests they ran successfully).\n  if (!isHermesSourceRoot(ACTIVE_HERMES_ROOT)) {\n    throw new Error(\n      `Hermes install at ${ACTIVE_HERMES_ROOT} is missing or incomplete. ` +\n        'Reinstall via the desktop installer or scripts/install.ps1.'\n    )\n  }\n\n  // On Windows, preflight Git Bash. Hermes' terminal tool calls bash.exe\n  // directly (tools/environments/local.py); without it the agent can't run\n  // terminal commands. install.ps1's Stage-Git puts PortableGit at\n  // %LOCALAPPDATA%\\hermes\\git\\, which findGitBash() picks up, so for any\n  // user who completed the bootstrap this is a no-op. For users who got\n  // here via an external `hermes` on PATH, this check still helps.\n  if (IS_WINDOWS && !findGitBash()) {\n    throw new Error(\n      'Git for Windows is required for Hermes on Windows (provides Git Bash, ' +\n        \"which the agent's terminal tool uses). Install it from \" +\n        'https://git-scm.com/download/win or run `winget install -e --id Git.Git`, ' +\n        'then relaunch Hermes.'\n    )\n  }\n\n  const venvPython = getVenvPython(VENV_ROOT)\n\n  if (!fileExists(venvPython)) {\n    // No venv at the expected location AND no bootstrap-needed sentinel\n    // means we have a half-installed checkout: .git exists, source files\n    // exist, but venv is missing or broken. This shouldn't happen in\n    // normal flow because activeRuntimeState() requires isHermesSourceRoot()\n    // plus an importable hermes_cli before it hands back the active runtime.\n    // If we hit this, the user (or a deleted venv) broke the invariant; tell\n    // them to re-run the install.\n    throw new Error(","sourceCodeStart":4073,"sourceCodeEnd":4109,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/apps/desktop/electron/main.ts#L4073-L4109","documentation":"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.","triggerScenarios":"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.","commonSituations":"Fresh Windows boxes that never had Git; users who uninstalled Git thinking the app bundled everything; cleaned-up LOCALAPPDATA.","solutions":["Install Git for Windows from https://git-scm.com/download/win or `winget install -e --id Git.Git`, then relaunch.","If PortableGit was deleted from %LOCALAPPDATA%\\hermes\\git\\, re-run the desktop installer / install.ps1 to restore Stage-Git.","Ensure bash.exe is on PATH or at the location findGitBash() probes."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"function gitBashAvailable() {\n  return findGitBash() !== null // same probe the main process uses\n}\nif (IS_WINDOWS && !gitBashAvailable()) {\n  showInstallGitPrompt()\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install Git for Windows before first launch (winget install -e --id Git.Git)","Don't delete %LOCALAPPDATA%\\hermes\\git\\ (Stage-Git PortableGit)","Re-run install.ps1 after cleaning LOCALAPPDATA"],"tags":["windows","git-bash","desktop","startup","terminal","preflight"],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}