Skip to content

[Bug]: 2026.4.26 ships incomplete typebox bundles in extensions/xai and extensions/browser, breaking plugin load #73736

Closed

Description

@perlowja

Summary

The ghcr.io/openclaw/openclaw:2026.4.26 image ships incomplete copies of typebox 1.1.28 in extensions/xai/node_modules/typebox/ and extensions/browser/node_modules/typebox/. Multiple subdirectories are missing files that the bundled index.mjs barrel-re-exports try to require:

  • system/memory/index.mjs does export * as Memory from './memory.mjs' but the file isn't there. It's also missing metrics.mjs and update.mjs.
  • guard/guard.mjs does ... from './string.mjs' — also missing.

Result: at every CLI invocation, the loader logs

[plugins] xai failed to load from /app/dist/extensions/xai/index.js:
  Error: Cannot find module './memory.mjs'
  Require stack:
  - /app/dist/extensions/xai/node_modules/typebox/build/system/memory/index.mjs

then (after a workaround patches that) the next missing file:

Cannot find module './string.mjs'
- /app/dist/extensions/xai/node_modules/typebox/build/guard/guard.mjs

If xai (or browser) is enabled in plugins.entries.<name>.enabled, this blocks every openclaw agent invocation with the loader stack trace cascading up to runCli.

Reproduction (any host with podman/docker)

docker run --rm --entrypoint sh ghcr.io/openclaw/openclaw:2026.4.26 -c '
  ls /app/dist/extensions/xai/node_modules/typebox/build/system/memory/
'
# observed: assign.mjs clone.mjs create.mjs discard.mjs index.mjs   (5 files)

docker run --rm --entrypoint sh ghcr.io/openclaw/openclaw:2026.4.26 -c '
  ls /app/dist/extensions/openai/node_modules/typebox/build/system/memory/
'
# expected: 16 files including memory.mjs, metrics.mjs, update.mjs, and their .d.mts pairs

10+ other extensions ship the complete typebox bundle (openai, anthropic, brave, kimi-coding, discord, lmstudio, diffs, slack, whatsapp, tavily). Only xai and browser are truncated. The missing files exist in the runtime-deps cache at /home/node/.openclaw/plugin-runtime-deps/openclaw-2026.4.26-*/node_modules/typebox/build/system/memory/memory.mjs, so the source artifact is fine — this is a packaging step truncation, not an upstream typebox issue.

Workaround (in-image patch)

docker exec --user root <container> sh -c '
  rm -rf /app/dist/extensions/xai/node_modules/typebox /app/dist/extensions/browser/node_modules/typebox
  cp -r /app/dist/extensions/openai/node_modules/typebox /app/dist/extensions/xai/node_modules/typebox
  cp -r /app/dist/extensions/openai/node_modules/typebox /app/dist/extensions/browser/node_modules/typebox
'

After this patch + a docker restart, agent invocations succeed and the xai/browser plugins load cleanly.

Adjacent

Versions

  • ghcr.io/openclaw/openclaw:2026.4.26, sha256 04e27383656941e59fba80a5a9c28b709f240ea980bd2cb375e4a7786d5a7a20
  • typebox 1.1.28 (bundled inside extensions); 1.1.33 also exists in plugin-runtime-deps/

Activity

  1. clawsweeper commented on Apr 28, 2026

    @clawsweeper
    Contributor

    Thanks for the context here. I did a careful shell check against current main, and this is already implemented.

    The reported 2026.4.26 Docker packaging regression is fixed in the shipped v2026.4.27 artifact and current main keeps the same runtime-dependency boundary: xai/browser no longer carry the broken plugin-local TypeBox trees, and their entrypoints import successfully against the complete package-root TypeBox install.

    So I’m closing this as already implemented rather than keeping a duplicate issue open.

    Review details

    Best possible solution:

    Keep the v2026.4.27-and-newer packaging behavior, where xai/browser resolve TypeBox from the complete package-root dependency tree, and rely on release artifact checks to prevent reintroducing incomplete bundled dependency payloads.

    Do we have a high-confidence way to reproduce the issue?

    Yes. The original report gives a precise Docker reproduction against ghcr.io/openclaw/openclaw:2026.4.26, and the same artifact-level checks against ghcr.io/openclaw/openclaw:2026.4.27 show the missing-file path no longer exists and both affected plugin entrypoints import successfully.

    Is this the best way to solve the issue?

    Yes. Shipping a corrected release artifact and keeping local runtime-dependency staging opt-in is the narrow maintainable fix; the immutable 2026.4.26 image remains broken, but v2026.4.27 or newer resolves the observable user problem.

    Security review:

    Security review: This is a non-PR packaging bug triage item; no patch diff was reviewed for security or supply-chain regressions.

    What I checked:

    • Current xai dependency shape: Current main declares xai's TypeBox dependency but its OpenClaw package block only lists the plugin entrypoint, with no local runtime-dependency staging opt-in. (extensions/xai/package.json:7, 46888f5afbe9)
    • Current browser dependency shape: Current main declares browser's TypeBox dependency but its OpenClaw package block only lists the plugin entrypoint, with no local runtime-dependency staging opt-in. (extensions/browser/package.json:7, 46888f5afbe9)
    • Unstaged plugin node_modules cleanup: The bundled runtime-deps staging script only stages local node_modules for plugins with openclaw.bundle.stageRuntimeDependencies=true and removes node_modules for plugins that are not opted in. (scripts/stage-bundled-plugin-runtime-deps.mjs:61, 46888f5afbe9)
    • Package-root TypeBox dependency: Current main carries TypeBox at the OpenClaw package root, which is the dependency location used by the v2026.4.27 Docker artifact for these plugins. (package.json:1641, 46888f5afbe9)
    • v2026.4.27 Docker artifact proof: In ghcr.io/openclaw/openclaw:2026.4.27, /app/dist/extensions/xai/node_modules/typebox and /app/dist/extensions/browser/node_modules/typebox are absent, /app/node_modules/typebox contains the reported missing memory.mjs, metrics.mjs, update.mjs, and guard/string.mjs files, and imports of the TypeBox memory and guard barrels succeeded. (cbc2ba093146)
    • v2026.4.27 plugin import proof: Direct Node imports of /app/dist/extensions/xai/index.js and /app/dist/extensions/browser/index.js in the v2026.4.27 Docker image both printed IMPORT_OK with the default export. (cbc2ba093146)

    Likely related people:

    • Vincent Koc: Current local blame attributes the bundled runtime-deps staging script and affected package dependency declarations to Vincent Koc, and the prior ClawSweeper review also routed the materialization path to him from commit history around bundled runtime-deps staging. (role: likely runtime-deps staging owner; confidence: medium; commits: 02597caa8bff, 005eeca06f3c; files: scripts/stage-bundled-plugin-runtime-deps.mjs, extensions/xai/package.json, extensions/browser/package.json)
    • Peter Steinberger: Peter authored the v2026.4.27 stable release commit that shipped the corrected artifact and subsequent runtime-deps hardening/follow-up commits on main. (role: recent release and runtime-deps follow-up owner; confidence: medium; commits: cbc2ba093146, 2a54427aba82, ac599c9e539f; files: package.json, src/plugins/bundled-runtime-deps-materialization.ts, src/plugins/bundled-runtime-deps.test.ts)

    Codex review notes: model gpt-5.5, reasoning high; reviewed against 46888f5afbe9; fix evidence: release v2026.4.27, commit cbc2ba093146.

  2. locked as resolved and limited conversation to collaborators on May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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