You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: hermes update fails on Windows with Access is denied (os error 5) during uv pip install. #23327
This is the hermes beta windows version running in powershell.
did a hermes update and got a lot of "Access is denied. (os error 5)" and "raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\Users\******\.local\bin\uv.EXE', 'pip', 'install', '-e', '.']' returned non-zero exit status 2."
my wsl hermes told me: Cause: Windows prevents overwriting hermes.exe while the process is active.
Fix: hermes_cli/main.py needs to rename the active hermes.exe before calling the installer.
This looks implemented on current main by the Windows update quarantine work.
Automated hermes-sweeper review evidence:
hermes_cli/main.py:6773 defines _quarantine_running_hermes_exe; its docstring explicitly names the reported failure mode: Windows blocks replacing the running hermes.exe, so uv/pip install can fail with Access is denied. (os error 5), and the fix renames live shims to hermes.exe.old.<timestamp> before install.
hermes_cli/main.py:7046 routes editable install attempts through _run_quarantined_install, which calls the quarantine helper before running the install.
hermes_cli/main.py:8501 shows the hermes update dependency install path calling _install_python_dependencies_with_optional_fallback([uv_bin, "pip"], ...), so the Windows quarantine is on the update path that failed here.
Regression coverage exists in tests/hermes_cli/test_update_concurrent_quarantine.py:348 and following for successful quarantine, retry, reboot-deferred fallback, and actionable warning behavior.
The implementation landed in 4d9dcbc47ae40ad1ddc2f02221fe7283c65106b6 (fix(windows): unbreak install + update on Windows (#23394)), which git tag --contains shows is included in v2026.5.16.
Reproducible on v0.20.0 (Windows 11) on 2026-08-12, and the closed fixes do NOT cover this case.
What actually fails
The updater pulls code fine, then runs uv pip install -e . to reinstall deps. But the running hermes process has already imported cryptography (for Nous Portal OAuth / TLS), so its compiled Lib\site-packages\cryptography\hazmat\bindings\_rust.pyd is loaded into the live process. uv pip install then tries to reinstall cryptography and replace that exact _rust.pyd → Windows refuses (file in use) → WinError 5: Access is denied → the uv pip install -e . step exits code 2 → the install is left half-broken. Every subsequent hermes doctor / hermes setup then re-runs the same uv pip install, re-locks the same file, and re-fails — a self-deadlock. (PR #26677 / #23408 only rename hermes.exe; they do not release the cryptography .pyd, so the wedge persists.)
Reliable workaround (verified)
Run the dependency reinstall from a process that does NOT have cryptography loaded:
End the chat / close all Hermes windows (so nothing holds the .pyd).
taskkill /F /IM Hermes.exe /T
D:\hermes\bin\uv.exe pip install -e D:\hermes\hermes-agent --python D:\hermes\hermes-agent\venv
(uv.exe uses its own bundled python, so it never loads the venv's cryptography and can replace the file freely.)
Do the dependency reinstall in a child process that has NOT imported cryptography (e.g. spawn a fresh python -m pip install after the portal/TLS handshake, or release the module before install).
Or stage the new venv into a temp dir and atomically swap it, the same way the .exe quarantine works.
Or in _run_quarantined_install, first taskkill /F /IM Hermes.exe /T (the running instance) before uv pip install, so no live process holds the venv files.
Activity
fix(update): rename hermes.exe before uv/pip install on Windows
teknium1 commentedon Jun 11, 2026
This looks implemented on current main by the Windows update quarantine work.
Automated hermes-sweeper review evidence:
hermes_cli/main.py:6773defines_quarantine_running_hermes_exe; its docstring explicitly names the reported failure mode: Windows blocks replacing the runninghermes.exe, so uv/pip install can fail withAccess is denied. (os error 5), and the fix renames live shims tohermes.exe.old.<timestamp>before install.hermes_cli/main.py:7046routes editable install attempts through_run_quarantined_install, which calls the quarantine helper before running the install.hermes_cli/main.py:8501shows thehermes updatedependency install path calling_install_python_dependencies_with_optional_fallback([uv_bin, "pip"], ...), so the Windows quarantine is on the update path that failed here.tests/hermes_cli/test_update_concurrent_quarantine.py:348and following for successful quarantine, retry, reboot-deferred fallback, and actionable warning behavior.4d9dcbc47ae40ad1ddc2f02221fe7283c65106b6(fix(windows): unbreak install + update on Windows (#23394)), whichgit tag --containsshows is included inv2026.5.16.Closing as implemented on main.
sizzlled1-blip commentedon Aug 12, 2026
Reproducible on v0.20.0 (Windows 11) on 2026-08-12, and the closed fixes do NOT cover this case.
What actually fails
The updater pulls code fine, then runs
uv pip install -e .to reinstall deps. But the runninghermesprocess has already importedcryptography(for Nous Portal OAuth / TLS), so its compiledLib\site-packages\cryptography\hazmat\bindings\_rust.pydis loaded into the live process.uv pip installthen tries to reinstall cryptography and replace that exact_rust.pyd→ Windows refuses (file in use) →WinError 5: Access is denied→ theuv pip install -e .step exits code 2 → the install is left half-broken. Every subsequenthermes doctor/hermes setupthen re-runs the sameuv pip install, re-locks the same file, and re-fails — a self-deadlock. (PR #26677 / #23408 only renamehermes.exe; they do not release thecryptography.pyd, so the wedge persists.)Reliable workaround (verified)
Run the dependency reinstall from a process that does NOT have
cryptographyloaded:taskkill /F /IM Hermes.exe /TD:\hermes\bin\uv.exe pip install -e D:\hermes\hermes-agent --python D:\hermes\hermes-agent\venv(uv.exe uses its own bundled python, so it never loads the venv's cryptography and can replace the file freely.)
D:\hermes\hermes-agent\venv\Scripts\hermes.exefresh.Suggested real fixes
cryptography(e.g. spawn a freshpython -m pip installafter the portal/TLS handshake, or release the module before install)..exequarantine works._run_quarantined_install, firsttaskkill /F /IM Hermes.exe /T(the running instance) beforeuv pip install, so no live process holds the venv files.Happy to test a patch on Windows if it helps.