Repository navigation
Description
Bug Description
Environment
- OS: Windows 11, Build 26H1
- Hermes version: 0.16.0
- Installation path:
C:\Users\user\AppData\Local\hermes\
Problem
When the installer tries to auto-update Hermes, it fails with the error:
> "Не удается удалить элемент C:\Users\user\AppData\Local\hermes\hermes-agent\venv\Scripts\pythonw.exe: Отказано в доступе по пути 'pythonw.exe'."
Steps to reproduce
- Hermes desktop app is running (with gateway profile active)
- Installer starts auto-update on launch
- Installer tries to remove old
release\win-unpackeddirectory - Error dialog appears: "INSTALL DIDN'T FINISH"
What I tried
- Restarted PC and retried - same error
- Killed Hermes.exe and pythonw.exe via Task Manager - same error
- Ran installer as Administrator - same error
Root cause hypothesis
pythonw.exe from venv\Scripts\ remains locked by a running process (Hermes gateway, Electron main process, or a child process spawned by the desktop app). The installer waits for Hermes to exit and even force-kills stragglers, but the venv pythonw.exe is not terminated, preventing deletion of the old build directory.
Suggested fix
Ensure all child processes including venv\Scripts\pythonw.exe are fully terminated before attempting to delete release\win-unpacked during the update stage. Alternatively, stage the new build to a temporary directory and swap atomically to avoid locking conflicts.
Logs
See attached bootstrap-installer.log covering multiple update attempts from 2026-06-09 to 2026-06-16.
Steps to Reproduce
- Hermes desktop app is running (with gateway profile active)
- Installer starts auto-update on launch
- Installer tries to remove old
release\win-unpackeddirectory - Error dialog appears: "INSTALL DIDN'T FINISH"
Expected Behavior
Installer should successfully terminate all Hermes-related processes
(including pythonw.exe from venv) before attempting to delete
the old build directory, then complete the update and launch
the new version without errors.
Actual Behavior
Installer fails with "Access Denied" error when trying to delete
pythonw.exe during the update process. Error message:
"Не удается удалить элемент C:\Users\user\AppData\Local\hermes
hermes-agent\venv\Scripts\pythonw.exe: Отказано в доступе
по пути 'pythonw.exe'."
The "INSTALL DIDN'T FINISH" dialog appears with "Retry install"
and "Open log folder" buttons. Retrying or running as Administrator
does not resolve the issue.
Affected Component
Setup / Installation
Messaging Platform (if gateway-related)
No response
Debug Report
Unable to run `hermes debug share` because the installer fails
before Hermes can launch. Full bootstrap logs are attached
to this issue instead (see `bootstrap-installer.log`).Operating System
Windows 11 (Build 26H1)
Python Version
3.11.15
Hermes Version
0.16.0
Additional Logs / Traceback (optional)
Root Cause Analysis (optional)
No response
Proposed Fix (optional)
No response
Are you willing to submit a PR for this?
- I'd like to fix this myself and submit a PR
Activity
alt-glitch commentedon Jun 17, 2026
Duplicate of #43268 — same Windows Desktop auto-update venv-lock family: a venv child process (here
pythonw.exe) holds a file lock undervenv\Scripts\, so the updater cannot delete the oldrelease\win-unpackedbuild directory and the update aborts ("INSTALL DIDN'T FINISH"). #43268 is the canonical open issue; open fix PR #43381 extends the pre-update kill to untracked hermes processes. The suggested atomic-swap-to-temp-dir mitigation here is a useful addition to that discussion.teknium1 commentedon Jul 14, 2026
Thanks for the detailed report. This is an automated hermes-sweeper review; the Windows venv-lock failure is implemented on current
main.scripts/install.ps1:1670explicitly handlespythonw.exegateway processes that the priorhermes.exetree-kill missed, then stops processes whose executable path resides under the old venv.scripts/install.ps1:1694performs a bounded repeated sweep to handle respawning processes before recreation.scripts/install.ps1:1712uses rename-then-best-effort-delete for the old venv, so a lingering mapped.pyddoes not prevent a fresh venv from being created.tests/test_install_unmerged_index.py:155covers the reportedpythonw.exe/ locked-.pydregression class.v2026.7.7.2via87ae4ae94bc13e302be2a37b30226f2b19909227.The prior duplicate discussion (#43268) and the linked installer work in #51682 identified this same failure mode.