Skip to content

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

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-ec1096a3
Mar 15, 2026
Merged

fix(gateway): fall back to module entrypoint when hermes is not on PATH#1355
teknium1 merged 2 commits into
mainfrom
hermes/hermes-ec1096a3

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

  • salvage PR fix(gateway): fall back to sys.executable -m hermes_cli.main when hermes not on PATH #1052 onto current main by cherry-picking the contributor's /update path-resolution fix with authorship preserved
  • fall back to the current interpreter module entrypoint when the hermes shim is missing from PATH
  • resolve the current-main conflict by preserving the newer gateway lifecycle logic and adapting the fallback to use shell-quoted argv parts safely
  • add/update gateway /update tests covering the fallback resolution behavior

Test plan

  • python -m pytest tests/gateway/test_update_command.py -n0 -q
  • python -m pytest tests/ -n0 -q

Closes #1049
Salvages #1052

teyrebaz33 and others added 2 commits March 14, 2026 12:15
…mes not on PATH

When shutil.which('hermes') returns None, _resolve_hermes_bin() now tries
sys.executable -m hermes_cli.main as a fallback. This handles setups where
Hermes is launched via a venv or module invocation and the hermes symlink is
not on PATH for the gateway process.

Fixes #1049
Follow up on salvaged PR #1052.
Restore current-main gateway lifecycle handling after conflict resolution and
adapt the update fallback to use shell-quoted argv parts safely.
@teknium1 teknium1 merged commit fa89b65 into main Mar 15, 2026
1 check passed
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 27, 2026
…ec1096a3

Salvaged PR NousResearch#1052 onto current main with the contributor commit preserved plus a small follow-up for current-main conflict resolution and safe command quoting.
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…ec1096a3

Salvaged PR NousResearch#1052 onto current main with the contributor commit preserved plus a small follow-up for current-main conflict resolution and safe command quoting.
olympus-terminal pushed a commit to olympus-terminal/hermes-agent that referenced this pull request May 16, 2026
…ec1096a3

Salvaged PR NousResearch#1052 onto current main with the contributor commit preserved plus a small follow-up for current-main conflict resolution and safe command quoting.
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
…ec1096a3

Salvaged PR NousResearch#1052 onto current main with the contributor commit preserved plus a small follow-up for current-main conflict resolution and safe command quoting.
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