hermes - 💡(How to fix) Fix [Bug]: External LaunchAgents on port 9120/9119 cause Hermes Desktop backend SIGTERM loop

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…

Hermes Desktop boot succeeds (Hermes backend is ready) then immediately loses its embedded dashboard child (Hermes backend exited (SIGTERM)), repeating in a loop. Gateway may still run via ai.hermes.gateway, but the Desktop UI shows gateway offline / fails WS connect.

Root Cause

Root cause (this machine)

Legacy LaunchAgents under ~/Library/LaunchAgents/ conflict with Desktop's port policy:

Fix Action

Workaround

launchctl bootout gui/$UID ~/Library/LaunchAgents/ai.hermes.mobile-proxy.plist
launchctl bootout gui/$UID ~/Library/LaunchAgents/ai.hermes.mobile-dashboard.plist
launchctl bootout gui/$UID ~/Library/LaunchAgents/ai.hermes.mobile-tunnel.plist
open -a /Applications/Hermes.app

Code Example

launchctl bootout gui/$UID ~/Library/LaunchAgents/ai.hermes.mobile-proxy.plist
launchctl bootout gui/$UID ~/Library/LaunchAgents/ai.hermes.mobile-dashboard.plist
launchctl bootout gui/$UID ~/Library/LaunchAgents/ai.hermes.mobile-tunnel.plist
open -a /Applications/Hermes.app
RAW_BUFFERClick to expand / collapse

Summary

Hermes Desktop boot succeeds (Hermes backend is ready) then immediately loses its embedded dashboard child (Hermes backend exited (SIGTERM)), repeating in a loop. Gateway may still run via ai.hermes.gateway, but the Desktop UI shows gateway offline / fails WS connect.

Environment

  • macOS 15.x, Hermes.app v0.15.1
  • Managed install: ~/.hermes/hermes-agent @ 1a3e60852
  • Also running iPhone/mobile-remote stack (9119 + 9200)

Root cause (this machine)

Legacy LaunchAgents under ~/Library/LaunchAgents/ conflict with Desktop's port policy:

AgentScriptProblem
ai.hermes.mobile-proxyrun_proxy.shBinds 9120 (Hermes.app embedded range)
ai.hermes.mobile-dashboardrun_dashboard.shRuns hermes dashboard --stop then dashboard on 9119 with KeepAlive
ai.hermes.mobile-tunnelrun_tunnel.shTunnels to stale proxy on 9120

hermes dashboard --stop terminates all dashboard processes, including the one Electron just spawned.

Repro

  1. Load the legacy agents above (or any script that periodically runs hermes dashboard --stop)
  2. Launch Hermes.app
  3. Watch ~/.hermes/logs/desktop.log for ready → SIGTERM → resolve loop

Workaround

launchctl bootout gui/$UID ~/Library/LaunchAgents/ai.hermes.mobile-proxy.plist
launchctl bootout gui/$UID ~/Library/LaunchAgents/ai.hermes.mobile-dashboard.plist
launchctl bootout gui/$UID ~/Library/LaunchAgents/ai.hermes.mobile-tunnel.plist
open -a /Applications/Hermes.app

Suggested fix

  • Document port ownership: Desktop 9120–9199, phone remote 9119, proxy 9200
  • hermes dashboard --stop should optionally scope to CLI-managed dashboards only (not Desktop-spawned children), or Desktop should use a distinct marker/PID file
  • Deprecate/remove old ai.hermes.mobile-* agents when com.hermes.mobile-remote.* is installed

Related: #39188, #39349

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