openclaw - ✅(Solved) Fix [Bug]: Command replies silently dropped in group chats when visibleReplies is set to message_tool [1 pull requests, 5 comments, 6 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#77260Fetched 2026-05-05 05:50:34
View on GitHub
Comments
5
Participants
6
Timeline
11
Reactions
3
Author
Timeline (top)
commented ×5cross-referenced ×2labeled ×2mentioned ×1

When messages.groupChat.visibleReplies is set to "message_tool", slash command replies (e.g. /new, /status) are silently dropped instead of being delivered to the group chat.

Worked previously with the same setup in version v2026.4.25, any version after this the commands get dropped in matrix.

Root Cause

commands.log confirms /new is received and processed — session resets happen but no reply is delivered
The root cause is in source-reply-delivery-mode-CaGAojK-.js, function resolveSourceReplyDeliveryMode:
For group chats, it returns "message_tool_only" when visibleReplies is not "automatic"
This sets suppressAutomaticSourceDelivery = true in resolveSourceReplyVisibilityPolicy
The only bypass is CommandSource === "native", which is false for Matrix text-prefix commands
In the web UI, command replies are not affected because the web UI uses a different reply dispatch path

Fix Action

Fix / Workaround

commands.log confirms /new is received and processed — session resets happen but no reply is delivered
The root cause is in source-reply-delivery-mode-CaGAojK-.js, function resolveSourceReplyDeliveryMode:
For group chats, it returns "message_tool_only" when visibleReplies is not "automatic"
This sets suppressAutomaticSourceDelivery = true in resolveSourceReplyVisibilityPolicy
The only bypass is CommandSource === "native", which is false for Matrix text-prefix commands
In the web UI, command replies are not affected because the web UI uses a different reply dispatch path

PR fix notes

PR #77325: fix(auto-reply): deliver text-prefix slash command replies visibly in groups (#77260)

Description (problem / solution / changelog)

### Summary

Reported by @awayspam in #77260: in v2026.5.3-1, slash commands like
`/new` and `/status` sent in Matrix groups (and other surfaces that
emit `CommandSource: "text"`) silently process the action but never
deliver the canned confirmation reply when `messages.groupChat.visibleReplies`
is set to `"message_tool"`. Worked in v2026.4.25.

`resolveSourceReplyDeliveryMode` exempts `CommandSource === "native"`
from the `message_tool_only` suppression so Slack/Mattermost slash-menu
replies stay visible. Matrix and Tlon set `CommandSource: "text"` for
every inbound message, so the bypass never triggers — the canned
command reply gets routed through `message_tool_only`, no message tool
runs, and the user never sees feedback even though the action ran.

### Fix

Replace the `CommandSource === "native"` exemption inside
`source-reply-delivery-mode.ts` and `dispatch-from-config.ts`'s
`prefersMessageToolDelivery` calculation with a shared
`isCommandSourceTurn(ctx)` predicate:

- `CommandSource === "native"` → exempt (unchanged behavior for
  Slack/Mattermost slash-menu replies).
- `CommandSource === "text"` AND the body starts with `/` → exempt.
  Matrix and Tlon set `CommandSource: "text"` for every inbound, so the
  body-starts-with-`/` requirement keeps normal user prose under the
  configured visibility policy while still letting the slash command
  reply through.
- Otherwise → no exemption.

`isCommandMessage(ctx.CommandBody ?? ctx.Body ?? "")` reuses the existing
`commands-registry.ts` predicate to detect slash-prefix bodies, so the
exemption matches the same set of inputs that `runCommands` will execute.

### Tests

`src/auto-reply/reply/source-reply-delivery-mode.test.ts` adds:

- `isCommandSourceTurn` describe block: 4 cases proving the predicate is
  true for native (any body), true for text + `/`-prefix, false for
  text + non-slash body, and false for empty/missing CommandSource.
- `resolveSourceReplyDeliveryMode`: a regression case for the exact
  reported scenario (Matrix `/new` with `visibleReplies: "message_tool"`),
  a counter-case proving non-command Matrix/Tlon prose stays under
  `message_tool_only`, and a CommandBody-fallback-to-Body case.
- `resolveSourceReplyVisibilityPolicy`: regression case mirroring the
  reporter's scenario at the policy layer (suppressDelivery → false,
  deliverySuppressionReason → ""), and a counter-case for prose under
  `visibleReplies = "message_tool"` (suppressDelivery still true).

All 26 tests in the file pass; 101 tests in the adjacent
`dispatch-from-config.test.ts` pass after the predicate is wired into
`prefersMessageToolDelivery`.

### Reproduction

1. `messages.groupChat.visibleReplies: "message_tool"` in `openclaw.json`.
2. Send `/new` in a Matrix group.
3. Before this PR: action runs (session resets, command logged), no
   visible reply in the channel.
4. After this PR: canned `"✅ New session started."` reply lands in
   the channel.

Native (Slack/Mattermost slash-menu) command replies and normal user
prose on Matrix/Tlon are unchanged.

### Verification

- `pnpm test src/auto-reply/reply/source-reply-delivery-mode.test.ts src/auto-reply/reply/dispatch-from-config.test.ts src/auto-reply/reply/get-reply-inline-actions.skip-when-config-empty.test.ts` → 141/141 pass (clawsweeper acceptance criteria).
- `pnpm test:changed` → 6416/6416 pass (one unrelated import-only suite failure on `web-tree-sitter` — pre-existing local env issue).
- `pnpm exec oxfmt --check --threads=1 src/auto-reply/reply/source-reply-delivery-mode.ts src/auto-reply/reply/source-reply-delivery-mode.test.ts src/auto-reply/reply/dispatch-from-config.ts` → clean.

Fixes #77260.

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/auto-reply/reply/dispatch-from-config.ts (modified, +5/-2)
  • src/auto-reply/reply/source-reply-delivery-mode.test.ts (modified, +154/-0)
  • src/auto-reply/reply/source-reply-delivery-mode.ts (modified, +26/-1)

Code Example

commands.log confirms /new is received and processed — session resets happen but no reply is delivered
The root cause is in source-reply-delivery-mode-CaGAojK-.js, function resolveSourceReplyDeliveryMode:
For group chats, it returns "message_tool_only" when visibleReplies is not "automatic"
This sets suppressAutomaticSourceDelivery = true in resolveSourceReplyVisibilityPolicy
The only bypass is CommandSource === "native", which is false for Matrix text-prefix commands
In the web UI, command replies are not affected because the web UI uses a different reply dispatch path
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

When messages.groupChat.visibleReplies is set to "message_tool", slash command replies (e.g. /new, /status) are silently dropped instead of being delivered to the group chat.

Worked previously with the same setup in version v2026.4.25, any version after this the commands get dropped in matrix.

Steps to reproduce

Set messages.groupChat.visibleReplies: "message_tool" in the config Send /new in a Matrix group chat Observe: no confirmation reply appears in the channel

Expected behavior

The confirmation reply (e.g. "✅ New session started.") should appear in the group chat. Command results are system responses, not AI-generated content — the visibleReplies delivery mode should not suppress them.

Actual behavior

No reply is delivered. The command processes correctly (session resets, the action is logged) but the user receives no feedback.

OpenClaw version

v2026.5.3-1

Operating system

Debian 13

Install method

npm global install

Model

N/A (framework-level, occurs before any model is invoked)

Provider / routing chain

N/A

Additional provider/model setup details

No response

Logs, screenshots, and evidence

commands.log confirms /new is received and processed — session resets happen but no reply is delivered
The root cause is in source-reply-delivery-mode-CaGAojK-.js, function resolveSourceReplyDeliveryMode:
For group chats, it returns "message_tool_only" when visibleReplies is not "automatic"
This sets suppressAutomaticSourceDelivery = true in resolveSourceReplyVisibilityPolicy
The only bypass is CommandSource === "native", which is false for Matrix text-prefix commands
In the web UI, command replies are not affected because the web UI uses a different reply dispatch path

Impact and severity

Users in group chats with visibleReplies: "message_tool" get no visual feedback for any slash command (/new, /status, /list, etc.). The commands work but appear to do nothing from the user's perspective. This affects all non-native-command channels (Matrix, Telegram, WhatsApp, etc.) where commands are sent as text messages rather than platform slash commands.

Additional information

The fix should make pre-canned command/system replies bypass the visibleReplies suppression, not just CommandSource === "native". Command results are distinct from AI-generated content and should always be delivered regardless of the visibleReplies config.

extent analysis

TL;DR

Update the resolveSourceReplyDeliveryMode function to bypass visibleReplies suppression for pre-canned command replies.

Guidance

  • Review the resolveSourceReplyDeliveryMode function in source-reply-delivery-mode-CaGAojK-.js to understand how it returns "message_tool_only" when visibleReplies is not "automatic".
  • Modify the resolveSourceReplyVisibilityPolicy to set suppressAutomaticSourceDelivery to false for pre-canned command replies, regardless of the visibleReplies config.
  • Add a condition to check if the reply is a pre-canned command reply and bypass the suppression if true.
  • Test the changes with different visibleReplies configurations to ensure command replies are delivered correctly.

Example

// Example modification to resolveSourceReplyVisibilityPolicy
if (isPreCannedCommandReply) {
  suppressAutomaticSourceDelivery = false;
}

Notes

The fix should target the resolveSourceReplyDeliveryMode function and ensure that pre-canned command replies are not suppressed by the visibleReplies config. The exact implementation may vary depending on the surrounding code.

Recommendation

Apply a workaround by modifying the resolveSourceReplyDeliveryMode function to bypass visibleReplies suppression for pre-canned command replies, as this will provide immediate relief for the affected users.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The confirmation reply (e.g. "✅ New session started.") should appear in the group chat. Command results are system responses, not AI-generated content — the visibleReplies delivery mode should not suppress them.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING