fix(gateway): fall back to sys.executable -m hermes_cli.main when hermes not on PATH#1052
Closed
teyrebaz33 wants to merge 1 commit into
Closed
fix(gateway): fall back to sys.executable -m hermes_cli.main when hermes not on PATH#1052teyrebaz33 wants to merge 1 commit into
teyrebaz33 wants to merge 1 commit into
Conversation
…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 NousResearch#1049
teknium1
added a commit
that referenced
this pull request
Mar 15, 2026
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
added a commit
that referenced
this pull request
Mar 15, 2026
Salvaged PR #1052 onto current main with the contributor commit preserved plus a small follow-up for current-main conflict resolution and safe command quoting.
Contributor
|
Merged via PR #1355. Your substantive /update path-resolution fix was cherry-picked onto current main with authorship preserved, plus a small follow-up for the current-main gateway conflict and safe command quoting. Thanks for the contribution. |
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 27, 2026
Follow up on salvaged PR NousResearch#1052. Restore current-main gateway lifecycle handling after conflict resolution and adapt the update fallback to use shell-quoted argv parts safely.
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
Follow up on salvaged PR NousResearch#1052. Restore current-main gateway lifecycle handling after conflict resolution and adapt the update fallback to use shell-quoted argv parts safely.
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
Follow up on salvaged PR NousResearch#1052. Restore current-main gateway lifecycle handling after conflict resolution and adapt the update fallback to use shell-quoted argv parts safely.
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
Follow up on salvaged PR NousResearch#1052. Restore current-main gateway lifecycle handling after conflict resolution and adapt the update fallback to use shell-quoted argv parts safely.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1049
Problem
/updatehard-failed with✗hermescommand not found on PATH.even when Hermes was already running. This happens in setups where Hermes is launched via a venv or module invocation and thehermessymlink is not on PATH for the gateway process.Fix
Extracts a
_resolve_hermes_bin()helper that tries two strategies in order:shutil.which("hermes")— standard PATH lookup (existing behavior)sys.executable -m hermes_cli.main— fallback whenhermes_cliis importable but the symlink is missing from PATHIf both fail, returns a clear error message explaining that the problem is path resolution, not Hermes availability, and suggests running
hermes updatemanually.Changes
gateway/run.py: add_resolve_hermes_bin()helper, use it in_handle_update_commandtests/gateway/test_update_command.py: update existing test + add 4 new tests covering fallback behavior