Repository navigation
Description
Bug Description
When hermes update is interrupted on Windows (terminal closed, process killed), it leaves a .update-incomplete marker file. On EVERY subsequent hermes dashboard launch, the auto-recovery logic re-runs uv pip install -e .[all], which tries to replace hermes.exe — the exact binary that is currently running. This creates a deadlock:
.update-incompleteexists → trigger auto-recovery- Auto-recovery needs to delete
hermes.exe hermes.exeis locked by the runninghermes dashboardprocess →拒绝访问 (os error 5)- Recovery fails, but
.update-incompleteis NOT removed - Every restart repeats the cycle
Steps to Reproduce
- On Windows, run
hermes updatefrom terminal - Close the terminal mid-update (Ctrl+C unresponsive, user closes window)
- Run
hermes dashboard - Every launch:
⚠ A previous 'hermes update' was interrupted — finishing dependency installation now... - Then:
error: failed to remove file ... hermes.exe: 拒绝访问 (os error 5) - Restart → same error, forever
Expected Behavior
After an interrupted update, hermes dashboard should either:
- Detect the self-lock and skip replacing the running binary, OR
- Remove the
.update-incompletemarker on failure so it doesn't retry endlessly
Actual Behavior
Every launch triggers the auto-recovery, fails with the same hermes.exe lock error, and leaves the marker intact for the next launch to repeat.
Affected Component
CLI (interactive chat), Setup / Installation
Messaging Platform (if gateway-related)
N/A (CLI only)
Debug Report
Report https://paste.rs/fDEeg
agent.log https://dpaste.com/H3QD8PXE7
gateway.log https://paste.rs/K2TlMOperating System
Windows 10 (19045), Git Bash / MSYS2, Chinese GBK locale
Python Version
3.11.15
Hermes Version
0.16.0
Additional Logs / Traceback (optional)
Root Cause Analysis (optional)
_cmd_update_impl() in hermes_cli/main.py writes .update-incomplete before the install step. When the install fails (e.g. hermes.exe locked by running process), the marker is not cleared.
The dashboard auto-recovery path does not check whether the binary being replaced is the currently executing process before running uv pip install -e .[all].
Proposed Fix (optional)
- In auto-recovery: if install fails, REMOVE
.update-incompletemarker - In auto-recovery: detect if
hermes.exeis the running process, skip or schedule replacement for next launch
Are you willing to submit a PR for this?
- I'd like to fix this myself and submit a PR
Activity
test(cli): cover Windows self-lock recovery guard + cmd-quote its hint
test(cli): cover Windows self-lock recovery guard + cmd-quote its hint
test(cli): cover Windows self-lock recovery guard + cmd-quote its hint
test(cli): cover Windows self-lock recovery guard + cmd-quote its hint
konsisumer commentedon Jul 7, 2026
These issues look like facets of one underlying problem: #45542, #45860, #46791.
They were grouped by a semantic pass as different symptoms of one underlying problem in
area/config. A single coordinated fix may resolve them together — flagging for visibility; no action has been taken on the individual issues.Automated root-cause grouping. Reply to correct if these are unrelated.
test(cli): cover Windows self-lock recovery guard + cmd-quote its hint
test(cli): cover Windows self-lock recovery guard + cmd-quote its hint
teknium1 commentedon Jul 14, 2026
Thanks for the clear Windows reproduction and root-cause analysis. This is already fixed on current main by the contributor-authored recovery guard; this is an automated hermes-sweeper review.
b6f592dbdc4cf679c797343c526d4e776ac8cd7eadded Windows shim-ancestry detection in_recover_from_interrupted_install().hermes_cli/main.py:7073-7118skips the self-locked reinstall, clears.update-incomplete, releases the recovery lock, and returns.tests/hermes_cli/test_update_interrupted_recovery.py:142-178verifies the guard skips installation and clears the marker for the exacthermes.exeself-lock case ([Bug]: .update-incomplete marker causes infinite auto-recovery loop — hermes.exe self-locked on Windows #45542).v2026.7.1.test(cli): cover Windows self-lock recovery guard + cmd-quote its hint
test(cli): cover Windows self-lock recovery guard + cmd-quote its hint
test(cli): cover Windows self-lock recovery guard + cmd-quote its hint
test(cli): cover Windows self-lock recovery guard + cmd-quote its hint