Skip to content

Commit 1e5450f

Browse files
authored
fix(messages): keep group visible replies automatic by default (#83498)
* fix(messages): keep group visible replies automatic by default * fix(messages): keep unauthorized slash turns quiet * fix(messages): return boolean from slash guard * test(messages): narrow visible reply fixtures * test(messages): align completion delivery default
1 parent 5a7d311 commit 1e5450f

23 files changed

Lines changed: 160 additions & 138 deletions

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Docs: https://docs.openclaw.ai
4040

4141
- Codex app-server: preserve network access for sandboxed Codex code-mode turns when the OpenClaw sandbox allows outbound egress. Fixes #83347. Thanks @YusukeIt0.
4242
- QA-Lab: keep the OTLP smoke decoder independent of removed OpenTelemetry generated-root internals.
43+
- Messages: default group/channel visible replies to automatic final delivery again, keeping `message_tool` opt-in for ambient/shared rooms and tool-reliable models.
4344
- Agents/code mode: preserve agent, session, run, and channel context in `before_tool_call` hooks for top-level `exec`/`wait` dispatches. Fixes #83387.
4445
- Replies: keep final payload delivery after live preview updates so channels can finalize or send the completed answer instead of losing preview-only drafts. (#83468)
4546
- Discord: deliver final replies in progress-mode preview streams instead of deduplicating the final visible message. (#83443) Thanks @compoodment.

docs/channels/ambient-room-events.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ The agent-specific `agents.list[].groupChat.unmentionedInbound` value overrides
176176

177177
## Visible reply modes
178178

179-
`messages.groupChat.visibleReplies: "message_tool"` is the recommended group and channel default. It lets the agent decide when to speak by calling the message tool. If the model returns final text without calling the tool, OpenClaw keeps that final text private and logs suppressed delivery metadata.
179+
`messages.groupChat.visibleReplies` defaults to `"automatic"` for normal group/channel user requests. Keep that default when you want final assistant text to post visibly without requiring an explicit message-tool call.
180180

181-
Use `messages.groupChat.visibleReplies: "automatic"` only when you want legacy behavior where normal group requests post final assistant text automatically.
181+
For ambient always-on rooms, `messages.groupChat.visibleReplies: "message_tool"` is still recommended, especially with latest-generation, tool-reliable models such as GPT 5.5. It lets the agent decide when to speak by calling the message tool. If the model returns final text without calling the tool, OpenClaw keeps that final text private and logs suppressed delivery metadata.
182182

183183
Room events stay strict even when other group requests use automatic replies. Unmentioned ambient room events still require `message(action=send)` for visible output.
184184

@@ -198,7 +198,7 @@ If the room shows typing or token usage but no visible message:
198198
2. Confirm `requireMention: false` is set at the room level you expect.
199199
3. Check whether `messages.groupChat.unmentionedInbound` or the agent override is `"room_event"`.
200200
4. Inspect logs for suppressed final payload metadata or `didSendViaMessagingTool: false`.
201-
5. Use a model/runtime that reliably calls tools, or set `messages.groupChat.visibleReplies: "automatic"` for legacy final replies on normal group requests.
201+
5. For normal group requests, keep or restore `messages.groupChat.visibleReplies: "automatic"` if you want final replies posted automatically. For ambient rooms using `message_tool`, use a model/runtime that reliably calls tools.
202202

203203
If Telegram ambient rooms do not trigger at all, check BotFather privacy mode and verify the Gateway is receiving normal group messages.
204204

docs/channels/discord.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,9 @@ Once DMs are working, you can set up your Discord server as a full workspace whe
250250
<Step title="Allow responses without @mention">
251251
By default, your agent only responds in guild channels when @mentioned. For a private server, you probably want it to respond to every message.
252252

253-
In guild channels, visible Discord output should use the `message` tool by default, so the agent can lurk and only post when it decides a channel reply is useful. Ambient room events stay quiet unless the tool sends. See [Ambient room events](/channels/ambient-room-events) for the full lurk-mode config.
253+
In guild channels, normal replies post automatically by default. For shared always-on rooms, opt into `messages.groupChat.visibleReplies: "message_tool"` so the agent can lurk and only post when it decides a channel reply is useful. This works best with latest-generation, tool-reliable models such as GPT 5.5. Ambient room events stay quiet unless the tool sends. See [Ambient room events](/channels/ambient-room-events) for the full lurk-mode config.
254254

255-
This means the selected model should reliably call tools. If Discord shows typing and the logs show token usage but no posted message, check whether the turn was configured as an ambient room event or use the config below to restore legacy automatic final replies for normal group requests.
255+
If Discord shows typing and the logs show token usage but no posted message, check whether the turn was configured as an ambient room event or opted into message-tool visible replies.
256256

257257
<Tabs>
258258
<Tab title="Ask your agent">
@@ -275,7 +275,7 @@ Once DMs are working, you can set up your Discord server as a full workspace whe
275275
}
276276
```
277277

278-
To restore legacy automatic final replies for group/channel rooms, set `messages.groupChat.visibleReplies: "automatic"`.
278+
To require message-tool sends for visible group/channel replies, set `messages.groupChat.visibleReplies: "message_tool"`.
279279

280280
</Tab>
281281
</Tabs>

docs/channels/group-messages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Only the owner number (from `channels.whatsapp.allowFrom`, or the bot's own E.16
8686
- Heartbeats are intentionally skipped for groups to avoid noisy broadcasts.
8787
- Echo suppression uses the combined batch string; if you send identical text twice without mentions, only the first will get a response.
8888
- Session store entries will appear as `agent:<agentId>:whatsapp:group:<jid>` in the session store (`~/.openclaw/agents/<agentId>/sessions/sessions.json` by default); a missing entry just means the group hasn't triggered a run yet.
89-
- Typing indicators in groups follow `agents.defaults.typingMode`. When visible replies use the default message-tool-only mode, typing starts immediately by default so group members can see the agent is working even if no automatic final reply is posted. Explicit typing-mode config still wins.
89+
- Typing indicators in groups follow `agents.defaults.typingMode`. When visible replies are opted into message-tool-only mode, typing starts immediately by default so group members can see the agent is working even if no automatic final reply is posted. Explicit typing-mode config still wins.
9090

9191
## Related
9292

docs/channels/groups.md

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,9 @@ always-on group chatter -> user request, or room event when configured
4343

4444
## Visible replies
4545

46-
For group/channel rooms, OpenClaw defaults to `messages.groupChat.visibleReplies: "message_tool"`.
47-
`openclaw doctor --fix` writes this default into configured-channel configs that omit it.
48-
That means the agent still processes the turn and can update memory/session state, and it should speak visibly with `message(action=send)` when it has a room reply. If the model misses that tool and returns substantive final text, OpenClaw keeps that final text private instead of posting it to the room.
49-
50-
This default depends on a model/runtime that reliably calls tools. If logs show
51-
assistant text but `didSendViaMessagingTool: false`, the model answered
52-
privately instead of calling the message tool. The room stays silent, and the
53-
gateway verbose log records the suppressed final payload metadata. That is not
54-
a Discord/Slack/Telegram send failure, but a tool-discipline signal. Use a
55-
tool-call-reliable model for group/channel sessions, or set
56-
`messages.groupChat.visibleReplies: "automatic"` when you want all visible group
57-
replies to use the legacy final-reply path.
46+
For normal group/channel requests, OpenClaw defaults to `messages.groupChat.visibleReplies: "automatic"`. Final assistant text posts through the legacy visible reply path unless you opt the room into message-tool-only output.
47+
48+
Use `messages.groupChat.visibleReplies: "message_tool"` when a shared room should let the agent decide when to speak by calling `message(action=send)`. This works best for group rooms backed by latest-generation, tool-reliable models such as GPT 5.5. If the model misses that tool and returns substantive final text, OpenClaw keeps that final text private instead of posting it to the room.
5849

5950
If the message tool is unavailable under the active tool policy, OpenClaw falls
6051
back to automatic visible replies instead of silently suppressing the response.
@@ -82,13 +73,13 @@ The default is `unmentionedInbound: "user_request"`.
8273

8374
Mentioned messages, commands, abort requests, and DMs stay user requests.
8475

85-
To restore legacy automatic final replies for group/channel requests:
76+
To require visible output to go through the message tool for group/channel requests:
8677

8778
```json5
8879
{
8980
messages: {
9081
groupChat: {
91-
visibleReplies: "automatic",
82+
visibleReplies: "message_tool",
9283
},
9384
},
9485
}

docs/channels/slack.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ Primary reference: [Configuration reference - Slack](/gateway/config-channels#sl
13811381
- channel allowlist (`channels.slack.channels`) — **keys must be channel IDs** (`C12345678`), not names (`#channel-name`). Name-based keys silently fail under `groupPolicy: "allowlist"` because channel routing is ID-first by default. To find an ID: right-click the channel in Slack → **Copy link** — the `C...` value at the end of the URL is the channel ID.
13821382
- `requireMention`
13831383
- per-channel `users` allowlist
1384-
- `messages.groupChat.visibleReplies`: if it is `"message_tool"` and logs show assistant text with no `message(action=send)` call, the model missed the visible message-tool path. Final text stays private in this mode; inspect the gateway verbose log for suppressed payload metadata, or set it to `"automatic"` if you want every normal assistant final reply posted through the legacy path.
1384+
- `messages.groupChat.visibleReplies`: normal group/channel requests default to `"automatic"`. If you opted into `"message_tool"` and logs show assistant text with no `message(action=send)` call, the model missed the visible message-tool path. Final text stays private in this mode; inspect the gateway verbose log for suppressed payload metadata, or set it to `"automatic"` if you want every normal assistant final reply posted through the legacy path.
13851385
- `messages.groupChat.unmentionedInbound`: if it is `"room_event"`, unmentioned allowed channel chatter is ambient context and stays silent unless the agent calls the `message` tool. See [Ambient room events](/channels/ambient-room-events).
13861386

13871387
```json5

docs/channels/troubleshooting.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ Full troubleshooting: [Telegram troubleshooting](/channels/telegram#troubleshoot
8080

8181
### Discord failure signatures
8282

83-
| Symptom | Fastest check | Fix |
84-
| ----------------------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
85-
| Bot online but no guild replies | `openclaw channels status --probe` | Allow guild/channel and verify message content intent. |
86-
| Group messages ignored | Check logs for mention gating drops | Mention bot or set guild/channel `requireMention: false`. |
87-
| Typing/token usage but no Discord message | Check whether this is an ambient room event or a missed `message(action=send)` call | Inspect the gateway verbose log for suppressed final payload metadata, verify `messages.groupChat.unmentionedInbound`, read [Ambient room events](/channels/ambient-room-events), or set `messages.groupChat.visibleReplies: "automatic"` to use the legacy final-reply path for normal group requests. |
88-
| DM replies missing | `openclaw pairing list discord` | Approve DM pairing or adjust DM policy. |
83+
| Symptom | Fastest check | Fix |
84+
| ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
85+
| Bot online but no guild replies | `openclaw channels status --probe` | Allow guild/channel and verify message content intent. |
86+
| Group messages ignored | Check logs for mention gating drops | Mention bot or set guild/channel `requireMention: false`. |
87+
| Typing/token usage but no Discord message | Check whether this is an ambient room event or an opted-in `message_tool` room where the model missed `message(action=send)` | Inspect the gateway verbose log for suppressed final payload metadata, verify `messages.groupChat.unmentionedInbound`, read [Ambient room events](/channels/ambient-room-events), or keep `messages.groupChat.visibleReplies: "automatic"` for normal group requests. |
88+
| DM replies missing | `openclaw pairing list discord` | Approve DM pairing or adjust DM policy. |
8989

9090
Full troubleshooting: [Discord troubleshooting](/channels/discord#troubleshooting)
9191

docs/gateway/config-channels.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -787,15 +787,15 @@ See the full channel index: [Channels](/channels).
787787

788788
Group messages default to **require mention** (metadata mention or safe regex patterns). Applies to WhatsApp, Telegram, Discord, Google Chat, and iMessage group chats.
789789

790-
Visible replies are controlled separately. Group/channel rooms default to `messages.groupChat.visibleReplies: "message_tool"`: OpenClaw still processes the turn and asks the agent to use `message(action=send)` for visible room output. If the model returns final text without calling the message tool, that final text stays private and the gateway verbose log records suppressed payload metadata. Set `"automatic"` when you want all visible group replies to use the legacy final-reply path. To apply the same tool-only visible-reply behavior to direct chats too, set `messages.visibleReplies: "message_tool"`; the Codex harness also uses that tool-only behavior as its unset direct-chat default.
790+
Visible replies are controlled separately. Normal group/channel requests default to `messages.groupChat.visibleReplies: "automatic"`: final assistant text posts through the legacy visible reply path. Set `"message_tool"` when a shared room should only post visible output after the agent calls `message(action=send)`. If the model returns final text without calling the message tool, that final text stays private and the gateway verbose log records suppressed payload metadata. To apply the same tool-only visible-reply behavior to direct chats too, set `messages.visibleReplies: "message_tool"`; the Codex harness also uses that tool-only behavior as its unset direct-chat default.
791791

792-
Tool-only visible replies require a model/runtime that reliably calls tools. If
792+
Tool-only visible replies require a model/runtime that reliably calls tools, and are recommended for shared ambient rooms on latest-generation models such as GPT 5.5. If
793793
the session log shows assistant text with `didSendViaMessagingTool: false`, the
794794
model produced private final text instead of calling the message tool. Switch
795795
to a stronger tool-calling model for that channel, inspect the gateway verbose
796796
log for the suppressed payload summary, or set
797-
`messages.groupChat.visibleReplies: "automatic"` to use legacy visible final
798-
replies for every group/channel request.
797+
`messages.groupChat.visibleReplies: "automatic"` to use visible final replies
798+
for every group/channel request.
799799

800800
If the message tool is unavailable under the active tool policy, OpenClaw falls back to automatic visible replies instead of silently suppressing the response. `openclaw doctor` warns about this mismatch.
801801

@@ -814,7 +814,7 @@ The gateway hot-reloads `messages` config after the file is saved. Restart only
814814
groupChat: {
815815
historyLimit: 50,
816816
unmentionedInbound: "room_event", // always-on unmentioned room chatter becomes quiet context
817-
visibleReplies: "message_tool", // default; use "automatic" for legacy final replies
817+
visibleReplies: "message_tool", // opt-in; require message(action=send) for visible room replies
818818
},
819819
},
820820
agents: {

docs/gateway/configuration-examples.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Save to `~/.openclaw/openclaw.json` and you can DM the bot from that number.
5151
messages: {
5252
visibleReplies: "automatic",
5353
groupChat: {
54-
visibleReplies: "message_tool", // default; visible output requires message(action=send)
54+
visibleReplies: "message_tool", // opt-in; visible output requires message(action=send)
5555
unmentionedInbound: "room_event",
5656
},
5757
},
@@ -111,7 +111,7 @@ Save to `~/.openclaw/openclaw.json` and you can DM the bot from that number.
111111
ackReactionScope: "group-mentions",
112112
groupChat: {
113113
historyLimit: 50,
114-
visibleReplies: "message_tool", // prefer message tool; final text falls back for normal requests
114+
visibleReplies: "message_tool", // opt in for shared rooms with tool-reliable models
115115
unmentionedInbound: "room_event",
116116
},
117117
queue: {

0 commit comments

Comments
 (0)