Skip to content

[Bug]: Windows update fails after interrupted install — hermes.exe missing + node_modules ENOTEMPTY + desktop UPDATE DIDN'T FINISH #75584

Description

@mboveiri

Environment

  • OS: Windows 10/11
  • Hermes version: v0.19.0 (2026.7.20) — install method: git
  • Python: 3.11.15
  • Node.js: v24.13.0
  • Install directory: C:\Users\<user>\AppData\Local\hermes\hermes-agent

Description

After a previous incomplete update (likely interrupted or crashed), running hermes update fails at the Building desktop app stage with multiple cascading errors. The desktop app also refuses to launch, showing "UPDATE DIDN'T FINISH — Could not find the hermes CLI".

Issues #39185, #45860, and #48854 are reportedly fixed, but this scenario still reproduces on v0.19.0.

Steps to Reproduce

  1. Install Hermes Agent v0.19.0 via git
  2. A previous hermes update or hermes desktop is interrupted (power loss, Ctrl+C, crash, etc.)
  3. Run hermes update again
  4. Observe failures at "Building desktop app" stage

Actual Behavior

Error 1: npm ci fails with ENOTEMPTY

npm error code ENOTEMPTY
npm error syscall rmdir
npm error path C:\Users\<user>\AppData\Local\hermes\hermes-agent\node_modules\@babel\core\node_modules\.bin
npm error errno -4051
npm error ENOTEMPTY: directory not empty, rmdir

npm ci fails because a previous incomplete install left corrupted node_modules. The retry with npm install also fails or hangs.

Error 2: Playwright Chromium not installed

'playwright' is not recognized as an internal or external command
[!] Playwright Chromium install failed -- exit code 1

Because npm install for desktop workspace failed, npx playwright install chromium cannot run.

Error 3: hermes.exe missing from venv/Scripts/

The desktop app shows:

UPDATE DIDN'T FINISH
Could not find the hermes CLI under C:\Users\<user>\AppData\Local\hermes\hermes-agent.
Is Hermes installed? Re-run the installer to repair the install.

After checking venv/Scripts/, only hermes-agent.exe and hermes-acp.exe exist — hermes.exe is gone.

Error 4: Desktop updater hangs

Clicking "Retry update" in the desktop UI either hangs indefinitely or fails with "another Hermes process is using this installation" even after closing the app and restarting Windows.

Manual Fix Required

The following manual steps were needed to recover:

# 1. Kill all node/electron processes
Get-Process | Where-Object { $_.ProcessName -match 'electron|node|npm' } | Stop-Process -Force

# 2. Delete corrupted node_modules
cmd /c "rmdir /s /q ""C:\Users\<user>\AppData\Local\hermes\hermes-agent\node_modules"""

# 3. Restore hermes.exe via pip reinstall
cd "C:\Users\<user>\AppData\Local\hermes\hermes-agent"
.\venv\Scripts\python.exe -m pip install -e .

# 4. Run update again
hermes update

After these steps, hermes update succeeded and upgraded to v0.19.1.

Expected Behavior

  1. hermes update should detect corrupted node_modules and clean-reinstall automatically
  2. If hermes.exe is missing, the updater/CLI should attempt to restore it (e.g. via pip install -e .) instead of failing with "Could not find the hermes CLI"
  3. The desktop updater should not hang indefinitely — it should detect the corrupted state and offer a repair option

Related Issues

Suggestion

The update mechanism should include a self-healing / defensive recovery step:

  1. Before starting the update, validate that hermes.exe exists in venv/Scripts/
  2. If missing, run pip install -e . to restore it before proceeding
  3. If node_modules is corrupted (detect by failed npm ci), automatically delete and retry with npm install
  4. On Windows, kill any orphaned Hermes-related processes before starting the update (similar to what hermes desktop --force-build already does)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existsarea/install-updateInstaller, updater, packaging, wheels, doctorcomp/cliCLI entry point, hermes_cli/, setup wizardcomp/desktopElectron desktop app (apps/desktop/*)platform/windowsNative Windows-specific behavior or breakagesweeper:risk-compatibilitySweeper risk: may break existing users, config, migrations, defaults, or upgradessweeper:risk-platform-windowsSweeper risk: may break or behave differently on native Windowstype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions