Skip to content

fix(group-chat): default visibleReplies to automatic, not message_tool_only#77808

Closed
Marvinthebored wants to merge 1 commit into
openclaw:mainfrom
Marvinthebored:fix/group-chat-visible-replies-default
Closed

fix(group-chat): default visibleReplies to automatic, not message_tool_only#77808
Marvinthebored wants to merge 1 commit into
openclaw:mainfrom
Marvinthebored:fix/group-chat-visible-replies-default

Conversation

@Marvinthebored

Copy link
Copy Markdown
Contributor

Summary

  • resolveSourceReplyDeliveryMode had an inverted guard: it treated "automatic" as the only opt-in and silently mapped every unconfigured group/channel turn to message_tool_only
  • Any install without messages.groupChat.visibleReplies explicitly set — the default for most users — had automatic replies suppressed in Discord guild channels, Telegram groups, and WhatsApp groups
  • The bot appeared to receive and process messages normally; it just never posted a reply back to the channel, with no error logged

Root cause (src/auto-reply/reply/source-reply-delivery-mode.ts line 26):

// before (broken): undefined falls through to message_tool_only
return configuredMode === "automatic" ? "automatic" : "message_tool_only";

// after (fixed): only suppress when explicitly opted in
return configuredMode === "message_tool" ? "message_tool_only" : "automatic";

Workaround for affected users on 5.4:

openclaw config set messages.groupChat.visibleReplies automatic

Test plan

  • Updated unit tests in source-reply-delivery-mode.test.ts to assert automatic for unconfigured group/channel turns
  • Existing tests covering explicit "message_tool" opt-in and "automatic" override are unchanged and still pass
  • Verify Discord guild channel, Telegram group, and WhatsApp group replies restore without config changes on a clean install

🤖 Generated with Claude Code

…ge_tool_only

resolveSourceReplyDeliveryMode inverted the guard condition, making
"automatic" the only explicit opt-in and treating every unconfigured
group/channel turn as message_tool_only. This silently broke Discord
guild channels, Telegram groups, and WhatsApp groups for any install
that did not have messages.groupChat.visibleReplies explicitly set —
the bot would receive and process messages but never post a reply.

Fix: only return message_tool_only when the config explicitly sets the
mode to "message_tool"; leave undefined (the common case) as automatic.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@openclaw-barnacle openclaw-barnacle Bot added size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 5, 2026
@clawsweeper

clawsweeper Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

Summary
The PR changes resolveSourceReplyDeliveryMode and its unit tests so unset group/channel turns resolve to automatic instead of message_tool_only.

Reproducibility: yes. Source inspection on current main shows empty-config group/channel turns resolve to message_tool_only and existing dispatch tests assert no automatic final send, but that reproduces documented intended behavior rather than a confirmed bug.

Real behavior proof
Needs real behavior proof before merge: The PR body has no after-fix real Discord, Telegram, WhatsApp, terminal, log, or linked artifact proof.

Next step before merge
Maintainer/product review is needed because the PR changes a documented group/channel privacy policy and has no live behavior proof; there is no narrow automated repair besides rejecting or redesigning the change.

Security
Needs attention: The diff broadens default group/channel reply visibility and can expose normal final replies in shared rooms.

Review findings

  • [P1] Preserve the tool-only default for unset group rooms — src/auto-reply/reply/source-reply-delivery-mode.ts:31
Review details

Best possible solution:

Preserve the current tool-only default; if maintainers want a narrower visible-reply exception, handle it as a product-approved policy change with docs, changelog, live proof, and alignment with related PR #75327.

Do we have a high-confidence way to reproduce the issue?

Yes. Source inspection on current main shows empty-config group/channel turns resolve to message_tool_only and existing dispatch tests assert no automatic final send, but that reproduces documented intended behavior rather than a confirmed bug.

Is this the best way to solve the issue?

No. This is not the narrowest maintainable fix because it turns a documented privacy default into automatic public delivery; any change here needs an explicit product/privacy decision and matching docs/changelog.

Full review comments:

  • [P1] Preserve the tool-only default for unset group rooms — src/auto-reply/reply/source-reply-delivery-mode.ts:31
    This changes the unset group/channel path from message_tool_only to automatic. Current docs and regression tests define unset group/channel replies as private unless the agent uses message(action=send), so this would auto-post normal final replies into shared rooms and break the existing dispatch contract.
    Confidence: 0.94

Overall correctness: patch is incorrect
Overall confidence: 0.93

Security concerns:

Acceptance criteria:

  • 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/dispatch-acp.test.ts
  • Live group/channel proof on any accepted policy path, preferably Discord guild plus Telegram or WhatsApp group

What I checked:

Likely related people:

Remaining risk / open question:

  • Changing this default without maintainer approval can expose normal assistant final replies in shared group/channel rooms, reversing the current privacy contract.
  • The PR provides no after-fix real behavior proof from Discord, Telegram, or WhatsApp despite changing live channel delivery behavior.
  • The source branch is currently dirty/unmergeable, so it cannot merge as-is.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 70d92b5e59df.

@Marvinthebored

Copy link
Copy Markdown
Contributor Author

Closing — the reviewer is correct. The message_tool_only default is intentional (introduced in #73046 as a group chat privacy feature, preserved in #76661). This PR was based on a misread of the behavior as a regression. Affected users should set messages.groupChat.visibleReplies: "automatic" explicitly if they want the old auto-reply behavior in group/channel rooms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant