Skip to content

message(action=send) without to fails for plugin channels under message_tool_only #94597

Description

@lansenger-pm

Environment

  • OpenClaw: 2026.6.8
  • Plugin: @lansenger-pm/openclaw-lansenger-channel (external channel plugin)
  • Chat type: group chat
  • Config: messages.groupChat.visibleReplies: "message_tool"

Steps to reproduce

  1. Set messages.groupChat.visibleReplies to "message_tool"
  2. Send a message to a group chat via an external channel plugin (Lansenger)
  3. Agent calls message({action: "send", text: "hello"}) without explicit to/target

Expected behavior

message(action=send) without to should auto-resolve the current conversation target and deliver the message to the group.

Actual behavior

  • No message delivered. message({action: "send"}) without to returns { success: false } with no error message.
  • When to IS explicitly provided, it works correctly.
  • Setting visibleReplies to "automatic" works around the issue.

Root cause analysis

Core issue: shouldUseInternalSourceReplySink intercepts plugin channels

In internal-source-reply.ts, shouldUseInternalSourceReplySink() intercepts message(action=send) calls when sourceReplyDeliveryMode === "message_tool_only" and the call has no explicit route params (to/target/channelId). It checks hasConfiguredCurrentSourceChannel() as a fallback, but this returns false for external plugin channels. The call is routed to handleInternalSourceReplySendAction() — an internal UI reply sink — and never reaches the plugin's handleAction.

Plugin parameter reading (already fixed)

The plugin's handleAction was reading ctx.args instead of ctx.params, and session target extraction used parts[2] instead of the last segment. These have been fixed in the plugin.

Request

shouldUseInternalSourceReplySink() should check whether the current channel plugin has an active handleAction / outbound path and route to the plugin instead of the internal sink when the plugin is capable of handling the send action.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.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-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm 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.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions