openclaw - 💡(How to fix) Fix image_generate returns MEDIA path but Telegram auto-reply can finish text-only without sending image [2 comments, 2 participants]

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…
GitHub stats
openclaw/openclaw#77264Fetched 2026-05-05 05:50:27
View on GitHub
Comments
2
Participants
2
Timeline
3
Reactions
2
Timeline (top)
commented ×2closed ×1

In a Telegram auto-reply session, image_generate successfully generated and saved an image, returning a MEDIA:<local path> line, but the assistant then replied only with text (Klaar ...) and no image was delivered to Telegram.

This is confusing for users because the bot says the image is ready, but nothing appears in chat.

Error Message

Session transcript showed:

Root Cause

The tool description says generated images are delivered automatically from the tool result as MEDIA paths, but in this real Telegram turn the MEDIA path stayed inside the transcript and did not become an outbound media payload.

Fix Action

Fix / Workaround

Environment

  • OpenClaw: 2026.5.3-1
  • OS: Windows 11 / win32
  • Channel: Telegram direct chat
  • Agent model/runtime after workaround: openai-codex/gpt-5.5 via PI runner
  • Image generation model: openai/gpt-image-1.5

Code Example

Generated 1 image with openai/gpt-image-1.5.
Warning: Ignored unsupported overrides for openai/gpt-image-1.5: aspectRatio=9:16.
MEDIA:C:\Users\...\.openclaw\media\tool-image-generation\bad-iphone-phone-screen-trial-in-bio---<uuid>.png

---

1024x1536, about 2.9 MB

---

Klaar9:16 verticaal, met jouw screenshot als phone screen.

---

openclaw message send --channel telegram --account colorbestie --target <chat_id> --message "..." --media "C:\...\bad-iphone...png" --json
RAW_BUFFERClick to expand / collapse

Summary

In a Telegram auto-reply session, image_generate successfully generated and saved an image, returning a MEDIA:<local path> line, but the assistant then replied only with text (Klaar ...) and no image was delivered to Telegram.

This is confusing for users because the bot says the image is ready, but nothing appears in chat.

Environment

  • OpenClaw: 2026.5.3-1
  • OS: Windows 11 / win32
  • Channel: Telegram direct chat
  • Agent model/runtime after workaround: openai-codex/gpt-5.5 via PI runner
  • Image generation model: openai/gpt-image-1.5

Observed behavior

Session transcript showed:

Generated 1 image with openai/gpt-image-1.5.
Warning: Ignored unsupported overrides for openai/gpt-image-1.5: aspectRatio=9:16.
MEDIA:C:\Users\...\.openclaw\media\tool-image-generation\bad-iphone-phone-screen-trial-in-bio---<uuid>.png

The generated file existed locally and was a valid PNG:

1024x1536, about 2.9 MB

But the final assistant reply was only:

Klaar — 9:16 verticaal, met jouw screenshot als phone screen.

No Telegram media was sent.

Manual delivery of the same file worked:

openclaw message send --channel telegram --account colorbestie --target <chat_id> --message "..." --media "C:\...\bad-iphone...png" --json

That returned ok: true.

Why this matters

The tool description says generated images are delivered automatically from the tool result as MEDIA paths, but in this real Telegram turn the MEDIA path stayed inside the transcript and did not become an outbound media payload.

Suggested fix

Consider one of these behaviors:

  1. Convert MEDIA:<path> returned by image_generate into an outbound media payload automatically when the final response is built.
  2. Make the tool result structured, e.g. details.media.mediaUrls, drive final payload construction from that, and prevent final text-only success replies when generated media is unsent.
  3. Update the tool contract and agent instructions so that agents must call the message tool or emit a markdown/local media attachment before claiming completion.

Expected behavior

If image_generate succeeds during a Telegram/chat turn, the generated image should be delivered to the user automatically or the agent should be forced/guided to return a media payload instead of text-only completion.

extent analysis

TL;DR

The issue can be resolved by modifying the tool to automatically convert the MEDIA:<path> returned by image_generate into an outbound media payload when building the final response.

Guidance

  • Verify that the image_generate tool is correctly returning the MEDIA:<path> and that the file exists and is valid.
  • Consider implementing one of the suggested fixes, such as converting MEDIA:<path> to an outbound media payload or structuring the tool result to drive final payload construction.
  • Test the modified tool with a sample image generation task to ensure that the generated image is delivered to the user automatically.
  • Review the tool contract and agent instructions to ensure that they are updated to handle generated media correctly.

Example

No code snippet is provided as the issue does not contain sufficient technical details to generate a specific example.

Notes

The issue seems to be related to the tool's behavior when handling generated media, and the suggested fixes aim to address this. However, the exact implementation details may vary depending on the specific requirements and constraints of the tool and the environment.

Recommendation

Apply a workaround by modifying the tool to automatically convert MEDIA:<path> to an outbound media payload, as this seems to be the most straightforward solution to ensure that generated images are delivered to the user correctly.

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

If image_generate succeeds during a Telegram/chat turn, the generated image should be delivered to the user automatically or the agent should be forced/guided to return a media payload instead of text-only completion.

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 image_generate returns MEDIA path but Telegram auto-reply can finish text-only without sending image [2 comments, 2 participants]