openclaw - 💡(How to fix) Fix [Bug]: Gateway restart can fail during concurrent launchd bootstrap even when service starts [1 pull requests]

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…

On macOS, openclaw gateway restart can report a launchctl bootstrap failure when another OpenClaw process concurrently bootstraps the same LaunchAgent; unified logs show the service spawned successfully.

Error Message

The CLI reports Gateway restart failed: launchctl bootstrap failed: Bootstrap failed: 5: Input/output error, while the unified log shows one bootstrap succeeded, a competing bootstrap failed with 37: Operation already in progress, and launchd spawned ai.openclaw.gateway successfully.

Root Cause

On macOS, openclaw gateway restart can report a launchctl bootstrap failure when another OpenClaw process concurrently bootstraps the same LaunchAgent; unified logs show the service spawned successfully.

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

On macOS, openclaw gateway restart can report a launchctl bootstrap failure when another OpenClaw process concurrently bootstraps the same LaunchAgent; unified logs show the service spawned successfully.

Steps to reproduce

  1. On macOS with the OpenClaw Gateway LaunchAgent installed, trigger a Gateway restart while the OpenClaw app/helper is also starting or repairing ai.openclaw.gateway.
  2. Observe the CLI restart result.
  3. Check macOS unified logs for overlapping bootstrap activity on gui/501/ai.openclaw.gateway.

Expected behavior

openclaw gateway restart treats this race as success when launchctl print gui/<uid>/ai.openclaw.gateway shows the LaunchAgent is loaded or running after the concurrent bootstrap.

Actual behavior

The CLI reports Gateway restart failed: launchctl bootstrap failed: Bootstrap failed: 5: Input/output error, while the unified log shows one bootstrap succeeded, a competing bootstrap failed with 37: Operation already in progress, and launchd spawned ai.openclaw.gateway successfully.

OpenClaw version

NOT_ENOUGH_INFO

Operating system

macOS

Install method

npm global / mac app helper

Model

claude-cli/claude-sonnet-4-6

Provider / routing chain

OpenClaw Gateway LaunchAgent on macOS launchd

Additional provider/model setup details

LaunchAgent label: ai.openclaw.gateway Observed service target: gui/501/ai.openclaw.gateway Gateway port: 18789 Observed around 2026-05-21 06:31 local time.

Logs, screenshots, and evidence

Impact and severity

Impact: restart is reported as failed even though the service recovers, which makes Gateway health triage misleading and can trigger unnecessary retry/restart handling. Frequency: observed during concurrent CLI and app/helper restart activity.

Additional information

Mac unified log evidence showed one launchctl bootstrap succeeded, a second overlapping bootstrap failed with Operation already in progress, then launchd spawned the Gateway process successfully. This looks like a restart race, not a Gateway process crash.

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…

FAQ

Expected behavior

openclaw gateway restart treats this race as success when launchctl print gui/<uid>/ai.openclaw.gateway shows the LaunchAgent is loaded or running after the concurrent bootstrap.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: Gateway restart can fail during concurrent launchd bootstrap even when service starts [1 pull requests]