Summary
When a config change requires a gateway restart (e.g., adding plugins like lobster or llm-task), the gateway sends itself SIGTERM to trigger a launchd respawn. However, launchd loses the service unit registration and the gateway stays down.
Steps to reproduce
- Gateway running via launchd (
ai.openclaw.gateway, KeepAlive: true)
- Have other OpenClaw-related LaunchAgents registered (e.g.,
com.openclaw.browsers, com.openclaw.dashboard)
- Make a config change that requires restart (e.g., add plugin entries for
lobster and llm-task)
- Gateway detects change, defers restart until operations complete, then receives SIGTERM
- Gateway shuts down cleanly
- launchd does NOT respawn it
Observed behavior
After SIGTERM shutdown, running openclaw gateway status shows:
RPC probe: failed
Service unit not found.
Service not installed. Run: openclaw gateway install
Other gateway-like services detected (best effort):
- com.openclaw.browsers
- com.openclaw.dashboard
Manual openclaw gateway install is required to recover.
Expected behavior
launchd should respawn the gateway automatically after SIGTERM (plist has KeepAlive: true).
Log timeline (from today, Mar 11 2026)
11:14:58 [reload] config change detected (plugins.entries.lobster, plugins.entries.llm-task)
11:14:58 [reload] config change requires gateway restart — deferring until operations complete
11:15:04 [gateway] signal SIGTERM received; shutting down
11:22:13 RPC probe: failed / Service unit not found / Other gateway-like services detected
11:23:45 [gateway] listening on ws://127.0.0.1:18789 (after manual openclaw gateway install)
Environment
- macOS 26.3.1 (arm64, Mac mini)
- OpenClaw 3.8
- Node v25.4.0
- LaunchAgent:
ai.openclaw.gateway with KeepAlive: true, ThrottleInterval: 1
Workaround
Created a watchdog LaunchAgent that checks every 30s and runs openclaw gateway install --force if gateway is down.
Notes
This is a recurring issue — same thing happened on Mar 9 and Mar 10 during openclaw gateway restart calls. The com.openclaw.browsers and com.openclaw.dashboard LaunchAgents seem to confuse the gateway's startup checks ("other gateway-like services detected"), which may prevent launchd's respawn from succeeding.
Summary
When a config change requires a gateway restart (e.g., adding plugins like
lobsterorllm-task), the gateway sends itselfSIGTERMto trigger a launchd respawn. However, launchd loses the service unit registration and the gateway stays down.Steps to reproduce
ai.openclaw.gateway,KeepAlive: true)com.openclaw.browsers,com.openclaw.dashboard)lobsterandllm-task)Observed behavior
After SIGTERM shutdown, running
openclaw gateway statusshows:Manual
openclaw gateway installis required to recover.Expected behavior
launchd should respawn the gateway automatically after SIGTERM (plist has
KeepAlive: true).Log timeline (from today, Mar 11 2026)
Environment
ai.openclaw.gatewaywithKeepAlive: true,ThrottleInterval: 1Workaround
Created a watchdog LaunchAgent that checks every 30s and runs
openclaw gateway install --forceif gateway is down.Notes
This is a recurring issue — same thing happened on Mar 9 and Mar 10 during
openclaw gateway restartcalls. Thecom.openclaw.browsersandcom.openclaw.dashboardLaunchAgents seem to confuse the gateway's startup checks ("other gateway-like services detected"), which may prevent launchd's respawn from succeeding.