Repository navigation
Description
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
After installing OpenClaw 2026.5.3-1, the matrix channel receives inbound messages and the agent generates replies normally — but outbound m.room.message events silently disappear before reaching matrix-js-sdk. matrix-js-sdk's own sendEvent of type m.room.message log line never appears for openclaw-driven turns. There are no errors, warnings, or other diagnostics at info, warn, or error level. The agent session JSONL shows the assistant reply was generated cleanly with stopReason: "stop"; it just never reaches the homeserver.
The break is reproducibly inside openclaw's matrix channel wrapper — matrix-js-sdk itself, the access token, the device, and the homeserver have all been verified healthy by direct test (see "Diagnostic evidence" below).
Steps to reproduce
- Install OpenClaw 2026.5.3-1 as a host npm install with the matrix channel configured against an unencrypted matrix room. Node 24+ runtime.
- Have a user account post a message in the configured room (e.g. "ping").
- Observe: the gateway's session JSONL records both the inbound user message and the assistant-generated reply with
stopReason: "stop". The reply never appears in the matrix room. - Restarting
openclaw-gatewaydoes not resolve. Reinstalling the matrix nested deps (matrix-js-sdk,@matrix-org/matrix-sdk-crypto-nodejs,@matrix-org/matrix-sdk-crypto-wasm) does not resolve. Runningnpm rebuild @matrix-org/matrix-sdk-crypto-nodejsdoes not resolve.
Expected behavior
Agent-generated replies posted to the configured matrix room within ~seconds of generation, as observed on prior 2026.4.x releases.
Actual behavior
Agent replies generated correctly but silently dropped before reaching matrix-js-sdk. No error or warning at any log level (info / warn / error / file-log / journald).
Diagnostic evidence
1. Inbound bridge healthy. Session JSONL records user message at 2026-05-05T22:13:27.178Z with full matrix metadata (chat_id, message_id, sender). Bridge receives sync events fine.
2. Model + tool loop healthy. Session JSONL records assistant reply at 2026-05-05T22:14:00.518Z with normal stopReason: "stop", expected reply text, ~33s end-to-end model latency.
3. matrix-js-sdk's sendEvent log line is absent for openclaw turns. Grepping /tmp/openclaw/openclaw-2026-05-05.log for sendEvent returns zero hits since gateway start. matrix-js-sdk emits this line on every sendMessage invocation; absence indicates openclaw is not calling it.
4. matrix-js-sdk + same device id + same access token + same nested-deps install sends fine in isolation. Reproducer:
const sdk = require("/path/to/openclaw/node_modules/matrix-js-sdk");
const c = sdk.createClient({
baseUrl: "http://homeserver:8008",
accessToken: "<openclaw's access token>",
userId: "@bot:homeserver",
deviceId: "<openclaw's device id from storage-meta.json>",
});
await c.startClient({ initialSyncLimit: 1 });
await new Promise((res) => c.once("sync", (s) => s === "PREPARED" && res()));
const r = await c.sendMessage("<room id>", { msgtype: "m.text", body: "test" });
console.log("OK", r.event_id);Result: SAME-DEVICE SEND OK event_id: $... — HTTP 200 from synapse in ~48ms. Confirms the bridge's matrix-js-sdk install, native binding, access token, device, and homeserver are all functional. The break is in openclaw's wrapper layer.
5. Gateway file log only emits these matrix-related lines all day:
[matrix] [default] starting provider (http://...)(at startup)matrix: logged in as @bot:homeserver(at startup)[MatrixClient] Resuming queue after resumed sync(at startup)- A handful of
[MatrixRTCSession ... m.call#ROOM] No membership changes detectedentries (call-state polling) Couldn't find timeline for thread ID $...warnings on a separate room (not the affected one)
No sendEvent, no error, no warn from matrix-js-sdk during steady-state operation.
6. Native binding loads cleanly from openclaw cwd: node -e 'require("@matrix-org/matrix-sdk-crypto-nodejs")' returns 8 keys (Attachment, EncryptedAttachment, BackupDecryptionKey, ...). OlmMachine.initialize returns successfully.
7. No E2EE state present — homeserver /keys/query for the bot account returns empty device_keys/master_keys/self_signing_keys/user_signing_keys. Bot operates in unencrypted-room-only mode.
8. Gateway liveness diagnostics show event-loop pressure consistent with #77995's symptom class:
[diagnostic] liveness warning: reasons=event_loop_delay
eventLoopDelayP99Ms=181.9-243.9 eventLoopDelayMaxMs=2294.3-3231.7
eventLoopUtilization=0.29-0.32 active=1 waiting=0 queued=1
Magnitude is milder than #77995's report (their P99 went up to 6350ms), but queued=1 is consistently present.
9. Direct synapse send via same access token, bypassing matrix-js-sdk entirely, works: curl -X PUT -H "Authorization: Bearer <token>" .../rooms/.../send/m.room.message/<txn> -d '{"msgtype":"m.text","body":"..."}' returns HTTP 200 with event_id. Confirms synapse, network, ACL, room state are all healthy.
What this rules out
- matrix-js-sdk itself (works in isolation with same install)
- Native binding ABI (binding loads, OlmMachine.initialize succeeds; rebuild didn't help)
- Access token / device / E2EE setup (synapse confirms valid device, no E2EE state to be partial about)
- Network, synapse, room ACL (direct PUT works)
dist/bundle drift (untouched since prior working state — onlynode_modules/.package-lock.jsonwas rewritten by annpm installof nested matrix deps)
What's left
The break sits between "openclaw's matrix channel plugin observes the agent-generated reply" and "matrix-js-sdk's sendMessage gets called." That lane is opaque to me at info-level logging.
OpenClaw version
2026.5.3-1
Operating system
Linux (Ubuntu 24.04 / WSL2 host running as a Linux VM), node v24.15.0, npm 11.x.
Install method
npm install -g openclaw@2026.5.3-1, with the npm install --no-save workaround for matrix nested deps as documented.
Related issues
- [Bug]: Regression in OpenClaw 2026.5.4 / 2026.5.3-1: gateway status handler stalls ~50s, event loop degraded, Discord heartbeat timeouts #77995 — gateway status stalls ~50s on 2026.5.4 / 2026.5.3-1, Discord heartbeat ACK timeouts. Same general regression class (event-loop saturation in 2026.5.x channel runtime); their symptom is timeouts that eventually succeed, ours is silent total drop. Possibly the same root cause expressed differently across channels.
- [Bug]: Matrix channel missing matrix-js-sdk after 2026.5.4 host npm update #77896 — matrix-js-sdk missing after 2026.5.4 host npm update. Different shape (
ERR_MODULE_NOT_FOUND— we don't see that), but adjacent matrix-channel-packaging area. - 2026.4.27 → 2026.5.2 silently drops built-in channel extensions (whatsapp, discord, bluebubbles, ...) — built-in→external @openclaw/* migration without auto-install or warning #77483 (closed) — built-in→external
@openclaw/*channel migration without auto-install, likely the architectural ancestor of these regressions.
Workaround
None known. Gateway restarts and nested-deps reinstall do not restore. Going back to 2026.4.x is the only known-good state per #77995's reporter (using 2026.5.2 as their last-known-good).
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon May 5, 2026
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.
Close as superseded: the reporter's follow-up disproved a Matrix wrapper regression and traced the behavior to the documented group/channel visible-reply policy; the remaining non-silent diagnostic or fallback work is already tracked by the cross-channel issue and open warning PR.
So I’m closing this here and keeping the remaining discussion on the canonical linked item.
Review details
Best possible solution:
Close this Matrix-specific report and keep any remaining diagnostic or fallback work on #77320 and its linked warning PR.
Do we have a high-confidence way to reproduce the issue?
No for the originally reported Matrix wrapper regression. The high-confidence current path is source-confirmed configuration behavior: group/channel visible replies resolve to message-tool-only suppression unless configured as automatic, which the reporter verified live.
Is this the best way to solve the issue?
Yes. Closing this Matrix-specific report and routing the remaining non-silent diagnostic/fallback discussion to the shared cross-channel tracker is the narrowest maintainable outcome; changing Matrix send delivery would fix the wrong layer.
Security review:
Security review: No patch is under review, and the resolved report is a configuration/support issue rather than a security-sensitive report.
What I checked:
messages.visibleReplies: "automatic"restored Matrix delivery, and links their Phoenix-side config fix.message_tool_onlyunless the configured visible-reply mode is explicitlyautomatic, matching the corrected root cause rather than a Matrix send failure. (src/auto-reply/reply/source-reply-delivery-mode.ts:37, 2d9ef76d5b6b)suppressDeliveryis true, explaining why the Matrix deliver callback andsendMessageMatrixare never invoked under this policy. (src/auto-reply/reply/dispatch-from-config.ts:1594, 2d9ef76d5b6b)messages.groupChat.visibleReplies: "message_tool", that normal final answers stay private, and that settingmessages.groupChat.visibleReplies: "automatic"restores legacy visible replies. Public docs:docs/channels/groups.md. (docs/channels/groups.md:43, 2d9ef76d5b6b)deliverMatrixReplies, which callssendMessageMatrix; if shared dispatch suppresses replies before this callback, Matrix-specific send code is correctly never reached. (extensions/matrix/src/matrix/monitor/handler.ts:1753, 2d9ef76d5b6b)Likely related people:
src/auto-reply/reply/source-reply-delivery-mode.ts,src/auto-reply/reply/dispatch-from-config.ts,docs/gateway/config-channels.md)docs/channels/groups.md,docs/gateway/doctor.md,src/commands/doctor/shared/legacy-config-core-normalizers.ts)src/auto-reply/reply/dispatch-from-config.ts,src/auto-reply/reply/dispatch-from-config.reply-dispatch.test.ts)Codex review notes: model gpt-5.5, reasoning high; reviewed against 2d9ef76d5b6b.
snowmirage commentedon May 6, 2026
Update — confirmed on 2026.5.4, fresh session, full config sweep
Re-tested today on the same Phoenix VM after upgrading to 2026.5.4 (released earlier today, 2026-05-05 08:24Z). Same silent drop. Posting an evidence sweep so triage doesn't have to redo it.
Environment
openclaw 2026.5.4(@openclaw/matrix@2026.5.4shipped indist/extensions/matrix/)v24.15.0package.json:matrix-js-sdk@41.4.0,@matrix-org/matrix-sdk-crypto-nodejs@^0.5.1,@matrix-org/matrix-sdk-crypto-wasm@18.2.0. (npm install -g openclaw@2026.5.4wipes nested deps; that's tracked separately at #75XXX-style "nested deps not auto-installed" — not the cause of this issue.)matrix-js-sdk@41.4.0reproducer with the same device id sends in ~48ms (HTTP 200, message lands). DirectPUT /send/m.room.message/<txn>via curl with the same token also sends. The break is strictly inside OpenClaw between "agent emits final assistant message" and "matrix-js-sdk'ssendMessageis attempted".What reproduces — all four show identical silent drop
stopReason:"stop"with reply text, zero matrix-bridge handler activity in verbose log<sid>.jsonl+ 11 checkpoint files +sessions.json; new session id auto-created on next inbound)channels.matrix.streaming: "off"(Phoenix had the new"progress"mode)channels.matrix.blockStreaming: false(Phoenix hadtrue)So the regression isn't gated by:
progress-mode draft-stream path added in c33e578 (feat: add channel progress drafts)It's lower in the stack than any of those switches.
New signal — bookkeeping anomaly that fires on every dropped turn
The gateway's diagnostic liveness warning consistently shows the same work item in both
activeandqueuedfor every dropped turn, withlast=model_call:startedeven after the JSONL records the model call as complete:Same room, same age, both reading
last=model_call:started. The JSONL clearly records theassistantmessage withstopReason:"stop"for that work item — i.e. the model_call did complete — but the diagnostic tracker'slastevent for the matrix lane never advances pastmodel_call:started. If anything in the deliver path is gated on observing themodel_call:completedtransition for the matrix lane, that's a candidate explanation for the silent skip. (Readingextensions/matrix/src/matrix/monitor/handler.tsend-to-end didn't show such a gate, but I'm not confident I've fully traced the per-channel-work-tracker side.)Other smells worth flagging
compaction-safeguardfires on the very first turn of a fresh empty session. Log:Compaction safeguard: no real conversation messages to summarize; writing compaction boundary to suppress re-trigger loop.Repro: archive all session files, restart, send one ping → safeguard fires while processing that ping. The safeguard's name implies it's a fallback for re-trigger loops on bloated sessions; firing on a 2-message session with empty JSONL suggests its trigger condition is too eager./tmp/openclaw/openclaw-YYYY-MM-DD.log) is empty of matrix-handler activity for the dropped turns. Zero hits forsendMessage,sendEvent,m.room.message,deliverMatrixReplies, or any matrix-bridge delivery step. Either the deliver callback inextensions/matrix/src/matrix/monitor/handler.ts(line ~1739 in 2026.5.4) isn't being invoked at all, or it returns before any logged step.eventLoopDelayMaxMs2.4-5.4s,eventLoopUtilization0.36-0.67 — same regression class as [Bug]: Regression in OpenClaw 2026.5.4 / 2026.5.3-1: gateway status handler stalls ~50s, event loop degraded, Discord heartbeat timeouts #77995 but with the silent-dispatch-drop manifestation instead of channel timeouts. (Note: this surfaces even on a fresh empty session, so it's not purely session-bloat-driven.)Reproducer for triage
If you can stand up an unencrypted Matrix room with synapse, the repro is straightforward:
46c99cff0b2for useopenclaw@2026.5.4.accessToken,groupPolicy: "open", bot joined, room not E2EE.matrix-js-sdkdebug logging on (localStorage.setItem('mx_log', '*')equivalent for node, or the gateway's verbose log file).Pingaddressed to the bot.{role:"assistant", stopReason:"stop", text:"…"}~30s later.sendEvent of type m.room.messagelog line emits.client.sendMessagein a one-shot script.What I can do to help
This VM is available for live triage. Happy to:
OPENCLAW_LOG_LEVEL=debug(or whatever the right env var is — pointer welcome) and ship the resulting log.I'll keep digging from this side and update if I narrow further.
snowmirage commentedon May 6, 2026
Resolution — not a bug, configuration gap
Closing the loop on this. The original diagnosis was wrong: this is not a 2026.5.3-1 matrix wrapper-layer regression. The actual root cause is a config gap exposed by skipping over the version where the relevant default landed.
Root cause
messages.visibleReplieswas added in v2026.4.29 (commite1fd27fb24 feat(messages): add global visible replies mode) with a group-chat default of"message_tool_only". We had been on v2026.4.24 and jumped directly to v2026.5.3-1, skipping the version where the default landed. Withmessages.visibleRepliesunset and the test room being a group chat, the default flipped us silently from "automatic-reply" to "message-tool-only" semantics.Trace through
src/auto-reply/reply/source-reply-delivery-mode.ts:73:chatType === "group"cfg.messages?.groupChat?.visibleReplies ?? cfg.messages?.visibleReplies→undefinedmode = configuredMode === "automatic" ? "automatic" : "message_tool_only"→"message_tool_only"suppressAutomaticSourceDelivery = truesuppressDelivery = trueThen in
src/auto-reply/reply/dispatch-from-config.ts:replyResultfromreplyResolver(...)→undefined(the agent runs and produces text into the JSONL but the reply pipeline returns nothing because automatic delivery is suppressed)replies = []dispatcher.sendFinalReply/dispatcher.sendBlockReplynever firedelivercallback inextensions/matrix/src/matrix/monitor/handler.tsis never invokedPUT /_matrix/client/v3/rooms/.../send/m.room.message/...is emittedVerification
Confirmed with two rounds of bundle instrumentation on the live VM:
delivercallback atdist/monitor-kFXE6pqL.js:2902(deliver: async (payload, info) => {...}) to log entry. Zero hits across 10+ hours of uptime — confirms the callback was never called.dist/dispatch-C8IbdPmU.js:975(right afterconst replies = replyResult ? Array.isArray(...) : [...] : [];) to logreplyResult-type,replies-len,suppressDelivery, and the first reply's shape. Captured:replyResult-type=undefined replies-len=0 suppressDelivery=true firstReply=none.Then set
messages.visibleReplies: "automatic"in~/.openclaw/openclaw.json, restarted the gateway, sent the test ping. Reply landed in 12s. Same instrument fired withkind=block text="Pong, Sir. ..." suppressDelivery=false. End of regression.Why we initially called this a wrapper-layer bug
stopReason: "stop".outcome=completed duration=Xmsandsession state: ... reason="run_completed"— which read as "the turn finished successfully", reinforcing the impression that something was eating the dispatch step after the runtime considered the turn done.The combination — completed-from-runtime-perspective + zero matrix-bridge activity + zero error signal — strongly read as "the wrapper is silently swallowing". In reality, suppressDelivery is a deliberate gate that's expected to leave the matrix dispatch lane untouched; from the outside it looks indistinguishable from a silent drop.
Suggested upstream improvements (optional, non-blocking)
The bug is fixed on our side, but the diagnosis took ~6 working hours of bundle-patching and config sweeps. A few lightweight upstream changes would have shortened it considerably:
doctorwarning whenmessages.visibleRepliesresolves to"message_tool_only"(default or explicit) AND nomessagetool is registered for the agent's tool policy. That combination produces a silent group-chat dropout that's invisible in any log. Sample text: "Group/channel agent replies will be suppressed: messages.visibleReplies=message_tool_only and nomessagetool is registered. Set messages.visibleReplies=automatic or register a message tool."suppressDelivery=trueis the reason a reply payload is dropped at the dispatcher's reply-iteration loop. Currently the runtime emitsoutcome=completed; a one-linesuppressDelivery: <reason> for <channel>:<chatId>at the moment the for-loop is skipped would be diagnosable from the verbose log alone.visibleRepliesgroup default is"message_tool_only"— i.e., behavior changed for anyone who upgraded across this version without setting the key explicitly. Not visible in the current changelog summary for that release.Happy to send a PR for any of these if useful — let me know which (if any) you'd want.
Closing
Issue can be closed as not-an-upstream-bug. Phoenix-side fix is in snowmirage/phoenix#852. Apologies for the noise on the original report — the empirical signal made it look like a runtime bug, and we were confident enough in that read to file it; turned out to be hubris. Thanks to clawsweeper for the careful path-tracing review that kept the issue open while we kept digging.