Bug Description
openclaw gateway restart fails to restart the gateway on macOS. The service is stopped but never restarted.
Error Log
[tools] exec failed: Stopped LaunchAgent: gui/501/ai.openclaw.gateway
Gateway start failed: Error: launchctl kickstart failed:
Command exited with code 1
Root Cause
The restart logic uses an incorrect launchctl command sequence:
launchctl bootout (unload) — ✅ succeeds, service is stopped
launchctl kickstart — ❌ fails, service not found
After bootout/unload, the service is removed from launchd's registry. kickstart can only start services that are already registered in launchd, so it fails with "Could not find service".
Expected Fix
Replace kickstart with load/bootstrap after unloading:
# Current (broken)
launchctl bootout gui/501/ai.openclaw.gateway
launchctl kickstart gui/501/ai.openclaw.gateway # fails - service not registered
# Correct
launchctl unload ~/Library/LaunchAgents/ai.openclaw.gateway.plist
launchctl load ~/Library/LaunchAgents/ai.openclaw.gateway.plist # re-registers and starts
Steps to Reproduce
- Run
openclaw gateway restart on macOS
- Gateway stops but does not restart
launchctl list | grep openclaw shows no service
Environment
- macOS Darwin 24.6.0
- openclaw version: 2026.2.14
- LaunchAgent:
gui/501/ai.openclaw.gateway
Workaround
Manually restart with:
launchctl unload ~/Library/LaunchAgents/ai.openclaw.gateway.plist && launchctl load ~/Library/LaunchAgents/ai.openclaw.gateway.plist
Bug Description
openclaw gateway restartfails to restart the gateway on macOS. The service is stopped but never restarted.Error Log
Root Cause
The restart logic uses an incorrect
launchctlcommand sequence:launchctl bootout(unload) — ✅ succeeds, service is stoppedlaunchctl kickstart— ❌ fails, service not foundAfter
bootout/unload, the service is removed from launchd's registry.kickstartcan only start services that are already registered in launchd, so it fails with "Could not find service".Expected Fix
Replace
kickstartwithload/bootstrapafter unloading:Steps to Reproduce
openclaw gateway restarton macOSlaunchctl list | grep openclawshows no serviceEnvironment
gui/501/ai.openclaw.gatewayWorkaround
Manually restart with: