Skip to content

Discord room events can suppress final assistant replies into transcript-only mode #84022

Description

@h-mascot

Summary

Discord room/thread events can produce a complete final assistant answer in the session transcript while nothing is posted back to Discord. The visible channel only gets tool/status messages, which makes the user experience look like messages are being dropped.

Observed behavior

On an OpenClaw 2026.5.18 gateway:

  • Discord ingress succeeds.
  • The agent run completes and writes the final answer to the session transcript.
  • Discord does not receive the final assistant text.
  • Users only see tool/error/status output in the Discord thread/channel.

This reproduced in at least two Discord surfaces:

  • A Discord thread/session keyed by 1506182302055665705 contained the full final answer in the session file, but Discord showed only the user message plus a tool failure status.
  • #command-deck showed the same pattern: final diagnosis existed in the session, but was not delivered to Discord.

Likely cause

Room events are hard-forced into sourceReplyDeliveryMode: "message_tool_only", even when config asks for automatic visible replies:

// dist/source-reply-delivery-mode-*.js
if (params.ctx.InboundEventKind === "room_event") return "message_tool_only";

// dist/dispatch-*.js
strictMessageToolOnly: ctx.InboundEventKind === "room_event",

// dist/get-reply-*.js
sourceReplyDeliveryMode: isRoomEvent ? "message_tool_only" : opts?.sourceReplyDeliveryMode,

With that mode active, normal final assistant text is treated as transcript/private unless the model explicitly uses the message tool. If it does not, the final answer is effectively invisible on Discord.

Expected behavior

When messages.groupChat.visibleReplies: "automatic" or messages.visibleReplies: "automatic" is configured, Discord room/thread events should deliver normal final assistant text back to the source conversation.

If message_tool_only is required for some room-event cases, OpenClaw should have a fallback: when counts.final === 0 and no visible message tool send occurred, deliver the final assistant text or emit a clear visible delivery failure.

Local hotfix tested

As a runtime hotfix on the installed dist package, removing the room-event hard-force and allowing the configured visible-reply policy to resolve normally passes node --check on the edited dist files.

Changed locally:

  • dist/source-reply-delivery-mode-*.js: no longer returns message_tool_only solely for InboundEventKind === "room_event".
  • dist/dispatch-*.js: no longer sets strictMessageToolOnly solely because the inbound event is a room event.
  • dist/get-reply-*.js: passes through opts?.sourceReplyDeliveryMode instead of forcing room events to message_tool_only.
  • dist/tool-resolution-*.js: no longer adds message-tool-only mode solely for room events.

Environment

  • OpenClaw version: 2026.5.18
  • Gateway service: openclaw-gateway.service
  • Channel: Discord room/thread events
  • Config relevant setting: messages.groupChat.visibleReplies: "automatic"

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions