hermes - ✅(Solved) Fix [Bug]: hermes update fails on Windows with Access is denied (os error 5) during uv pip install. [2 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#23327Fetched 2026-05-11 03:29:57
View on GitHub
Comments
0
Participants
1
Timeline
7
Reactions
0
Author
Participants
Timeline (top)
labeled ×4cross-referenced ×2referenced ×1

Error Message

did a hermes update and got a lot of "Access is denied. (os error 5)" and "raise CalledProcessError(retcode, process.args,

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

PR fix notes

PR #23353: fix(update): rename hermes.exe before uv/pip install on Windows

Description (problem / solution / changelog)

What does this PR do?

Fixes hermes update failing on Windows with Access is denied (os error 5) when uv pip install -e . tries to overwrite the active hermes.exe in venv/Scripts/.

Windows holds a file lock on any running .exe, preventing it from being overwritten. The fix renames hermes.exe to hermes.exe.old before the install step — Windows allows renaming an open executable in place, which releases the write lock so the installer can write a fresh hermes.exe. The .old file is cleaned up in a finally block after the install completes (success or failure).

Two helper functions added:

  • _rename_active_windows_exe() — renames venv/Scripts/hermes.exe to .old before install; no-op on non-Windows
  • _cleanup_windows_exe_old() — removes the .old backup; called in finally so it always runs

No-op on Linux/macOS. No behavior change on non-Windows platforms.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

References

Fixes #23327

Checklist

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits
  • My PR contains only changes related to this fix

Changed files

  • hermes_cli/main.py (modified, +104/-273)

PR #23408: fix(update): rename hermes.exe before uv/pip install on Windows

Description (problem / solution / changelog)

What does this PR do?

Fixes hermes update failing on Windows with Access is denied (os error 5) when uv pip install -e . tries to overwrite the active hermes.exe in venv/Scripts/.

Windows holds a file lock on any running .exe, preventing it from being overwritten. The fix renames hermes.exe to hermes.exe.old before the install step — Windows allows renaming an open executable in place, which releases the write lock so the installer can write a fresh hermes.exe. The .old file is cleaned up in a finally block after the install completes (success or failure).

Two helper functions added to hermes_cli/main.py:

  • _rename_active_windows_exe() — renames venv/Scripts/hermes.exe to .old before install; no-op on non-Windows
  • _cleanup_windows_exe_old() — removes the .old backup; called in finally so it always runs

No-op on Linux/macOS. No behavior change on non-Windows platforms.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

References

Fixes #23327

Checklist

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits
  • My PR contains only changes related to this fix

Changed files

  • hermes_cli/main.py (modified, +91/-41)

Code Example

Report     https://paste.rs/4JMDs
  agent.log  https://paste.rs/z6nKA

---
RAW_BUFFERClick to expand / collapse

Bug Description

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.

Steps to Reproduce

run hermes update in powershell.

Expected Behavior

Just a nice update without any problems.

Actual Behavior

Lot's of access is denied.

Affected Component

Setup / Installation

Messaging Platform (if gateway-related)

No response

Debug Report

Report     https://paste.rs/4JMDs
  agent.log  https://paste.rs/z6nKA

Operating System

windows 11

Python Version

3.11.15

Hermes Version

v0.13.0 (2026.5.7)

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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING