openclaw - ✅(Solved) Fix [Bug] Stale ACPX custom-path override bypasses bundled runtime-deps staging and breaks `openclaw agent` in 2026.4.24 [1 pull requests, 1 comments, 2 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#71906Fetched 2026-04-27 05:37:39
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
closed ×1commented ×1cross-referenced ×1mentioned ×1

After updating to OpenClaw 2026.4.24, openclaw agent failed during CLI bootstrap with:

[plugins] acpx failed to load from /opt/homebrew/lib/node_modules/openclaw/dist/extensions/acpx/index.js: Error: Cannot find module 'acpx/runtime'
Require stack:
- /opt/homebrew/lib/node_modules/openclaw/dist/extensions/acpx/register.runtime-b8kSOZpz.js

This turned out not to be a missing acpx package in the staged runtime-deps root. The actual trigger was a stale local ACPX custom-path override in ~/.openclaw/openclaw.json that forced ACPX to load as origin: config instead of origin: bundled, which bypassed the bundled runtime-deps staging / mirror flow.

Error Message

[plugins] acpx failed to load from /opt/homebrew/lib/node_modules/openclaw/dist/extensions/acpx/index.js: Error: Cannot find module 'acpx/runtime' Require stack:

  • /opt/homebrew/lib/node_modules/openclaw/dist/extensions/acpx/register.runtime-b8kSOZpz.js

Root Cause

acpx was not on the global shell PATH on this machine, but that was not the root cause here. The failure reproduced even though the staged ACPX package existed and the actual fix was to remove the stale ACPX config override so OpenClaw would use the bundled runtime path again.

Fix Action

Fix / Workaround

4. Minimal workaround

PR fix notes

PR #71914: fix(plugins): remove bundled load path aliases

Description (problem / solution / changelog)

Summary

  • Fixes #71906 by teaching doctor repair to remove custom plugins.load.paths entries that alias bundled plugin roots, including the packaged dist/extensions/<id> path.
  • Updates the existing bundled plugin load-path repair tests to cover removal of current packaged bundled paths, legacy bundled aliases, and dist-runtime aliases.
  • Adds the user-facing changelog fix entry.

Root Cause

Stale custom plugin load paths that pointed back at bundled plugin directories were still treated as explicit config-origin plugins. For ACPX, that bypassed the bundled runtime-deps staging flow, so acpx/runtime could be missing even though the staged bundled dependency was available.

Why This Fix Is Safe

The repair only targets paths that resolve to OpenClaw's own bundled plugin roots or their known legacy bundled aliases. Removing those redundant custom paths lets normal bundled discovery own the plugin again, preserving explicit third-party or unrelated custom plugin paths. Test helper defaults remain aligned with production defaults: this change does not alter runtime defaults, only doctor repair output.

Security And Runtime Controls

Security and runtime controls are unchanged. Plugin trust policy, bundled plugin enablement, runtime-deps installation, and module loading remain enforced by the existing loader and doctor paths; this does not rely on prompt text or advisory-only behavior.

Tests Run

  • pnpm test src/commands/doctor/shared/bundled-plugin-load-paths.test.ts
  • pnpm test src/commands/doctor/shared/bundled-plugin-load-paths.test.ts src/plugins/loader.test.ts -- -t "bundled plugin load path repair|loads bundled runtime deps from an external stage dir"
  • pnpm check:changed

Made with Cursor

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/commands/doctor/shared/bundled-plugin-load-paths.test.ts (modified, +21/-8)
  • src/commands/doctor/shared/bundled-plugin-load-paths.ts (modified, +16/-10)

Code Example

[plugins] acpx failed to load from /opt/homebrew/lib/node_modules/openclaw/dist/extensions/acpx/index.js: Error: Cannot find module 'acpx/runtime'
Require stack:
- /opt/homebrew/lib/node_modules/openclaw/dist/extensions/acpx/register.runtime-b8kSOZpz.js

---

[plugins] acpx failed to load from /opt/homebrew/lib/node_modules/openclaw/dist/extensions/acpx/index.js: Error: Cannot find module 'acpx/runtime'
Require stack:
- /opt/homebrew/lib/node_modules/openclaw/dist/extensions/acpx/register.runtime-b8kSOZpz.js

---

~/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-.../node_modules/acpx

---

"plugins": {
  "installs": {
    "acpx": {
      "source": "path",
      "sourcePath": "/opt/homebrew/lib/node_modules/openclaw/dist/extensions/acpx",
      "installPath": "/opt/homebrew/lib/node_modules/openclaw/dist/extensions/acpx"
    }
  },
  "load": {
    "paths": [
      "/opt/homebrew/lib/node_modules/openclaw/dist/extensions/acpx"
    ]
  }
}
RAW_BUFFERClick to expand / collapse

Summary

After updating to OpenClaw 2026.4.24, openclaw agent failed during CLI bootstrap with:

[plugins] acpx failed to load from /opt/homebrew/lib/node_modules/openclaw/dist/extensions/acpx/index.js: Error: Cannot find module 'acpx/runtime'
Require stack:
- /opt/homebrew/lib/node_modules/openclaw/dist/extensions/acpx/register.runtime-b8kSOZpz.js

This turned out not to be a missing acpx package in the staged runtime-deps root. The actual trigger was a stale local ACPX custom-path override in ~/.openclaw/openclaw.json that forced ACPX to load as origin: config instead of origin: bundled, which bypassed the bundled runtime-deps staging / mirror flow.

Environment

  • OpenClaw: 2026.4.24
  • OS: macOS Sequoia (arm64)
  • Install style: global npm / Homebrew-managed global node modules path
  • ACP backend: acpx

Actual behavior

openclaw agent --agent main --session-id acpx-regression-smoketest --message 'hello'

fails before the turn starts with:

[plugins] acpx failed to load from /opt/homebrew/lib/node_modules/openclaw/dist/extensions/acpx/index.js: Error: Cannot find module 'acpx/runtime'
Require stack:
- /opt/homebrew/lib/node_modules/openclaw/dist/extensions/acpx/register.runtime-b8kSOZpz.js

Expected behavior

If ACPX is still bundled and its staged runtime deps are present, openclaw agent should continue to work even if older local config contains stale ACPX install metadata pointing back at the bundled dist path.

At minimum, openclaw doctor should detect this config state and warn / repair it.

Key findings

1. The staged runtime dependency actually existed

On this machine, acpx was already present at:

~/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-.../node_modules/acpx

and require('acpx/runtime') succeeded from that staged root.

2. ACPX loads correctly when treated as bundled

Using the loader directly without the user config override, ACPX loaded as:

  • origin: bundled
  • status: loaded

and the mirrored runtime root was created successfully under the staged runtime-deps install root.

3. The failure only happened when the user config was applied

The live config still contained both of these ACPX overrides:

"plugins": {
  "installs": {
    "acpx": {
      "source": "path",
      "sourcePath": "/opt/homebrew/lib/node_modules/openclaw/dist/extensions/acpx",
      "installPath": "/opt/homebrew/lib/node_modules/openclaw/dist/extensions/acpx"
    }
  },
  "load": {
    "paths": [
      "/opt/homebrew/lib/node_modules/openclaw/dist/extensions/acpx"
    ]
  }
}

With that config present, ACPX flipped to:

  • origin: config
  • status: error

and then failed on Cannot find module 'acpx/runtime' from the raw dist plugin path.

4. Minimal workaround

Removing only these stale ACPX overrides fixed the problem immediately:

  • plugins.installs.acpx
  • the ACPX entry in plugins.load.paths

while keeping:

  • plugins.entries.acpx.enabled = true

After that:

  • openclaw config validate passed
  • openclaw agent --agent main --session-id acpx-regression-postfix --message 'hello' --timeout 15 --json returned status = ok
  • ACPX loaded again via the bundled path

Why this looks like an upstream gap

This seems less like a pure packaging bug and more like a migration / doctor gap:

  • older local ACPX custom-path metadata that points back at the bundled dist path is still accepted
  • once ACPX is loaded as origin: config, the bundled runtime-deps flow is bypassed
  • openclaw doctor did not surface this stale ACPX override as a repairable problem

Suggested fix

One of these would likely solve it cleanly:

  1. Teach plugin loading / migration to treat config-installed ACPX paths that resolve to the bundled dist root as bundled ACPX again.
  2. Teach openclaw doctor --fix to detect and remove stale ACPX custom-path overrides that simply point at the bundled dist path.
  3. Emit a dedicated warning when ACPX is configured from a custom path that aliases the bundled install and would disable bundled runtime-deps staging.

Not the main issue

acpx was not on the global shell PATH on this machine, but that was not the root cause here. The failure reproduced even though the staged ACPX package existed and the actual fix was to remove the stale ACPX config override so OpenClaw would use the bundled runtime path again.

If useful, I can add exact loader repro snippets for the origin: bundled vs origin: config difference.

extent analysis

TL;DR

Remove stale ACPX custom-path overrides in ~/.openclaw/openclaw.json to fix the openclaw agent failure.

Guidance

  • Check the plugins.installs.acpx and plugins.load.paths sections in ~/.openclaw/openclaw.json for stale ACPX overrides.
  • Remove these overrides to allow ACPX to load as origin: bundled instead of origin: config.
  • Verify the fix by running openclaw config validate and openclaw agent with the desired options.
  • Consider running openclaw doctor --fix to detect and remove similar issues in the future.

Example

No code snippet is necessary, as the fix involves removing specific configuration overrides.

Notes

The issue is caused by a migration gap in OpenClaw, where older local ACPX custom-path metadata is still accepted and bypasses the bundled runtime-deps flow. The suggested fix involves teaching plugin loading/migration to treat config-installed ACPX paths as bundled ACPX again or detecting and removing stale ACPX custom-path overrides.

Recommendation

Apply the workaround by removing stale ACPX overrides, as this is a migration/doctor gap issue rather than a packaging bug. This should fix the immediate problem and allow openclaw agent to function correctly.

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…

FAQ

Expected behavior

If ACPX is still bundled and its staged runtime deps are present, openclaw agent should continue to work even if older local config contains stale ACPX install metadata pointing back at the bundled dist path.

At minimum, openclaw doctor should detect this config state and warn / repair it.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING