Repository navigation
Description
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
Matrix channel credential probes can report ok: true for an invalid access token when userId is configured, because the configured identity bypasses authenticated /account/whoami resolution.
Steps to reproduce
- Configure a Matrix account with a homeserver, a
userId, and an invalid access token. - Run the Matrix account probe through
openclaw channels status --probe. - Observe that the probe client is seeded with the configured
userId, so its wrappergetUserId()returns that local value without calling/account/whoami. - The probe returns
ok: trueeven though the token cannot authenticate.
The focused regression reproduces this by modeling the Matrix wrapper contract: a seeded identity resolves locally, while an unseeded identity attempts authenticated resolution and receives HTTP 401.
Expected behavior
The probe must authenticate the access token through /account/whoami. Invalid tokens return ok: false with status/error, valid matching identities return ok: true, and a valid token belonging to a different configured user returns ok: false.
Actual behavior
With a configured userId, the probe trusts the local identity getter and returns ok: true without authenticating the token.
OpenClaw version
Current main at e44dde218f1629d87f585bf8bfeabda85e1a21f3.
Operating system
macOS 26.6.1 (25G76)
Install method
Source checkout (pnpm workspace)
Model
N/A — channel status probe; no model request.
Provider / routing chain
OpenClaw Matrix plugin → local controlled Matrix HTTP endpoint.
Additional provider/model setup details
No provider or model route is involved. The controlled proof uses only synthetic access-token strings and sends no Matrix messages.
Logs
Before: Matrix probe regression 1 failed / 7 because the authenticated identity path was never reached.
After: Matrix probe 7/7; Matrix account paths 2/2; Gateway channel status 15/15.
Controlled HTTP proof:
- invalid token: ok=false, status=401, error="Invalid access token"
- valid matching identity: ok=true, userId=@bot:example.org
- valid mismatched identity: ok=false, error="Matrix access token user does not match configured userId"
- observed requests: 3 GET /_matrix/client/v3/account/whoami; sends=0
Screenshots, recordings, and evidence
Dependency contract: [email protected] getUserId() returns the configured credential identity, while whoami() performs the authenticated request.
Impact and severity
- Affected: operators using Matrix accounts with configured
userIdvalues. - Severity: medium; explicit credential health checks can be false-green.
- Frequency: deterministic whenever the configured token is invalid but
userIdis present. - Consequence: operators can be told the Matrix channel works even though authenticated Matrix operations fail.
Additional information
The defect was made visible by the shared channel probe runner refactor in #113540. The repair belongs entirely to the Matrix plugin probe and requires no core status policy, configuration, public SDK, auth storage, migration, or dependency changes.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Aug 14, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 14, 2026, 2:36 PM ET / 18:36 UTC.
Summary
Keep open: current main still lets the Matrix probe report success without authenticating a configured token, and the focused linked repair PR is the existing fix path. The
maintainerlabel also requires human handling rather than automated closure.Reproducibility: yes. —current source provides a high-confidence path: configure a Matrix user ID and invalid token, then run the live channel probe; the probe seeds and returns the local identity before its whoami branch.
Root-cause cluster
Relationship:
canonicalCanonical: #123763
Summary: This issue is the canonical report; the linked open Matrix repair PR is its focused fix candidate.
Members:
fixed_by_candidate: fix(matrix): reject invalid tokens when userId is configured #123766 - Its supplied closing reference and described patch directly remove the locally seeded probe identity and verify authenticated identity.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Next step
The linked open repair PR already owns the focused change, and this issue’s maintainer label prevents an automated duplicate repair lane.
Review details
Best possible solution:
Land the focused owner-plugin repair at #123766, preserving an authenticated whoami check and configured-versus-authenticated identity comparison, then close this issue through the linked relationship.
Do we have a high-confidence way to reproduce the issue?
Yes—current source provides a high-confidence path: configure a Matrix user ID and invalid token, then run the live channel probe; the probe seeds and returns the local identity before its whoami branch.
Is this the best way to solve the issue?
Yes—the linked repair targets the Matrix probe owner, while keeping normal setup behavior intact; changing shared channel-status policy or globally forcing whoami would be broader and incorrect.
AGENTS.md: found and applied where relevant.
Codex review notes: model internal, reasoning high; reviewed against 0bdf11c9dc51.
Label changes
Label justifications:
P2: A deterministic false-green credential probe affects Matrix operators but has bounded channel-specific blast radius.impact:auth-provider: The failure concerns Matrix access-token authentication and identity validation.Evidence reviewed
What I checked:
extensions/matrix/src/matrix/probe.ts:55, 0bdf11c9dc51)extensions/matrix/src/matrix/sdk/client-core.ts:41, 0bdf11c9dc51)extensions/matrix/src/matrix/sdk/client-base.ts:200, 0bdf11c9dc51)src/commands/channels/status.runtime.ts:174, 0bdf11c9dc51)extensions/matrix/src/matrix/client.test.ts:482, 0bdf11c9dc51)extensions/matrix/src/matrix/probe.ts:53, 83d53044a4a3)Likely related people:
extensions/matrix/src/matrix/probe.ts,extensions/matrix/src/matrix/sdk/client-core.ts,extensions/matrix/src/matrix/sdk/client-base.ts)extensions/matrix/src/matrix/probe.ts)extensions/matrix/src/matrix/probe.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.