Repository navigation
Description
Bug type
Regression (worked before, now fails)
Beta release blocker
No (affects stable v2026.5.27 and v2026.5.28)
Summary
After updating from 2026.5.12 to 2026.5.27 (and confirmed in 2026.5.28), the Matrix channel handler crashes on every inbound message with:
[matrix] handler failed: TypeError: Cannot read properties of undefined (reading 'run')
The bot logs in successfully (matrix: logged in as @<bot>:matrix.<host>), syncs rooms, receives RTC session events, but fails to dispatch any inbound message turn. Users see the bot read their messages without ever responding.
This matches the same crash pattern reported for other channels in this version line:
- [Bug]: Feishu p2p DM dispatch crashes with TypeError: Cannot read properties of undefined (reading 'run') on 2026.5.27 (regression since 2026.5.22) #88216 — Feishu p2p DM dispatch — OPEN
- [Bug] BlueBubbles channel dispatch broken in v2026.5.27 — TypeError: Cannot read properties of undefined (reading 'run') (same regression as #87602) #88139 — BlueBubbles channel dispatch — OPEN
- [Bug] Feishu channel dispatch broken in v2026.5.27-beta.1 — TypeError: Cannot read properties of undefined (reading 'run') #87602 — Feishu in v2026.5.27-beta.1 — CLOSED (fix did not reach stable)
→ Looks like a structural plugin-runtime regression affecting multiple channel inbound dispatchers.
Environment
- OpenClaw Core: verified on
2026.5.27and2026.5.28 - Plugin
@openclaw/matrix: verified on2026.3.13,2026.5.27, and2026.5.28(all three crash the same way) - Runtime: Node 22.22.2, npm 10.9.7
- OS: Linux (systemd service), Debian 12
- Channel: Matrix (self-hosted homeserver)
- Plugins active (8): active-memory, llm-task, lobster, matrix, memory-core, memory-wiki, nextcloud-talk, openai
Steps to reproduce
- Existing bot on stable
2026.5.12with@openclaw/matrix@2026.3.13running cleanly (14 days uptime, no errors) NPM_CONFIG_PREFIX=~/.npm-global npm install -g openclaw@2026.5.27systemctl restart openclawensure-matrix-sdkauto-installs@vector-im/matrix-bot-sdk(related: [Bug]: @vector-im/matrix-bot-sdk missing from dependencies in all 2026.5.x releases (Matrix bridge crash-loops on install) #87990)- Bot logs in successfully to Matrix
- Every inbound message triggers
matrix handler failed: TypeError: Cannot read properties of undefined (reading 'run')
Also tried (none fix the crash):
- Upgrade plugin to
@openclaw/matrix@2026.5.27(matched core version) — same crash - Upgrade plugin to
@openclaw/matrix@2026.5.28(peer-depopenclaw: '>=2026.5.28') and core to2026.5.28— same crash - Restart between every step — same crash
Only 2026.5.12 + @openclaw/matrix@2026.3.13 is functional.
Failing code location
The bundled chunk path varies per build but the call site is consistent. In 2026.5.28 core:
dist/monitor.account-CJaXe8-T.js:2870: const turnResult = await core.channel.inbound.run({
dist/monitor-DWJ7KlrE.js:138: await core.channel.inbound.run({
dist/channel-runtime-Eq3ifkF3.js:280: await core.channel.inbound.dispatchReply({
The @openclaw/matrix@2026.5.28 plugin chunk also calls:
dist/monitor-COOR-Ksj.js: const turnResult = await core.channel.inbound.run({...})
→ core.channel.inbound is undefined at runtime, suggesting the plugin-runtime core object is not having channel.inbound populated before the inbound handler runs. The plugin-SDK file dist/plugin-sdk/channel-inbound.js exists in the core bundle, so the symbol is exported but apparently not wired into the plugin-facing core namespace.
Observed error (log excerpt)
2026-05-31T17:42:51 [gateway] loading configuration…
2026-05-31T17:43:03 [gateway] http server listening (8 plugins: ..., matrix, ...)
2026-05-31T17:43:04 [matrix] [default] starting provider (https://matrix.<host>)
2026-05-31T17:43:04 [ensure-matrix-sdk] @vector-im/matrix-bot-sdk missing! Installing...
2026-05-31T17:43:55 [ensure-matrix-sdk] @vector-im/matrix-bot-sdk installed successfully.
2026-05-31T17:44:30 matrix: logged in as @<bot>:matrix.<host>
2026-05-31T17:44:30 [MatrixClient] Resuming queue after resumed sync
2026-05-31T17:44:38 [matrix] handler failed: TypeError: Cannot read properties of undefined (reading 'run')
2026-05-31T17:44:58 [matrix] handler failed: TypeError: Cannot read properties of undefined (reading 'run')
... (every inbound message)
Stack trace is not surfaced in the log (the message is the only line captured), but the location can be derived from grep over the matrix-plugin bundle (monitor-*.js → core.channel.inbound.run).
Expected
core.channel.inbound.run(...) is callable at message dispatch time, the inbound turn completes, the bot replies normally as it did on 2026.5.12.
Workaround
Full rollback to 2026.5.12 core + @openclaw/matrix@2026.3.13 plugin + restore the pre-update openclaw.json config snapshot. Verified working immediately after rollback (0 errors, clean Matrix login, normal reply dispatch).
NPM_CONFIG_PREFIX=~/.npm-global npm install -g openclaw@2026.5.12 @openclaw/matrix@2026.3.13
cp ~/.openclaw/openclaw.json.bak-pre-5.27 ~/.openclaw/openclaw.json
systemctl restart openclawNote: @openclaw/matrix@2026.3.13 is now npm-deprecated (Deprecated: obsolete OpenClaw plugin package version) but functionally fine on 2026.5.12.
Related
- [Bug]: Feishu p2p DM dispatch crashes with TypeError: Cannot read properties of undefined (reading 'run') on 2026.5.27 (regression since 2026.5.22) #88216 — same root cause, Feishu channel (OPEN)
- [Bug] BlueBubbles channel dispatch broken in v2026.5.27 — TypeError: Cannot read properties of undefined (reading 'run') (same regression as #87602) #88139 — same root cause, BlueBubbles channel (OPEN)
- [Bug] Feishu channel dispatch broken in v2026.5.27-beta.1 — TypeError: Cannot read properties of undefined (reading 'run') #87602 — same root cause, Feishu in beta.1 (CLOSED, regression returned in stable)
- [Bug]: @vector-im/matrix-bot-sdk missing from dependencies in all 2026.5.x releases (Matrix bridge crash-loops on install) #87990 —
@vector-im/matrix-bot-sdkmissing from core deps (side effect of update)
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon May 31, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed May 31, 2026, 12:11 PM ET / 16:11 UTC.
Summary
Keep open. The report is a fresh, detailed stable-release Matrix dispatch regression, and related open reports show the same missing runtime method symptom on other channels; current main/source inspection does not provide enough proof that the user-visible problem is already fixed.
Reproducibility: no. The issue gives detailed release logs and exact call sites, but current main and inspected v2026.5.28 artifacts both expose
channel.inbound, so I did not establish a failing current-main Matrix run.Ways to help us reproduce this
Next step
A maintainer or live-validation pass should first pin the packaged runtime failure, because source and artifact inspection do not yet explain why
channel.inboundis undefined in the reported install.Review details
Best possible solution:
Reproduce the packaged Matrix path, identify whether runtime injection or core/plugin version resolution is dropping
channel.inbound, then fix the shared runtime boundary and validate Matrix plus the sibling affected channels before release.Do we have a high-confidence way to reproduce the issue?
No. The issue gives detailed release logs and exact call sites, but current main and inspected v2026.5.28 artifacts both expose
channel.inbound, so I did not establish a failing current-main Matrix run.Is this the best way to solve the issue?
Unclear. The Matrix code is already using the documented
runtime.channel.inbound.run(...)API, so the likely fix should target packaged runtime injection or version skew rather than a blind API rename.AGENTS.md: found and applied where relevant.
Remaining risk / open question:
channel.inbound, so the exact runtime failure still needs a packaged/global-install or live Matrix reproduction before a narrow fix is safe.Codex review notes: model gpt-5.5, reasoning high; reviewed against 63621eead219.
Label changes
Label changes:
P1: The report describes a current stable-release regression where Matrix inbound messages are received but never dispatch to the agent.impact:message-loss: The affected workflow drops all Matrix replies after inbound receipt, which is a channel message-delivery failure.issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.clawsweeper:needs-info: Current issue advisory state selects this label.clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.clawsweeper:needs-maintainer-review: Current issue advisory state selects this label.Label justifications:
P1: The report describes a current stable-release regression where Matrix inbound messages are received but never dispatch to the agent.impact:message-loss: The affected workflow drops all Matrix replies after inbound receipt, which is a channel message-delivery failure.Evidence reviewed
What I checked:
TypeError: Cannot read properties of undefined (reading 'run'), leaving users without replies.core.channel.inbound.run(...)from the monitor handler, matching the reported failing symbol path. (extensions/matrix/src/matrix/monitor/handler.ts:2148, 63621eead219)channel.inboundwithbuildContext,run,runPreparedReply, anddispatchReply, so the remaining failure is likely in runtime injection, package resolution, or release/plugin skew rather than a missing source helper. (src/plugins/runtime/runtime-channel.ts:182, 63621eead219)setChannelRuntime(api.runtime)for runtime/setup channel entries; this is the likely boundary to verify against the packaged Matrix install path. (src/plugins/loader.ts:2425, 63621eead219)runtime.channel.turn.*aliases were removed and plugins should useruntime.channel.inbound.run(...), so the Matrix call is aligned with the intended current contract. Public docs:docs/plugins/sdk-channel-inbound.md. (docs/plugins/sdk-channel-inbound.md:60, 63621eead219)openclaw@2026.5.28and@openclaw/matrix@2026.5.28artifacts show Matrix still callscore.channel.inbound.run(...), while the core artifact includes a runtime-channel chunk withinbound.run; this does not prove the reported packaged runtime object is healthy.Likely related people:
src/plugins/runtime/runtime-channel.ts,src/plugins/loader.ts,src/plugin-sdk/channel-entry-contract.ts)extensions/matrix/src/matrix/monitor/handler.ts,extensions/matrix/src/matrix/draft-stream.ts,extensions/matrix/src/approval-native.ts)extensions/matrix/src/matrix/monitor/handler.ts,extensions/feishu/src/bot.ts,src/plugins/runtime/types-channel.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.steipete commentedon May 31, 2026
Fixed on current
mainbyd05e4a4bc6(fix(feishu): use full gateway channel runtime).Proof on current
main:resolveChannelRuntime: getChannelRuntimeand passes it throughcreateTaskScopedChannelRuntime(...)beforestartAccount(...)runs.createRuntimeChannel()exposeschannel.inbound.run, so channel plugins no longer receive a partial channel surface missinginbound.src/gateway/server-channels.test.tsnow asserts bundled startup receives a full runtime andtypeof ctx.channelRuntime.inbound.run === "function"; non-bundled channels keep the same full runtime path.node scripts/run-vitest.mjs src/gateway/server-channels.test.ts.Closing as fixed on
main. If this still reproduces on a build afterd05e4a4bc6, please reopen with the exact OpenClaw build SHA/version and fresh channel startup logs from that build.