openclaw - ✅(Solved) Fix [Bug]: Matrix cannot import 'openclaw', resulting in an error that prevents Matrix from being used. [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#62260Fetched 2026-04-08 03:07:03
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×2closed ×1commented ×1cross-referenced ×1

After updating to v2026.4.5, the following error occurred.

2026-04-07T02:31:58.077+00:00 [matrix] [work] channel exited: Cannot find package 'openclaw' imported from /app/extensions/matrix/src/matrix/client/config-secret-input.runtime.ts

Error Message

After updating to v2026.4.5, the following error occurred.

Root Cause

After updating to v2026.4.5, the following error occurred.

2026-04-07T02:31:58.077+00:00 [matrix] [work] channel exited: Cannot find package 'openclaw' imported from /app/extensions/matrix/src/matrix/client/config-secret-input.runtime.ts

Fix Action

Fixed

PR fix notes

PR #62330: fix(matrix): harden lazy local runtime loading

Description (problem / solution / changelog)

Summary

  • add a shared alias-safe plugin-local lazy loader for bundled plugin runtime modules
  • move Matrix lazy local runtime imports onto that shared seam across auth, bootstrap, send, monitor, and runtime entry paths
  • add nested-package regression coverage plus plugin-sdk/docs updates for the new lazy-runtime helper

Why

This branch hardens the source-tree / nested-package runtime seam that showed up in the Matrix Docker reports (#62170, #62260).

The root issue is not Matrix auth logic itself; it is raw lazy import("./...") hops inside a bundled plugin package whose lazily loaded modules import openclaw/plugin-sdk/*. In nested package roots, that can fall off the alias-aware loader seam and fail with Cannot find package 'openclaw'.

PR #62316 should address the official Docker runtime path by restoring packaged dist/extensions resolution. This draft keeps the broader source-runtime seam fix separate so we can decide whether we want the extra hardening or just the Docker fix.

Scope boundary

  • no repo-wide plugin migration
  • no Dockerfile changes here
  • Matrix only, plus the shared helper needed to avoid repeating Matrix-specific runtime shims

Testing

  • pnpm build
  • OPENCLAW_LOCAL_CHECK=0 pnpm test extensions/matrix/src/plugin-entry.runtime.test.ts extensions/matrix/src/matrix/client.test.ts extensions/matrix/src/matrix/client-bootstrap.test.ts extensions/matrix/src/matrix/send/client.test.ts
  • OPENCLAW_LOCAL_CHECK=0 pnpm test src/plugin-sdk/lazy-runtime.test.ts
  • OPENCLAW_LOCAL_CHECK=0 pnpm test src/plugins/contracts/runtime-seams.contract.test.ts -t "allows activated runtime facades when the resolved plugin root matches an installed-style manifest record"

Notes

  • src/plugins/contracts/plugin-sdk-package-contract-guardrails.test.ts still reports pre-existing extension import leaks in Discord/Slack/Telegram doctor-contract files; not introduced by this branch.

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • docs/plugins/architecture.md (modified, +3/-0)
  • docs/plugins/sdk-migration.md (modified, +1/-1)
  • docs/plugins/sdk-overview.md (modified, +1/-1)
  • extensions/matrix/index.ts (modified, +9/-4)
  • extensions/matrix/src/actions.ts (modified, +5/-1)
  • extensions/matrix/src/channel.ts (modified, +12/-3)
  • extensions/matrix/src/cli-metadata.ts (modified, +7/-1)
  • extensions/matrix/src/cli.ts (modified, +5/-1)
  • extensions/matrix/src/legacy-crypto.ts (modified, +5/-1)
  • extensions/matrix/src/matrix/client-bootstrap.ts (modified, +22/-7)
  • extensions/matrix/src/matrix/client/config.ts (modified, +32/-18)
  • extensions/matrix/src/matrix/client/create-client.ts (modified, +23/-7)
  • extensions/matrix/src/matrix/client/shared.ts (modified, +5/-1)
  • extensions/matrix/src/matrix/client/storage.ts (modified, +5/-1)
  • extensions/matrix/src/matrix/credentials-write.runtime.ts (modified, +9/-3)
  • extensions/matrix/src/matrix/monitor/startup.ts (modified, +22/-5)
  • extensions/matrix/src/matrix/monitor/verification-events.ts (modified, +10/-2)
  • extensions/matrix/src/matrix/probe.ts (modified, +5/-1)
  • extensions/matrix/src/matrix/sdk.ts (modified, +5/-1)
  • extensions/matrix/src/matrix/sdk/crypto-facade.ts (modified, +5/-1)
  • extensions/matrix/src/matrix/send/client.ts (modified, +5/-1)
  • extensions/matrix/src/onboarding.ts (modified, +5/-1)
  • extensions/matrix/src/plugin-entry.runtime.ts (modified, +13/-4)
  • extensions/matrix/src/setup-core.ts (modified, +5/-1)
  • src/channels/plugins/module-loader.test.ts (modified, +11/-0)
  • src/channels/plugins/module-loader.ts (modified, +9/-88)
  • src/plugin-sdk/facade-runtime.ts (modified, +8/-3)
  • src/plugin-sdk/lazy-runtime.test.ts (added, +71/-0)
  • src/plugin-sdk/lazy-runtime.ts (modified, +41/-0)
  • src/plugins/contracts/plugin-sdk-subpaths.test.ts (modified, +5/-1)
  • src/plugins/local-module-loader.ts (added, +150/-0)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

After updating to v2026.4.5, the following error occurred.

2026-04-07T02:31:58.077+00:00 [matrix] [work] channel exited: Cannot find package 'openclaw' imported from /app/extensions/matrix/src/matrix/client/config-secret-input.runtime.ts

Steps to reproduce

As described above

Expected behavior

Hopefully, the matrix can be used normally.

Actual behavior

As described above

OpenClaw version

2026.4.5

Operating system

Ubuntu 24.04

Install method

docker

Model

minimax

Provider / routing chain

minimax

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The error message suggests that the package 'openclaw' is missing, which is required by the matrix client configuration, and updating to v2026.4.5 may have introduced a dependency issue.

Guidance

  • Verify that the 'openclaw' package is installed and properly configured in the project dependencies, especially after updating to v2026.4.5.
  • Check the matrix/client/config-secret-input.runtime.ts file to ensure it correctly imports the 'openclaw' package and that the import path is valid.
  • Review the release notes or changelog for v2026.4.5 to see if there are any specific instructions for handling dependencies or if 'openclaw' has been deprecated or replaced.
  • If using Docker, ensure that the Docker image for v2026.4.5 includes the 'openclaw' package or that it is correctly installed in the Dockerfile.

Example

No specific code example can be provided without more context on how 'openclaw' is used in the project.

Notes

The solution may depend on how the 'openclaw' package is managed within the project (e.g., via npm, yarn, or another package manager) and whether v2026.4.5 introduced changes to dependencies.

Recommendation

Apply workaround: Check and possibly reinstall or update the 'openclaw' package to ensure compatibility with v2026.4.5, as the error directly points to a missing package issue.

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

Hopefully, the matrix can be used normally.

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 - ✅(Solved) Fix [Bug]: Matrix cannot import 'openclaw', resulting in an error that prevents Matrix from being used. [1 pull requests, 1 comments, 2 participants]