-
-
Notifications
You must be signed in to change notification settings - Fork 52.8k
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
atrix channel ignores session reasoningLevel: "off" setting and continues to deliver reasoning blocks (prefixed with "🔴 Reasoning:"), while the WebUI correctly hides them.
Steps to reproduce
- Start OpenClaw with Matrix channel enabled
- Send any message to trigger a response
- Run
/reasoning offin Matrix — confirms "Reasoning visibility disabled" - Send another message
- Reasoning blocks still appear in Matrix client (e.g., Element)
- Open WebUI (http://127.0.0.1:18789) — reasoning is correctly hidden there
Expected behavior
When reasoningLevel: "off" is set (via /reasoning off or in session config), reasoning blocks should NOT be delivered to Matrix — same behavior as WebUI.
Actual behavior
- WebUI: Respects
reasoningLevel: "off"✓ - Matrix: Ignores setting, delivers "🔴 Reasoning:" blocks anyway ✗
OpenClaw version
2026.2.22
Operating system
linux
Install method
docker
Logs, screenshots, and evidence
The session correctly stores `reasoningLevel: "off"`:
{
"reasoningLevel": "off",
"thinkingLevel": null
}
The delivery code checks `includeReasoning: reasoningMode === "on"` but the Matrix extension's delivery path appears to bypass or ignore this check.
Additionally, `/reasoning off` may have a secondary bug: when reasoning is set to "off", the code **deletes** the field (`delete sessionEntry.reasoningLevel`) rather than setting it explicitly to `"off"`. This causes the default model-based reasoning level to kick in for models that support reasoning (like Claude Opus).
Relevant code path (`reply-DW3JcvGm.js`):
let resolvedReasoningLevel = directives.reasoningLevel ?? sessionEntry?.reasoningLevel ?? "off";
if (!(directives.reasoningLevel !== void 0 || sessionEntry?.reasoningLevel !== void 0 && sessionEntry?.reasoningLevel !== null) && resolvedReasoningLevel === "off")
resolvedReasoningLevel = await modelState.resolveDefaultReasoningLevel();
When `sessionEntry.reasoningLevel` is `null` (deleted), `resolveDefaultReasoningLevel()` returns `"on"` for reasoning-capable models.
Configuration:
{
channels: {
matrix: {
enabled: true,
homeserver: "https://matrix.org",
userId: "@<redacted>:matrix.org",
dm: {
policy: "allowlist",
allowFrom: ["@<redacted>:matrix.org"]
}
}
},
agents: {
defaults: {
thinkingDefault: "low",
verboseDefault: "off"
}
}
}
### Workaround attempted
Manually setting `reasoningLevel: "off"` (string, not null) in the session JSON file and restarting gateway — did not resolve the issue for Matrix delivery.Impact and severity
Medium-High — Reasoning blocks clutter the Matrix chat, making it difficult to read responses. Users are forced to use WebUI instead of their preferred Matrix client.
Additional information
Proposed fix
- Matrix extension should check
resolvedReasoningLevelbefore delivering reasoning blocks /reasoning offcommand should setreasoningLevel: "off"explicitly rather than deleting the field- Consider adding
channels.matrix.includeReasoning: falseconfig option as a channel-level override
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working