Skip to content

gateway install fails with error 5 when home directory is on external APFS volume #60398

Description

@SandeepSAulakh

Environment

  • macOS 15 (Darwin 25.4.0), Apple Silicon
  • OpenClaw 2026.4.2 (d74a122)
  • Home directory on external APFS volume (/Volumes/MainDataDrive)

Problem

openclaw gateway install always fails with:

Bootstrap failed: 5: Input/output error

macOS launchd cannot bootstrap LaunchAgent plists from non-boot APFS volumes, even with disk ownership enabled via diskutil enableOwnership.

The plist itself is valid (plutil -lint passes), the service is enabled in launchctl print-disabled, and all referenced paths exist. The issue is purely that launchd refuses to bootstrap from an external volume.

Steps to reproduce

  1. Set macOS user home directory to an external APFS volume (e.g. /Volumes/<externalDrive>/Users/username)
  2. Run openclaw gateway install
  3. Observe: Bootstrap failed: 5: Input/output error

Workaround

Manually copy the plist to the boot volume and bootstrap from there:

cp ~/Library/LaunchAgents/ai.openclaw.gateway.plist /Users/$USER/Library/LaunchAgents/
launchctl bootstrap gui/$(id -u) /Users/$USER/Library/LaunchAgents/ai.openclaw.gateway.plist

Suggested fix

When the resolved ~/Library/LaunchAgents path is not on the boot volume, write the plist to /Users/<username>/Library/LaunchAgents/ on the boot volume instead. The boot volume root can be detected via diskutil info / or by checking stat -f "%Sd" / vs stat -f "%Sd" ~/.

Note: openclaw gateway install --force makes the situation worse — it unloads the working service and then fails to re-bootstrap from the external volume.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions