openclaw - 💡(How to fix) Fix [Bug]: generated image completions still double-send Discord attachments after media handoff fix [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

A Discord generated-image completion still sends the same generated media/caption twice after the generated-media requester-agent handoff fix from #88141 is present in the installed runtime.

Root Cause

A Discord generated-image completion still sends the same generated media/caption twice after the generated-media requester-agent handoff fix from #88141 is present in the installed runtime.

Fix Action

Fixed

Code Example

Runtime:
OpenClaw 2026.5.28-beta.4 (b717704)
Service: systemd user
OS: Ubuntu 24.04.4 LTS
Model: ollama/glm-5.1:cloud

Installed generated-media handoff evidence:
subagent-announce-delivery-C7JEw5IV.js contains:
- expectedMediaUrls
- generated-media-direct
- hasMediaDeliveryEvidence(...)
- requester-agent handoff/fallback log strings

Gateway generated-media log evidence:
12:52:35 MEDIA:/home/dicky/.openclaw/media/tool-image-generation/image-1---b7b05bdb-6649-43b1-b2d4-0d17cb0e956e.jpg
12:54:45 MEDIA:/home/dicky/.openclaw/media/tool-image-generation/image-1---3752aa3e-b6c8-4d36-a834-502d7898ed91.jpg
12:55:33 MEDIA:/home/dicky/.openclaw/media/tool-image-generation/image-1---2b477467-7e6b-4cd2-99e4-461fe491e3e2.jpg
13:04:06 MEDIA:/home/dicky/.openclaw/media/tool-image-generation/image-1---15f6dabb-a1dd-4598-9b18-8845244bcc2d.jpg

Discord top-level duplicate pairs, after filtering referenced_message attachment echoes:

1. image-1---b7b05bdb-6649-43b1-b2d4-0d17cb0e956e.jpg
   1510234460962947253 at 2026-05-30T10:52:34.293Z
   1510234471033602150 at 2026-05-30T10:52:36.694Z
   Same caption: "this is how I see you — floor-dwelling terminal gremlin surrounded by monitors, keeping the chaos alive at 3am. the lobster figurine on the desk is non-negotiable 🦞"

2. image-1---3752aa3e-b6c8-4d36-a834-502d7898ed91.jpg
   1510234995875123311 at 2026-05-30T10:54:41.826Z
   1510235011931177040 at 2026-05-30T10:54:45.654Z
   Same caption: "scaled it back — one laptop, cozy room, chill focus mode. the lobster figurine stays tho 🦞"

3. image-1---2b477467-7e6b-4cd2-99e4-461fe491e3e2.jpg
   1510235201371111685 at 2026-05-30T10:55:30.820Z
   1510235216147644567 at 2026-05-30T10:55:34.343Z
   Same caption: "there we go — dual laptop setup, cozy room, late night bot management. lobster still on desk duty 🦞"

4. image-1---15f6dabb-a1dd-4598-9b18-8845244bcc2d.jpg
   1510237355150282972 at 2026-05-30T11:04:04.321Z
   1510237367741710456 at 2026-05-30T11:04:07.323Z
   Same caption: "THREE monitors this time, at a desk, proper setup. should've trusted the first version lmao 🦞"
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

A Discord generated-image completion still sends the same generated media/caption twice after the generated-media requester-agent handoff fix from #88141 is present in the installed runtime.

Steps to reproduce

  1. Run a Discord channel agent on OpenClaw 2026.5.28-beta.4 (b717704) with the #88141-style generated-media runtime code present.
  2. Ask the agent in a Discord channel to generate an image.
  3. Wait for the single generated media completion to finish.
  4. Observe the channel delivery for the generated image.

Expected behavior

Each successful generated image artifact should be delivered once to the original Discord channel.

A single generated media completion should not create two top-level Discord messages with the same attachment filename, size, media URL path, and caption.

Actual behavior

Each observed generated image completion produced one MEDIA: output in the gateway log, but Discord received two top-level messages with the same attachment filename and caption, usually 2-4 seconds apart.

This is not just Discord API referenced_message echoing attachments in replies; those referenced-message echoes were filtered out. The duplicate pairs below are separate top-level channel messages.

OpenClaw version

OpenClaw 2026.5.28-beta.4 (b717704), with the #88141-style generated-media runtime code present in the installed bundle.

Operating system

Ubuntu 24.04.4 LTS, Linux 6.8.0-106-generic x86_64

Install method

npm global, running as a systemd user service

Model

ollama/glm-5.1:cloud

Provider / routing chain

Discord channel -> OpenClaw gateway -> Ollama Cloud GLM requester agent -> generated image tool -> Discord delivery

Additional provider/model setup details

The tested runtime had libravdb-memory configured as both memory and context engine, but the duplicate image behavior here is evidenced at the generated-media/final delivery layer: each affected generated image had exactly one MEDIA: log line and two top-level Discord sends.

Relevant installed runtime evidence showed #88141-style code in subagent-announce-delivery-C7JEw5IV.js, including expectedMediaUrls, generated-media-direct, media evidence checks, and requester-agent handoff strings.

Logs, screenshots, and evidence

Runtime:
OpenClaw 2026.5.28-beta.4 (b717704)
Service: systemd user
OS: Ubuntu 24.04.4 LTS
Model: ollama/glm-5.1:cloud

Installed generated-media handoff evidence:
subagent-announce-delivery-C7JEw5IV.js contains:
- expectedMediaUrls
- generated-media-direct
- hasMediaDeliveryEvidence(...)
- requester-agent handoff/fallback log strings

Gateway generated-media log evidence:
12:52:35 MEDIA:/home/dicky/.openclaw/media/tool-image-generation/image-1---b7b05bdb-6649-43b1-b2d4-0d17cb0e956e.jpg
12:54:45 MEDIA:/home/dicky/.openclaw/media/tool-image-generation/image-1---3752aa3e-b6c8-4d36-a834-502d7898ed91.jpg
12:55:33 MEDIA:/home/dicky/.openclaw/media/tool-image-generation/image-1---2b477467-7e6b-4cd2-99e4-461fe491e3e2.jpg
13:04:06 MEDIA:/home/dicky/.openclaw/media/tool-image-generation/image-1---15f6dabb-a1dd-4598-9b18-8845244bcc2d.jpg

Discord top-level duplicate pairs, after filtering referenced_message attachment echoes:

1. image-1---b7b05bdb-6649-43b1-b2d4-0d17cb0e956e.jpg
   1510234460962947253 at 2026-05-30T10:52:34.293Z
   1510234471033602150 at 2026-05-30T10:52:36.694Z
   Same caption: "this is how I see you — floor-dwelling terminal gremlin surrounded by monitors, keeping the chaos alive at 3am. the lobster figurine on the desk is non-negotiable 🦞"

2. image-1---3752aa3e-b6c8-4d36-a834-502d7898ed91.jpg
   1510234995875123311 at 2026-05-30T10:54:41.826Z
   1510235011931177040 at 2026-05-30T10:54:45.654Z
   Same caption: "scaled it back — one laptop, cozy room, chill focus mode. the lobster figurine stays tho 🦞"

3. image-1---2b477467-7e6b-4cd2-99e4-461fe491e3e2.jpg
   1510235201371111685 at 2026-05-30T10:55:30.820Z
   1510235216147644567 at 2026-05-30T10:55:34.343Z
   Same caption: "there we go — dual laptop setup, cozy room, late night bot management. lobster still on desk duty 🦞"

4. image-1---15f6dabb-a1dd-4598-9b18-8845244bcc2d.jpg
   1510237355150282972 at 2026-05-30T11:04:04.321Z
   1510237367741710456 at 2026-05-30T11:04:07.323Z
   Same caption: "THREE monitors this time, at a desk, proper setup. should've trusted the first version lmao 🦞"

Impact and severity

Affected: Discord channel users using generated image completions.

Severity: Medium. The gateway does not crash, but the channel receives duplicate image posts, uploads are repeated, and generated-media completion delivery remains unreliable.

Frequency: 4/4 observed generated image deliveries in this run produced duplicate top-level Discord messages.

Consequence: Channel spam and duplicated media uploads for successful image completions.

Additional information

Related prior issue: #87995 reported the beta path sending 12 duplicate Discord attachments from one image completion.

Related fix: #88141 changed generated-media completions to route through the requester agent and keep direct sends as fallback/recovery only. The current observation is after that style of runtime fix is present: the duplicate count is reduced to two, but not eliminated.

Grounded interpretation from the observed evidence: the image is not being generated twice. The gateway logs one MEDIA: artifact per affected image. The duplicate appears downstream in final/generated-media delivery, where the same normalized final media payload is delivered twice to the same Discord target.

Suggested remediation: add delivery idempotency keyed by generated-media completion/run, target, and media path/URL at the final media delivery layer, or ensure only one delivery owner can handle the requester-agent mediated generated-media completion after #88141.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Each successful generated image artifact should be delivered once to the original Discord channel.

A single generated media completion should not create two top-level Discord messages with the same attachment filename, size, media URL path, and caption.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: generated image completions still double-send Discord attachments after media handoff fix [1 pull requests]