Repository navigation
Description
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
On OpenClaw 2026.5.28, an E2EE Matrix channel bound to an embedded (pi) agent intermittently fails to dispatch inbound DMs to the agent (~1 in 7), never delivers the agent's reply back to the room, and cannot complete cross-user SAS verification, while the homeserver serves all E2EE primitives correctly.
Steps to reproduce
- Self-hosted homeserver (tuwunel 1.7.0), LAN-only, federation off; bot account with E2EE bootstrapped (matrix encryption setup + verify bootstrap; verify status shows verified-by-owner, backup active, recovery key stored).
- Configure channels.matrix with the @openclaw/matrix plugin: encryption:true, autoJoin:"always", dm.policy:"open", bound via bindings to an embedded/pi agent.
- From a normal user, using a matrix-nio (0.25.2 + python-olm 3.2.16) client that trusts the bot device in code (client.verify_device), create a fresh encrypted DM, invite the bot (auto-joins), share the Megolm session, and send a message.
- Observe: the message is delivered and decryptable, but most sends produce no agent turn; when one does, no reply returns. Across 7 controlled runs (varied content, 12s settle delay, single room, fresh gateway restart): 1 dispatched, 0 replies.
- The same behavior reproduces through a real Element Web client.
Expected behavior
Every inbound DM in an allowed room is dispatched to the bound agent deterministically, and the agent's reply is delivered back to the (encrypted) room. A separate human user can verify the bot, or key-sharing works trust-on-first-use without verification.
Actual behavior
Inbound dispatch is intermittent: an encrypted DM reaches the bot and is decryptable, but only ~1 in 7 identical messages produces an agent turn; the rest are silently dropped (no agent invocation, no error logged). On the rare dispatched message, the agent's reply is never delivered back to the room (no [matrix] send line, no error). "[matrix] disabled" is logged at the end of provider startup every time, with encryption both true and false. Cross-user SAS verification (a human user ≠ bot owner verifying the bot) never completes: bot-initiated requests disappear from "verify list" almost immediately; user-initiated requests show "SAS data is not available" with the phase oscillating ready↔started.
OpenClaw version
2026.5.28
Operating system
Ubuntu 24.04
Install method
npm global (user-local), gateway run as a systemd --user service
Model
anthropic/claude-haiku-4.5
Provider / routing chain
matrix channel -> openclaw -> bound embedded/pi agent
Additional provider/model setup details
Bot connects to the homeserver locally over plaintext HTTP on 127.0.0.1:6167 (network.dangerouslyAllowPrivateNetwork:true). Homeserver is LAN-only with federation disabled.
Logs, screenshots, and evidence
Homeserver verified healthy independently of OpenClaw (raw client-server API + matrix-nio):
- sendToDevice relay works (user A -> user B delivered)
- bot device keys (curve25519 + ed25519) and cross-signing master/self-signing keys are published and visible to the user
- keys/claim returns a one-time key for both the bot and the user's Element device (both directions)
So an Olm session + Megolm key-share can be established at the protocol level; the homeserver serves every E2EE primitive the provider needs.Impact and severity
Affected: self-hosted Matrix channel users on 2026.5.28 (multi-user E2EE bot pattern).
Severity: blocks workflow — the channel cannot be used for interactive sessions.
Frequency: intermittent dispatch (~1 in 7); reply delivery and cross-user verification fail consistently (7 controlled runs: 1 dispatched, 0 replies).
Consequence: missed messages and failed multi-user onboarding; the channel is unusable for its intended purpose.
Additional information
Not a regression — no earlier working version; broken on first deployment at 2026.5.28.
Open questions for maintainers:
- Is the multi-user pattern (separate human users <-> one E2EE bot) supported, or only single-owner/self-verification today?
- What does "[matrix] disabled" at the end of provider startup indicate? It correlates with the non-ingesting state.
- Is there a config to share keys with / accept unverified devices (trust-on-first-use) to avoid cross-user verification?
- Is "matrix verify" expected to drive a verification held by the running gateway? Each invocation appears to start its own crypto client.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 1, 2026
Codex review: this still needs some work.
Summary
Keep this issue open: current main still omits Matrix DM configuration warnings, and an open closing PR owns the repair.
Reproducibility: Current source deterministically skips Matrix’s nested DM warning, and existing tests assert that omission; no current-main runtime reproduction was executed.
Root-cause cluster
Relationship:
canonicalCanonical: #89254
Summary: This issue owns the reporter-confirmed diagnostic gap, with one open closing repair candidate.
Members:
fixed_by_candidate: fix(matrix): warn when open DMs lack an allowlist wildcard #120143 - The open PR explicitly targets the missing Matrix DM warning and documentation.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Next step
Correct nested-field resolution in the existing fix PR, establish failing regressions for root and inherited account settings, and verify actionable Doctor guidance before landing.
Review details
Best possible solution:
Provide accurate Matrix configuration warnings with explicit sender or wildcard guidance and the existing Doctor recovery command.
Do we have a high-confidence way to reproduce the issue?
Current source deterministically skips Matrix’s nested DM warning, and existing tests assert that omission; no current-main runtime reproduction was executed.
Is this the best way to solve the issue?
The shared configuration diagnostic is the appropriate repair boundary, provided it follows Matrix’s canonical nested fields and inheritance without weakening sender admission.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning medium; reviewed against ddf0e4756b86.
Label changes
Label changes:
No label changes.
Label justifications:
P2: The remaining defect is a bounded diagnostic gap in an advanced Matrix configuration workflow with a confirmed workaround.impact:ux-friction: Operators must inspect verbose rejection traces or infer the missing allowlist requirement before an otherwise working channel responds.Evidence reviewed
What I checked:
src/config/validation-channel-rules.ts:138, 9e9048e0da47)src/config/validation.dm-policy.test.ts:170, 9e9048e0da47)src/channels/message-access/sender-gates.ts:68, 9e9048e0da47)src/commands/doctor/shared/open-policy-allowfrom.ts:20, 9e9048e0da47)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 explainto ask for more context, or@clawsweeper stopto stop active automation.Reviewed October 15, 2026, 10:26 PM ET / October 16, 2026, 02:26 UTC.
38 remaining items