{"record":{"id":"beb680268edd0ec4","repo":"NousResearch/hermes-agent","slug":"hermes-venv-missing-at-venv-root-re-run-the-de","errorCode":null,"errorMessage":"Hermes venv missing at ${VENV_ROOT}. Re-run the desktop installer or `scripts/install.ps1` to rebuild it.","messagePattern":"Hermes venv missing at (.+?)\\. Re-run the desktop installer or `scripts/install\\.ps1` to rebuild it\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"apps/desktop/electron/main.ts","lineNumber":4109,"sourceCode":"    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(\n      `Hermes venv missing at ${VENV_ROOT}. Re-run the desktop installer or ` + '`scripts/install.ps1` to rebuild it.'\n    )\n  }\n\n  backend.command = getVenvPython(VENV_ROOT)\n  backend.label = `Hermes at ${ACTIVE_HERMES_ROOT} (venv: ${VENV_ROOT})`\n  updateBootProgress({\n    phase: 'runtime.ready',\n    message: 'Hermes runtime is ready',\n    progress: 82,\n    running: true,\n    error: null\n  })\n\n  return backend\n}\n\n// Assemble a single-file multipart/form-data body (FastAPI `UploadFile`","sourceCodeStart":4091,"sourceCodeEnd":4127,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/apps/desktop/electron/main.ts#L4091-L4127","documentation":"Thrown in ensureRuntime when the venv Python interpreter at VENV_ROOT does not exist while the source checkout itself looks complete (no bootstrap-needed sentinel either). Per the comment, activeRuntimeState() should guarantee source + importable hermes_cli before this point, so hitting it means a broken invariant — typically the user or a cleanup tool deleted the venv from a valid checkout.","triggerScenarios":"venv directory under VENV_ROOT deleted, renamed, or corrupted while .git and source files remain; interrupted install that created the checkout but not the venv; disk cleanup tools removing 'unused' virtualenv folders.","commonSituations":"Manual venv deletion to 'save space'; antivirus quarantining python.exe; partial installs after an installer crash.","solutions":["Re-run the desktop installer or scripts/install.ps1 to rebuild the venv.","Alternatively create the venv manually at VENV_ROOT and pip install -e the checkout, matching what install.ps1 does.","Verify getVenvPython(VENV_ROOT) path exists (e.g. VENV_ROOT/Scripts/python.exe on Windows) after rebuild."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const fs = require('fs')\nconst venvPython = getVenvPython(VENV_ROOT)\nif (!fs.existsSync(venvPython)) {\n  await runInstallerToRebuildVenv()\n}","typeGuard":null,"tryCatchPattern":"try {\n  await ensureRuntime(backend)\n} catch (e) {\n  if (/venv missing/.test(e.message)) await offerVenvRebuild()\n  else throw e\n}","preventionTips":["Never delete the venv under the install root","Let install.ps1 own venv creation","If you rebuild manually, place it exactly at VENV_ROOT"],"tags":["desktop","venv","python","install","startup"],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}