Bug Description
hermes gateway start, hermes gateway restart, and hermes gateway stop fail silently on modern macOS because hermes_cli/gateway.py uses deprecated launchctl subcommands.
Symptoms
hermes gateway start prints "✓ Service started" but the gateway does not start
hermes gateway restart leaves the gateway down after an update
- Running the commands manually produces:
Not privileged to start service
Root Cause
launchctl start <label> and launchctl stop <label> are deprecated on macOS. When a service is already registered in the launchd bootstrap domain (i.e., the plist has been loaded before), launchctl start returns a non-zero exit code with the error Not privileged to start service.
Affected code in hermes_cli/gateway.py:
launchd_start() — uses launchctl load + launchctl start
launchd_stop() — uses launchctl stop
Fix
Replace with the modern equivalents:
launchctl bootstrap gui/<uid> <plist> instead of launchctl load
launchctl kickstart gui/<uid>/<label> instead of launchctl start
launchctl kill SIGTERM gui/<uid>/<label> instead of launchctl stop
These are the commands recommended by Apple since macOS 10.11 and work correctly whether or not the service is already registered in the bootstrap domain.
Workaround
Until fixed, start the gateway manually:
launchctl kickstart gui/$(id -u)/ai.hermes.gateway
Environment
- macOS (Apple Silicon)
- Hermes v0.7.0 (2026.4.3)
- Service managed as a LaunchAgent under
~/Library/LaunchAgents/ai.hermes.gateway.plist
Bug Description
hermes gateway start,hermes gateway restart, andhermes gateway stopfail silently on modern macOS becausehermes_cli/gateway.pyuses deprecatedlaunchctlsubcommands.Symptoms
hermes gateway startprints "✓ Service started" but the gateway does not starthermes gateway restartleaves the gateway down after an updateNot privileged to start serviceRoot Cause
launchctl start <label>andlaunchctl stop <label>are deprecated on macOS. When a service is already registered in the launchd bootstrap domain (i.e., the plist has been loaded before),launchctl startreturns a non-zero exit code with the errorNot privileged to start service.Affected code in
hermes_cli/gateway.py:launchd_start()— useslaunchctl load+launchctl startlaunchd_stop()— useslaunchctl stopFix
Replace with the modern equivalents:
launchctl bootstrap gui/<uid> <plist>instead oflaunchctl loadlaunchctl kickstart gui/<uid>/<label>instead oflaunchctl startlaunchctl kill SIGTERM gui/<uid>/<label>instead oflaunchctl stopThese are the commands recommended by Apple since macOS 10.11 and work correctly whether or not the service is already registered in the bootstrap domain.
Workaround
Until fixed, start the gateway manually:
launchctl kickstart gui/$(id -u)/ai.hermes.gatewayEnvironment
~/Library/LaunchAgents/ai.hermes.gateway.plist