openclaw - 💡(How to fix) Fix Enhancement: openclaw doctor --fix should detect broken launchd plist path after npm upgrade [1 comments, 1 participants]

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…
GitHub stats
openclaw/openclaw#59812Fetched 2026-04-08 02:40:15
View on GitHub
Comments
1
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
closed ×1commented ×1locked ×1

openclaw doctor --fix does not detect when the launchd gateway plist is pointing to a stale/incorrect OpenClaw installation path. After upgrading via npm install -g, the gateway silently crashes but doctor does not flag the misconfiguration.

Root Cause

This is a silent, confusing failure mode. The gateway appears loaded (launchd state: active) but immediately crashes, and nothing in the normal openclaw status / openclaw gateway status output tells the user why or how to fix it. Users are likely to spend significant time debugging this after any cross-package-manager upgrade.

Code Example

⚠️  LaunchAgent path mismatch
    Plist points to: /opt/homebrew/lib/node_modules/openclaw/dist/index.js
    Current binary:  /Users/roger/.npm-global/lib/node_modules/openclaw/openclaw.mjs
    Run: openclaw gateway install --fix  (or openclaw doctor --fix) to update the service
RAW_BUFFERClick to expand / collapse

Summary

openclaw doctor --fix does not detect when the launchd gateway plist is pointing to a stale/incorrect OpenClaw installation path. After upgrading via npm install -g, the gateway silently crashes but doctor does not flag the misconfiguration.

Related

Companion to #59810 — root cause is the same broken plist path after npm upgrade.

Current Behaviour

After upgrading OpenClaw via npm (changing the installation path from e.g. Homebrew to npm-global), the launchd plist contains a stale path. Running openclaw doctor or openclaw doctor --fix does not detect or report this mismatch.

Meanwhile, openclaw gateway status does partially detect the issue (reports Runtime: stopped) but does not explain why or offer a fix.

Expected Behaviour

openclaw doctor (or openclaw gateway status) should:

  1. Read the installed launchd plist ProgramArguments
  2. Compare the path against the currently-running openclaw binary location
  3. If they differ, report a warning such as:
⚠️  LaunchAgent path mismatch
    Plist points to: /opt/homebrew/lib/node_modules/openclaw/dist/index.js
    Current binary:  /Users/roger/.npm-global/lib/node_modules/openclaw/openclaw.mjs
    Run: openclaw gateway install --fix  (or openclaw doctor --fix) to update the service
  1. With --fix, automatically rewrite the plist and reload the service

Why This Matters

This is a silent, confusing failure mode. The gateway appears loaded (launchd state: active) but immediately crashes, and nothing in the normal openclaw status / openclaw gateway status output tells the user why or how to fix it. Users are likely to spend significant time debugging this after any cross-package-manager upgrade.

extent analysis

TL;DR

Run openclaw gateway install --fix to update the launchd plist with the correct OpenClaw installation path after upgrading via npm.

Guidance

  • Verify the launchd plist ProgramArguments path matches the currently-running openclaw binary location.
  • Compare the paths using openclaw gateway status and check for any reported errors or warnings.
  • If a mismatch is found, run openclaw gateway install --fix to update the plist and reload the service.
  • Use openclaw doctor --fix to detect and fix any misconfigurations, although it may not currently detect the stale plist path issue.

Example

No code snippet is provided as it is not clearly supported by the issue.

Notes

The current implementation of openclaw doctor does not detect the stale plist path issue, and openclaw gateway status only partially detects the problem. The provided workaround may not be a permanent fix and may need to be reapplied after future upgrades.

Recommendation

Apply the workaround by running openclaw gateway install --fix after upgrading OpenClaw via npm, as this will update the launchd plist with the correct installation path and reload the service.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING