Skip to content

bug: visibleReplies message_tool mode silently drops replies when message tool is unavailable #74868

@kagura-agent

Description

@kagura-agent

Summary

When messages.groupChat.visibleReplies is set to "message_tool" (the new default in 2026.4.27), group/channel replies are suppressed and the agent is expected to use message(action=send) to post visible output. However, there is no guard to check whether the message tool is actually available to the agent. If the message tool is missing (due to tool policy, disableMessageTool, or any other reason), the agent is completely silenced — automatic delivery is suppressed, but the agent has no tool to send messages manually either.

Steps to reproduce

  1. Upgrade to OpenClaw 2026.4.27 (which defaults messages.groupChat.visibleReplies to "message_tool")
  2. Have an agent in a Discord group/channel where the message tool is not available (e.g. tool policy whitelist that does not include message, or disableMessageTool: true)
  3. Send a message mentioning the agent in the group
  4. Agent processes the message and generates a reply, but it is never delivered to the channel — only visible in Control UI

Expected behavior

If visibleReplies is "message_tool" but the message tool is not in the agent's available tools, the system should fall back to "automatic" mode so replies are still delivered. The current behavior creates a silent failure with no error or warning.

Root cause

In resolveSourceReplyDeliveryMode() (src/auto-reply/reply/source-reply-delivery-mode.ts), the decision to use message_tool_only is based purely on config — it does not check whether the message tool is actually present in the agent's tool inventory:

if (chatType === "group" || chatType === "channel") {
  return params.cfg.messages?.groupChat?.visibleReplies === "automatic"
    ? "automatic"
    : "message_tool_only";
}

This then sets suppressDelivery = true in dispatch-from-config.ts, which blocks all automatic outbound delivery.

Meanwhile, the system prompt does include a conditional availableTools.has("message") check for showing the message tool instructions section, but the unconditional line above it still tells the agent to "use message(action=send) for visible channel output" regardless.

Suggested fix

Add a guard in resolveSourceReplyDeliveryMode() or at the dispatch level: if message_tool_only mode is selected but the message tool is not in the agent's tool inventory, fall back to "automatic". A similar pattern already exists in cron runs (commit b9d2e0f86d — "fix(cron): gate delivery prompt on message tool availability").

Workaround

Add to openclaw.json:

{
  "messages": {
    "groupChat": {
      "visibleReplies": "automatic"
    }
  }
}

Environment

  • OpenClaw 2026.4.27
  • Introduced by commit 3c636208b0 ("fix(messages): keep group replies tool-only by default")
  • Channel: Discord (likely affects all group/channel surfaces)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions