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
hermes CLI executable is not on PATH for that process.
- Trigger the gateway
/update command.
- 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) when shutil.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.py around the /update handler
Bug Description
The gateway
/updateflow currently hard-fails ifshutil.which("hermes")returns nothing, even though Hermes is already running.In
gateway/run.py:This makes
/updatebrittle in setups where Hermes is launched via a venv/module/launcher and thehermesexecutable is not on PATH for the gateway process.Steps to Reproduce
hermesCLI executable is not on PATH for that process./updatecommand.Expected Behavior
/updateshould 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 assuminghermesis on PATH.Actual Behavior
Gateway returns:
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
sys.executable -m hermes_cli.main(or equivalent module entrypoint) whenshutil.which("hermes")fails.Environment
NousResearch/hermes-agentgateway/run.pyaround the/updatehandler