Skip to content

fix(windows): repair missing hermes.exe after pip install (#52931) - #52940

Closed
HexLab98 wants to merge 2 commits into
NousResearch:mainfrom
HexLab98:fix/windows-missing-hermes-exe-52931
Closed

fix(windows): repair missing hermes.exe after pip install (#52931)#52940
HexLab98 wants to merge 2 commits into
NousResearch:mainfrom
HexLab98:fix/windows-missing-hermes-exe-52931

Conversation

@HexLab98

@HexLab98 HexLab98 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

On Windows, uv pip install -e . can register hermes.exe in package metadata (RECORD / entry_points.txt) while the launcher never lands on disk. Users end up with hermes-agent.exe and hermes-acp.exe in venv\Scripts\, but hermes is not found on PATH after hermes update or a fresh install.

This PR adds a post-install verification step: read [project.scripts] from pyproject.toml, check that every expected .exe exists, and retry pip install --reinstall -e . (with the existing Windows quarantine path) if anything is missing.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • hermes_cli/main.py — add _verify_console_scripts_installed(); call it after _verify_core_dependencies_installed() in the update/install path
  • scripts/install.ps1 — mirror the same check after Windows dependency install; retry entry points before setup
  • tests/hermes_cli/test_verify_console_scripts.py — unit tests for missing-shim detection and repair trigger

How to Test

  1. scripts/run_tests.sh tests/hermes_cli/test_verify_console_scripts.py
  2. On Windows: run hermes update (or scripts/install.ps1) and confirm venv\Scripts\hermes.exe exists alongside hermes-agent.exe / hermes-acp.exe
  3. If hermes.exe is manually deleted after install, rerun update — repair should recreate it

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS (unit tests); Windows manual verification pending

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

@HexLab98
HexLab98 force-pushed the fix/windows-missing-hermes-exe-52931 branch from 0e692c9 to 19ac78a Compare June 26, 2026 07:19
@HexLab98 HexLab98 changed the title Fix/windows missing hermes exe 52931 fix(windows): repair missing hermes.exe after pip install (#52931) Jun 26, 2026
@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard platform/windows Native Windows-specific behavior or breakage sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows P2 Medium — degraded but workaround exists labels Jun 26, 2026
@HexLab98
HexLab98 force-pushed the fix/windows-missing-hermes-exe-52931 branch from 19ac78a to 3446031 Compare June 26, 2026 07:34
HexLab98 added 2 commits June 26, 2026 14:37
…ch#52931)

On Windows, uv pip install -e . can register hermes.exe in package metadata
while the launcher never lands on disk. Detect missing [project.scripts]
shims and reinstall entry points under the existing quarantine path in
hermes update and install.ps1.
Add unit tests for missing-shim detection and repair trigger in
_verify_console_scripts_installed.
@HexLab98
HexLab98 force-pushed the fix/windows-missing-hermes-exe-52931 branch from 3446031 to 4faacfa Compare June 26, 2026 07:38
helix4u

This comment was marked as outdated.

@helix4u

helix4u commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Thanks for jumping on this. I think this PR is the right place for the fix.

One missing case I noticed: the verifier should also run after the primary editable install succeeds, before returning. Right now this covers the fallback path, but the support report can happen when the primary install reports success while venv\Scripts\hermes.exe is still missing on disk.

I opened #53203 with that follow-up change.

@OutThisLife

Copy link
Copy Markdown
Collaborator

Superseded by #54457, which combines this base repair with #53203's primary-success-path follow-up in one branch.

Your commits were cherry-picked with authorship preserved. Thank you for the Windows launcher repair work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists platform/windows Native Windows-specific behavior or breakage sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants