Skip to content

feat(gateway): restart manual profile gateways after update - #17982

Closed
quocanh261997 wants to merge 1 commit into
NousResearch:mainfrom
quocanh261997:feat/gateway-all-profile-restart
Closed

feat(gateway): restart manual profile gateways after update#17982
quocanh261997 wants to merge 1 commit into
NousResearch:mainfrom
quocanh261997:feat/gateway-all-profile-restart

Conversation

@quocanh261997

Copy link
Copy Markdown
Contributor

What

  • Map running manual gateway processes back to Hermes profiles via each profile's gateway.pid file.
  • During hermes update, relaunch profile-mapped manual gateways after terminating the old process.
  • Keep the existing manual restart warning for gateway PIDs that cannot be mapped to a profile.
  • Update the updating guide to describe service-managed and profile-mapped manual gateway restart behavior.

Why

hermes update already restarts service-managed gateways through systemd or launchd, including profile units. Manual profile gateways were only stopped, leaving users to run hermes -p <profile> gateway run or a profile wrapper restart by hand. This made multi-profile updates cumbersome and easy to leave half-refreshed.

How to test

scripts/run_tests.sh tests/hermes_cli/test_update_gateway_restart.py

Result: 42 passed.

Platforms tested

  • macOS local test environment

Cross-platform impact

This touches process management. The change keeps the existing systemd and launchd service paths intact, and only adds a relaunch path for manual gateway processes that can be mapped through profile PID files. Unmapped manual processes keep the existing manual restart guidance.

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery comp/cli CLI entry point, hermes_cli/, setup wizard labels Apr 30, 2026
@quocanh261997
quocanh261997 marked this pull request as ready for review April 30, 2026 14:50
@teknium1

teknium1 commented May 1, 2026

Copy link
Copy Markdown
Contributor

Merged via PR #18178 — your commit was cherry-picked onto current main with your authorship preserved in git log. We also added a small follow-up on top routing the manual profile restart through the graceful SIGUSR1 drain path (same one systemd/launchd services use) so in-flight agent runs drain instead of being SIGTERM'd. Thanks for the contribution!

#18178

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants