Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ndraiman
Copy link
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

@ndraiman ndraiman force-pushed the fix/cli-launchd-enable-before-bootstrap branch from 0626321 to 8468986 Compare January 13, 2026 13:44
@steipete steipete self-assigned this Jan 15, 2026
@steipete
Copy link
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: openclaw#306
@steipete steipete force-pushed the fix/cli-launchd-enable-before-bootstrap branch from 8468986 to dfea299 Compare January 15, 2026 03:36
@steipete steipete merged commit 4ce495c into openclaw:main Jan 15, 2026
38 of 42 checks passed
@steipete
Copy link
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!

steipete added a commit to mneves75/clawdbot that referenced this pull request Jan 15, 2026
cpojer pushed a commit to cpojer/clawdbot that referenced this pull request Jan 16, 2026
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