Skip to content

fix(gateway): fall back to module entrypoint when hermes is not on PATH#1150

Closed
eren-karakus0 wants to merge 1 commit intoNousResearch:mainfrom
eren-karakus0:fix/update-command-path-fallback
Closed

fix(gateway): fall back to module entrypoint when hermes is not on PATH#1150
eren-karakus0 wants to merge 1 commit intoNousResearch:mainfrom
eren-karakus0:fix/update-command-path-fallback

Conversation

@eren-karakus0
Copy link
Contributor

Summary

/update hard-failed with ✗ hermes command not found on PATH even when Hermes was already running. This happens in venv, pipx, or module-based installs where the hermes executable is not on the gateway process's PATH.

Now falls back to sys.executable -m hermes_cli.main instead of returning an error.

Changes

  • gateway/run.py: Replace hard-fail with fallback to {sys.executable} -m hermes_cli.main when shutil.which("hermes") returns None
  • tests/gateway/test_update_command.py: Update existing test to verify fallback behavior — checks that the update proceeds and the command string contains the module entrypoint

Test plan

  • hermes not on PATH → falls back to module entrypoint, update proceeds
  • hermes on PATH → existing behavior unchanged (uses binary directly)
  • All other existing update command tests unaffected

Fixes #1049

/update hard-failed with "command not found on PATH" even when Hermes
was already running via venv/pipx/module-based installs. Now falls back
to `sys.executable -m hermes_cli.main` instead of returning an error.

Fixes NousResearch#1049
@teknium1
Copy link
Contributor

duplicate

@teknium1 teknium1 closed this Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(gateway): /update hard-fails with ' command not found on PATH' even when Hermes is running

2 participants