-
Notifications
You must be signed in to change notification settings - Fork 2.6k
bug(gateway): /update hard-fails with ' command not found on PATH' even when Hermes is running #1049
Copy link
Copy link
Closed
Description
Bug Description
The gateway /update flow currently hard-fails if shutil.which("hermes") returns nothing, even though Hermes is already running.
In gateway/run.py:
hermes_bin = shutil.which("hermes")
if not hermes_bin:
return "✗ `hermes` command not found on PATH."This makes /update brittle in setups where Hermes is launched via a venv/module/launcher and the hermes executable is not on PATH for the gateway process.
Steps to Reproduce
- Run Hermes gateway from an environment where the app works normally but the
hermesCLI executable is not on PATH for that process. - Trigger the gateway
/updatecommand. - Observe the failure message.
Expected Behavior
/update should still work when Hermes is already running, or it should have a fallback resolution strategy (current Python executable/module invocation, configured install path, etc.) instead of assuming hermes is on PATH.
Actual Behavior
Gateway returns:
✗ `hermes` command not found on PATH.
Why this matters
This is confusing for users because Hermes is clearly running already. The command fails due to PATH resolution, not because Hermes is unavailable.
Suggested Fixes
- Fall back to
sys.executable -m hermes_cli.main(or equivalent module entrypoint) whenshutil.which("hermes")fails. - Alternatively persist the launch command / install path and reuse that for self-update.
- Improve the error message so it explains that the problem is update-command path resolution, not Hermes availability.
Environment
- Seen from Telegram gateway session
- Repo:
NousResearch/hermes-agent - Relevant file:
gateway/run.pyaround the/updatehandler
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels