hermes - 💡(How to fix) Fix setup_*.sh scripts hang at `hermes gateway restart` on multi-gateway-LA hosts [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

scripts/setup_open_webui.sh (and likely sibling setup_*.sh scripts) call hermes gateway restart >/dev/null 2>&1 || true near the end. On a host with multiple active per-profile ai.hermes.gateway-* LaunchAgents, this call hangs indefinitely (observed: 22 minutes before manual SIGKILL). The || true does not help because the subprocess never returns.

Root Cause

scripts/setup_open_webui.sh (and likely sibling setup_*.sh scripts) call hermes gateway restart >/dev/null 2>&1 || true near the end. On a host with multiple active per-profile ai.hermes.gateway-* LaunchAgents, this call hangs indefinitely (observed: 22 minutes before manual SIGKILL). The || true does not help because the subprocess never returns.

Fix Action

Fixed

Code Example

bash ~/.hermes/hermes-agent/scripts/setup_open_webui.sh

---

hermes gateway restart >/dev/null 2>&1 || true

---

timeout 60 hermes gateway restart >/dev/null 2>&1 || true
RAW_BUFFERClick to expand / collapse

Summary

scripts/setup_open_webui.sh (and likely sibling setup_*.sh scripts) call hermes gateway restart >/dev/null 2>&1 || true near the end. On a host with multiple active per-profile ai.hermes.gateway-* LaunchAgents, this call hangs indefinitely (observed: 22 minutes before manual SIGKILL). The || true does not help because the subprocess never returns.

Reproduction

  • Host: Mac Studio (M3 Ultra), macOS 15.4
  • 7 active ai.hermes.gateway-* LaunchAgents (one per profile)
  • Hermes Agent v0.15.2 (2026.5.29.2)
bash ~/.hermes/hermes-agent/scripts/setup_open_webui.sh

Hangs at setup_open_webui.sh line ~311:

hermes gateway restart >/dev/null 2>&1 || true

After 22 minutes with no progress, operator SIGKILL'd. The OpenWebUI install otherwise succeeded; only the post-install gateway restart hung.

Root cause hypothesis

When hermes gateway restart is invoked without --profile, it tries to restart the "active" gateway, but with N profile-scoped LAs registered, it appears to enter a wait loop that never completes (whether on PID resolution, drain wait, or one of the per-profile siblings is unclear from the user side).

Suggested fix (any of)

  1. Wrap the restart call with timeout 60 in the setup script:
    timeout 60 hermes gateway restart >/dev/null 2>&1 || true
  2. Iterate over registered ai.hermes.gateway-* LAs and restart each individually with a bounded per-LA wait.
  3. Offer a --skip-restart flag on the setup script and print: "Configuration changes made. Run `launchctl kickstart -k gui/$UID/ai.hermes.gateway-<profile>` manually to pick them up."

Affected file

scripts/setup_open_webui.sh:310-311 (per live grep on v0.15.2)

Environment

  • Hermes Agent: v0.15.2 (2026.5.29.2)
  • OS: macOS 15.4
  • Hardware: Apple M3 Ultra
  • Gateway management: launchd (LaunchAgents)
  • Active gateway count: 7

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix setup_*.sh scripts hang at `hermes gateway restart` on multi-gateway-LA hosts [1 pull requests]