Skip to content

[Bug]: [email protected] runtime dep not staged on npm global install of 2026.4.22 — ACP plugin fails to load with 'Cannot find module acpx/runtime' #70839

Description

@Dalton-AI-open

Summary

After upgrading to [email protected] via npm install -g openclaw, the bundled ACPX Runtime plugin fails to load with:

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

The plugin's runtime dependency ([email protected]) is never staged into node_modules during the global npm install, so the subpath import acpx/runtime fails at gateway startup. openclaw plugins list reports acpx as failed-to-load.

Related to (but not a duplicate of) #70217 — that issue is about a pnpm source-build where node_modules/acpx was stale at 0.4.0. This one is about npm global install where node_modules/acpx is simply absent under the bundled plugin.

Environment

  • OpenClaw: 2026.4.22 (00bd2cf)
  • Install method: npm install -g openclaw
  • Node: v22.22.0
  • OS: Ubuntu 24.04 (Linux 6.8.0, x64)
  • Plugin path: /usr/lib/node_modules/openclaw/dist/extensions/acpx/

Reproduction

  1. Fresh install / upgrade: npm install -g [email protected]
  2. Start gateway or run any CLI command that triggers plugin load (e.g. openclaw memory search --query x)
  3. Observe the error on stderr:
    [plugins] acpx failed to load from .../dist/extensions/acpx/index.js: Error: Cannot find module 'acpx/runtime'
    

Root cause

/usr/lib/node_modules/openclaw/dist/extensions/acpx/package.json declares:

{
  "name": "@openclaw/acpx",
  "version": "2026.4.20",
  "type": "module",
  "dependencies": { "acpx": "0.5.3" },
  "openclaw": { "extensions": ["./index.js"], "bundle": { "stageRuntimeDependencies": true } }
}

But /usr/lib/node_modules/openclaw/dist/extensions/acpx/node_modules/acpx does not exist after npm install -g. The stageRuntimeDependencies: true flag did not install [email protected] alongside the bundled plugin.

The compiled plugin entry (register.runtime-D_wx_dkq.js) imports from acpx/runtime, which is a subpath export only available in [email protected]. With no local copy present, resolution falls through to the global node_modules (none), and fails.

Workaround (confirmed working)

cd /usr/lib/node_modules/openclaw/dist/extensions/acpx
npm install [email protected] --no-save

After this, openclaw plugins list shows ACPX Runtime as loaded without error, and sessions_spawn(runtime: "acp", ...) works.

Impact

  • ACP coding agent sessions are unavailable on clean npm global installs until the workaround is applied. This affects:
    • sessions_spawn(runtime: "acp", agentId: "codex"|"claude-code"|"cursor"|...)
    • Resuming persistent Codex/Claude Code sessions via resumeSessionId
    • Any Discord/webchat thread-bound ACP harness flow
  • Silent-ish: the error fires on stderr but CLI commands still complete, so users may not notice until they try to spawn an ACP session.

Related history

This is the same bundler-miss pattern documented in:

Appears to be the first report specifically for [email protected] not being staged post-4.22.

Suggested fix

Whatever mechanism now (after those earlier fixes) ensures grammy, @larksuiteoapi/node-sdk, and @buape/carbon get staged into their respective bundled plugin node_modules/ on global npm install needs to also cover [email protected] in dist/extensions/acpx/. It looks like this plugin's manifest was added or bumped in 4.20 (@openclaw/acpx version string) and the staging rule either didn't pick it up or regressed for 4.22.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions