Skip to content

[Bug]: Image generation completion event cannot deliver attachments to Discord channel #84605

@blaspat

Description

@blaspat

Problem:
When image_generate completes in a background session, the completion event fires and includes an attachment (the generated image). The event instructions say to deliver the attachment to the original chat via the message tool. However, the message tool call from within the completion event context fails — either silently or with an error — and the attachment never reaches the Discord channel.

Reproduction:

  1. Start an image_generate call from a Discord session
  2. Wait for the completion event
  3. The completion event contains the correct image attachment path
  4. The instruction to call message tool with action=send to the Discord channel fails
  5. User never receives the image in Discord

Expected behavior:
Completion events with attachments should auto-deliver to the original Discord channel, just like text responses do.

Environment:

  • Channel: Discord (#claire channel)
  • Model: minimax/MiniMax-M2.7
  • OS: Linux (Oracle Cloud, arm64)
  • OpenClaw: 2026.5.18

Error observed:
The completion event fires successfully and the image file exists on disk at the reported path, but the message tool does not successfully deliver it to Discord from within the completion event sub-session context.

Workaround:
None that works cleanly — text responses route fine, but attachments require the message tool which fails from the event context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.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
    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