Bug type
Crash (process/app exits or hangs)
Summary
On macOS, openclaw gateway restart can stop the running gateway but fail to re-register/restart the ai.openclaw.gateway LaunchAgent, leaving the gateway unloaded until a manual reinstall/bootstrap.
Steps to reproduce
- Install and run the gateway as a LaunchAgent on macOS.
- Confirm the gateway is healthy and loaded.
- Run
openclaw gateway restart.
- In the failing case, check
openclaw gateway status and the gateway logs.
Expected behavior
openclaw gateway restart should stop and then reliably restore the LaunchAgent to a loaded/running state.
Actual behavior
The gateway receives SIGTERM and shuts down, but the LaunchAgent may remain unloaded afterward.
Observed evidence:
- gateway log shows:
signal SIGTERM received
received SIGTERM; shutting down
- later
openclaw gateway status reported:
Could not find service "ai.openclaw.gateway" in domain for user gui: 501
Service not installed. Run: openclaw gateway install
OpenClaw version
2026.3.3
Operating system
macOS (user session / launchd; reproduced on a local machine)
Install method
npm global / LaunchAgent
Logs, screenshots, and evidence
2026-03-07T12:19:45.182-05:00 [gateway] signal SIGTERM received
2026-03-07T12:19:45.187-05:00 [gateway] received SIGTERM; shutting down
2026-03-07T12:19:45.273-05:00 [gmail-watcher] gmail watcher stopped
Runtime: unknown (Bad request.
Could not find service "ai.openclaw.gateway" in domain for user gui: 501)
Service not installed. Run: openclaw gateway install
Probable cause from code inspection:
installLaunchAgent() clears persisted disabled state with launchctl enable ... before bootstrap
restartLaunchAgent() and repairLaunchAgentBootstrap() did not do the same
- this can leave restart/recovery paths less robust than install
Impact and severity
Affected: macOS users running OpenClaw through LaunchAgent
Severity: Medium-High (breaks the local gateway until manual recovery)
Frequency: Intermittent, but workflow-breaking when triggered
Consequence: local dashboard / health checks / channel integrations go offline until openclaw gateway install or manual launchctl bootstrap
Additional information
A local fix was tested by adding launchctl enable gui/$UID/<label> before bootstrap in the restart and repair paths, aligning them with the existing install path. This restored normal behavior on the affected machine and passed targeted launchd tests.
Bug type
Crash (process/app exits or hangs)
Summary
On macOS,
openclaw gateway restartcan stop the running gateway but fail to re-register/restart theai.openclaw.gatewayLaunchAgent, leaving the gateway unloaded until a manual reinstall/bootstrap.Steps to reproduce
openclaw gateway restart.openclaw gateway statusand the gateway logs.Expected behavior
openclaw gateway restartshould stop and then reliably restore the LaunchAgent to a loaded/running state.Actual behavior
The gateway receives
SIGTERMand shuts down, but the LaunchAgent may remain unloaded afterward.Observed evidence:
signal SIGTERM receivedreceived SIGTERM; shutting downopenclaw gateway statusreported:Could not find service "ai.openclaw.gateway" in domain for user gui: 501Service not installed. Run: openclaw gateway installOpenClaw version
2026.3.3
Operating system
macOS (user session / launchd; reproduced on a local machine)
Install method
npm global / LaunchAgent
Logs, screenshots, and evidence
2026-03-07T12:19:45.182-05:00 [gateway] signal SIGTERM received 2026-03-07T12:19:45.187-05:00 [gateway] received SIGTERM; shutting down 2026-03-07T12:19:45.273-05:00 [gmail-watcher] gmail watcher stoppedProbable cause from code inspection:
installLaunchAgent()clears persisted disabled state withlaunchctl enable ...beforebootstraprestartLaunchAgent()andrepairLaunchAgentBootstrap()did not do the sameImpact and severity
Affected: macOS users running OpenClaw through LaunchAgent
Severity: Medium-High (breaks the local gateway until manual recovery)
Frequency: Intermittent, but workflow-breaking when triggered
Consequence: local dashboard / health checks / channel integrations go offline until
openclaw gateway installor manuallaunchctl bootstrapAdditional information
A local fix was tested by adding
launchctl enable gui/$UID/<label>beforebootstrapin the restart and repair paths, aligning them with the existing install path. This restored normal behavior on the affected machine and passed targeted launchd tests.