openclaw - 💡(How to fix) Fix macOS gateway PATH audit warns about nonexistent user-bin dirs and labels them 'required' [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#70228Fetched 2026-04-23 07:27:28
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

Error Message

  1. only warn for user bin dirs that exist on disk, or
  2. only warn for dirs explicitly configured from the environment, or

Root Cause

The compiled audit path check in:

  • /opt/homebrew/lib/node_modules/openclaw/dist/service-audit-CDyQV4HP.js

compares the LaunchAgent PATH against a Darwin superset produced by:

  • /opt/homebrew/lib/node_modules/openclaw/dist/runtime-paths-DB4SV642.js

That resolver appends common user bin directories whether they exist or are needed or not. The audit then warns if they are absent from the service PATH.

That means a machine with a deliberately minimal, working PATH still gets a warning because the audit compares against a generic preferred superset rather than a machine-specific required set.

Code Example

Gateway service PATH missing required dirs:
/Users/jamie/.npm-global/bin,
/Users/jamie/bin,
/Users/jamie/.volta/bin,
/Users/jamie/.asdf/shims,
/Users/jamie/Library/Application Support/fnm/aliases/default/bin,
/Users/jamie/.fnm/aliases/default/bin,
/Users/jamie/.local/share/pnpm

---

/opt/homebrew/opt/node/bin:/Users/jamie/.local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin
RAW_BUFFERClick to expand / collapse

openclaw gateway status on macOS reports a PATH warning even when the LaunchAgent is healthy and the warned directories do not exist.

Observed warning:

Gateway service PATH missing required dirs:
/Users/jamie/.npm-global/bin,
/Users/jamie/bin,
/Users/jamie/.volta/bin,
/Users/jamie/.asdf/shims,
/Users/jamie/Library/Application Support/fnm/aliases/default/bin,
/Users/jamie/.fnm/aliases/default/bin,
/Users/jamie/.local/share/pnpm

What is actually happening

The gateway is healthy.

On this machine:

  • openclaw gateway status reports the service loaded, runtime running, connectivity probe ok, and admin capable.
  • launchctl print gui/$(id -u)/ai.openclaw.gateway shows the job is running with an explicit, sufficient PATH:
/opt/homebrew/opt/node/bin:/Users/jamie/.local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin
  • Several warned directories do not exist at all:
    • ~/.npm-global/bin
    • ~/bin
    • ~/.volta/bin
    • ~/.asdf/shims
    • ~/Library/Application Support/fnm/aliases/default/bin
    • ~/.fnm/aliases/default/bin
    • ~/.local/share/pnpm

So this is a cosmetic audit mismatch, not a real service fault.

Root cause

The compiled audit path check in:

  • /opt/homebrew/lib/node_modules/openclaw/dist/service-audit-CDyQV4HP.js

compares the LaunchAgent PATH against a Darwin superset produced by:

  • /opt/homebrew/lib/node_modules/openclaw/dist/runtime-paths-DB4SV642.js

That resolver appends common user bin directories whether they exist or are needed or not. The audit then warns if they are absent from the service PATH.

That means a machine with a deliberately minimal, working PATH still gets a warning because the audit compares against a generic preferred superset rather than a machine-specific required set.

Why this is misleading

Right now the wording says "missing required dirs", but many of these dirs are:

  • nonexistent
  • unused
  • unnecessary for the running gateway

That makes the warning look like a service misconfiguration when it is really a heuristic preference mismatch.

Proposed fix

Tighten the audit for Darwin user-bin PATH checks so it only warns for entries that are actually meaningful, for example:

  1. only warn for user bin dirs that exist on disk, or
  2. only warn for dirs explicitly configured from the environment, or
  3. downgrade nonexistent entries to informational and keep warnings for existing-but-missing dirs only

Any of those would avoid false positives while preserving the signal for real PATH drift.

Nice-to-have wording fix

If the current behavior is kept, the message should not say required dirs. Something like recommended PATH entries or preferred user bin dirs would be more accurate.

Environment

  • openclaw 2026.4.20
  • macOS 15.7.6
  • LaunchAgent gateway runtime healthy

extent analysis

TL;DR

The openclaw gateway status warning on macOS can be mitigated by adjusting the audit logic to only warn for existing user bin directories or those explicitly configured from the environment.

Guidance

  • Review the audit logic in /opt/homebrew/lib/node_modules/openclaw/dist/service-audit-CDyQV4HP.js to understand how it compares the LaunchAgent PATH against the Darwin superset produced by /opt/homebrew/lib/node_modules/openclaw/dist/runtime-paths-DB4SV642.js.
  • Consider modifying the audit to only warn for user bin directories that exist on disk or are explicitly configured from the environment.
  • As a temporary workaround, users can ignore the warning if the gateway is healthy and the warned directories do not exist.
  • Verify the fix by running openclaw gateway status and checking that the warning is no longer displayed for nonexistent or unused directories.

Example

No code snippet is provided as the issue does not require a specific code change, but rather a modification to the audit logic.

Notes

The proposed fix requires changes to the openclaw package, specifically the audit logic. Users may need to wait for an updated version of openclaw or apply a custom fix.

Recommendation

Apply a workaround by modifying the audit logic to only warn for existing user bin directories or those explicitly configured from the environment, as this will avoid false positives while preserving the signal for real PATH drift.

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

openclaw - 💡(How to fix) Fix macOS gateway PATH audit warns about nonexistent user-bin dirs and labels them 'required' [1 participants]