Skip to content

fix(self-host): keep Hermes webui alive after setup-agent exits - #43

Merged
venkateshsakamuri-lab merged 1 commit into
mainfrom
cursor/setup-agent-launchd-keepalive
Aug 11, 2026
Merged

fix(self-host): keep Hermes webui alive after setup-agent exits#43
venkateshsakamuri-lab merged 1 commit into
mainfrom
cursor/setup-agent-launchd-keepalive

Conversation

@venkateshsakamuri-lab

Copy link
Copy Markdown
Contributor

Summary

  • On macOS, start Hermes via LaunchAgent (com.deepsql.hermes-webui) so IDE/shell process-group teardown cannot SIGKILL the webui right after setup-agent.sh reports ready.
  • On Linux, detach with setsid/disown instead of a bare nohup child of the setup script.
  • Export HERMES_WEBUI_ALLOWED_ORIGINS from the frontend port (supports non-default ports like :3003).

Test plan

  • On macOS: run ./scripts/self-host/setup-agent.sh, confirm curl http://127.0.0.1:8787/api/mcp/servers stays 200 after the script exits
  • launchctl print gui/$(id -u)/com.deepsql.hermes-webui shows state = running
  • Agent tab on the frontend (including non-3000 ports) boots and can call DeepSQL MCP
  • Re-running setup-agent.sh reloads the LaunchAgent cleanly

On macOS/IDE terminals, shell-spawned nohup children get SIGKILL'd when
the process group tears down, so Agent tab dies right after setup reports
ready. Prefer a LaunchAgent on Darwin, detach with setsid/disown elsewhere,
and export HERMES_WEBUI_ALLOWED_ORIGINS for non-default frontend ports.
@cursor

cursor Bot commented Aug 11, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@venkateshsakamuri-lab
venkateshsakamuri-lab merged commit 3ed7d82 into main Aug 11, 2026
7 checks passed
@venkateshsakamuri-lab
venkateshsakamuri-lab deleted the cursor/setup-agent-launchd-keepalive branch August 11, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant