Skip to content

fix(daemon): enable launchd service before bootstrap - #849

Merged
steipete merged 2 commits into
openclaw:mainfrom
ndraiman:fix/cli-launchd-enable-before-bootstrap
Jan 15, 2026
Merged

steipete merged 2 commits into
openclaw:mainfrom
ndraiman:fix/cli-launchd-enable-before-bootstrap

Conversation

@ndraiman

Copy link
Copy Markdown
Contributor

Summary

Fixes clawdbot daemon install failing with Bootstrap failed: 5: Input/output error after a previous uninstall.

Root Cause

When a launchd service is uninstalled via bootout, macOS marks it as disabled in:

/var/db/com.apple.xpc.launchd/disabled.*.plist

This disabled state persists across:

  • Plist deletions/recreations
  • System reboots
  • Process kills

Once disabled, launchctl bootstrap refuses to load the service and returns error 5 (I/O error).

Fix

Call launchctl enable before launchctl bootstrap to clear the disabled state. This matches the fix already applied to the macOS Swift app in GatewayLaunchAgentManager.swift.

Related

Workaround (before this fix)

launchctl enable gui/$UID/com.clawdbot.gateway
clawdbot daemon install

@steipete steipete self-assigned this Jan 15, 2026
@steipete

Copy link
Copy Markdown
Contributor

TIL! Thanks Netanel!

ndraiman and others added 2 commits January 15, 2026 03:31
When a launchd service is uninstalled via bootout, macOS marks it as
disabled in /var/db/com.apple.xpc.launchd/disabled.*.plist. This persists
across reboots and plist recreation. Future bootstrap calls fail with
error 5 (I/O error) because the service is still marked disabled.

Fix: Call 'launchctl enable' before 'launchctl bootstrap' to clear the
disabled state, matching the fix already applied to the macOS Swift app
in GatewayLaunchAgentManager.swift.

Related: #306
@steipete
steipete merged commit 4ce495c into openclaw:main Jan 15, 2026
@steipete

Copy link
Copy Markdown
Contributor

Landed via temp rebase onto main.\n\n- Gate: pnpm lint && pnpm build && pnpm test\n- Land commit: dfea299\n- Merge commit: 4ce495c\n\nThanks @ndraiman!

heatherstew44-maker pushed a commit to heatherstew44-maker/openclaw that referenced this pull request Mar 8, 2026
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
…before-bootstrap

fix(daemon): enable launchd service before bootstrap
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
…before-bootstrap

fix(daemon): enable launchd service before bootstrap
zeekay pushed a commit to Dream-AI-4444/bot that referenced this pull request Sep 11, 2026
zeekay pushed a commit to Dream-AI-4444/clawdbot that referenced this pull request Sep 11, 2026
…before-bootstrap

fix(daemon): enable launchd service before bootstrap
lhfer pushed a commit to lhfer/openclaw that referenced this pull request Oct 11, 2026
lhfer pushed a commit to lhfer/openclaw that referenced this pull request Oct 11, 2026
…before-bootstrap

fix(daemon): enable launchd service before bootstrap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants