Skip to content

fix: keep macOS gateway launch agent alive after clean exit - #14001

Closed
TechwithAlf128 wants to merge 1 commit into
NousResearch:mainfrom
TechwithAlf128:fix/launchd-keepalive-api-server
Closed

fix: keep macOS gateway launch agent alive after clean exit#14001
TechwithAlf128 wants to merge 1 commit into
NousResearch:mainfrom
TechwithAlf128:fix/launchd-keepalive-api-server

Conversation

@TechwithAlf128

Copy link
Copy Markdown

Summary

  • change the generated macOS launchd plist to use KeepAlive=true
  • keep the gateway/API server running after clean exits so Open WebUI does not lose the Hermes model backend on port 8642
  • update the launchd stop-path comment to match the new behavior

Problem

On macOS, the generated launch agent used KeepAlive = { SuccessfulExit = false; }. If the Hermes gateway exited cleanly, launchd would not restart it. That left the API server on 127.0.0.1:8642 down, which caused browser frontends like Open WebUI to show no available model / "model not selected" until the user manually restarted the gateway.

Verification

  • regenerated the launchd plist locally and confirmed it now contains KeepAlive => true
  • verified launchd reports the job with keepalive enabled
  • verified the Hermes API server remains available on port 8642 and /v1/models returns hermes-agent

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused macOS gateway fix. This is an automated hermes-sweeper review; current main already provides the requested behavior.

  • hermes_cli/gateway.py:3962-3963 generates unconditional <key>KeepAlive</key><true/>.
  • tests/hermes_cli/test_gateway_service.py:3552-3571 verifies clean exits restart and rejects the prior SuccessfulExit dict form.
  • The equivalent implementation landed in c9b62061d43feb61a3a69caec99148623d988a5e (fix(cli): launchd KeepAlive unconditional restart (#37388)) and shipped in v2026.6.5.

Closing as implemented on main.

@teknium1 teknium1 closed this Jul 12, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jul 12, 2026
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 P2 Medium — degraded but workaround exists sweeper:implemented-on-main Sweeper: behavior already present on current main type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants