Skip to content

Media generation succeeds but completion delivery fails and looks like generation failure #86034

Description

@tianxiaochannel-oss88

Summary

image_generate can complete successfully and produce a usable media artifact, but OpenClaw can still emit a completion delivery failed style receipt because it fails to wake or deliver the completion back to the original chat/session.

This is not an image generation failure. The artifact was generated, retrieved, and usable for downstream processing.

Environment

  • OpenClaw: 2026.5.22 (a374c3a)
  • Gateway: local loopback 127.0.0.1:18789, reachable
  • OS/runtime: macOS 26.5 arm64, Node 24.15.0
  • Channel: Slack enabled and healthy in openclaw status
  • Model path: openai/gpt-5.5 through a local OpenAI-compatible proxy

What happened

  1. A Slack/channel request triggered an Image2 image_generate job.
  2. The image generation task completed and wrote the file under .openclaw/media/tool-image-generation/....
  3. The generated file was retrieved and successfully used for downstream green-screen cutout, automatic component slicing, and QC.
  4. OpenClaw later reported a completion delivery failure because the generated result was not delivered/woken back into the original requester session.

Actual behavior

The user receives a failure receipt that reads like the generation failed, even though the generation artifact exists and is valid. Logs show the media artifact path and an image_generate:...:ok run, but also a failed wake/delivery path.

Sanitized log evidence:

[2026-05-24 18:43:21 +08] Media generation completion wake failed; requester session was not woken
taskId=<uuid> runId=tool:image_generate:<uuid> toolName=image_generate error="gateway request timeout for agent"

[2026-05-24 19:21:18 +08] embedded abort settle timed out:
runId=image_generate:<uuid>:ok sessionId=<uuid> timeoutMs=2000

[2026-05-24 19:21:19 +08] MEDIA:<redacted-local-path>/.openclaw/media/tool-image-generation/yui_image2_face_movable_parts_atlas_green_bg_20260524_retry_---<uuid>.png

[2026-05-24 19:21:19 +08] [agent] run image_generate:<uuid>:ok ended with stopReason=toolUse

openclaw status at the same time showed the gateway reachable, Slack enabled/OK, and active sessions under the same agent. This does not look like a gateway-down or image backend failure.

Expected behavior

  • A completed image_generate task with a media artifact should be treated as generation success.
  • If delivery back to the original chat fails, the receipt should say something like:
    • "Generation succeeded, but completion delivery failed."
    • Include or preserve the media artifact path/reference where possible.
    • Offer a retry-delivery action/path without rerunning image generation.
  • The requester session should be released/woken/settled correctly after image_generate:...:ok, even when the final delivery attempt times out.

Impact

The current behavior makes users think generation failed and encourages retries, which can duplicate media jobs, waste quota/time, and obscure that a valid artifact already exists. It also leaves the channel/session state looking stalled even though the underlying media job completed.

Notes

Full local logs contain tokens and local paths, so the snippets above are intentionally redacted. I can provide more targeted sanitized excerpts if useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for 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.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions