Skip to content

message.send triggers duplicate delivery-mirror replies #44467

@achefinil

Description

@achefinil

Now all channels can duplicate outbound replies when the agent proactively sends visible content via message(action=send).

Summary

If the agent successfully sends an image/file/text via message.send(...), OpenClaw should suppress the normal main reply / delivery-mirror path for that turn.

Right now both paths can fire:

  1. The agent calls message.send(...)
  2. The attachment / visible content is delivered successfully
  3. The system then also runs a follow-up layer with:
    • provider=openclaw
    • model=delivery-mirror
  4. A second extra message appears, often just mirroring text like the filename (for example cat-fresh.png)

Observed behavior

This causes duplicate sends across channels:

  • first: attachment/image/file is sent by message.send
  • then: an extra text message is posted afterward by delivery-mirror

From session history, the chain looks like:

  1. message.send(...) succeeds
  2. the system later emits another outbound message through provider=openclaw, model=delivery-mirror

Expected behavior

If the current assistant turn has already successfully delivered user-visible content via message(action=send), then OpenClaw should fully suppress the normal mirrored/main reply path for that same turn.

Suggested fix:

  • mark the turn as externally_delivered = true after successful message.send
  • skip delivery-mirror for that turn
  • or discard any non-NO_REPLY main reply output once external delivery already happened

One-line version

message.send and delivery-mirror are currently both active for the same turn, so proactive sends get mirrored and users see duplicate messages.

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