openclaw - 💡(How to fix) Fix [Bug]: image_generate in isolated cron session closes turn before receiving callback — cron never completes [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…

When an isolated cron job calls image_generate, the agent turn closes before receiving the image callback. The image is delivered as a direct fallback to the channel, but the cron never continues past the image generation step — PR, Nirvana task, and notification are never created.

Error Message

status: ok (no error, but workflow incomplete)

Root Cause

When an isolated cron job calls image_generate, the agent turn closes before receiving the image callback. The image is delivered as a direct fallback to the channel, but the cron never continues past the image generation step — PR, Nirvana task, and notification are never created.

Fix Action

Fixed

Code Example

Run summary (truncated): "Ahora redacto el artículo completo sobre depreciación de coches:"
durationMs: 181355
input_tokens: 18, output_tokens: 7646, total_tokens: 52631
status: ok (no error, but workflow incomplete)
Image delivered to channel as direct fallback (Telegram message "The generated image is ready.")
Session history: empty (messages: []) after run completes
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

When an isolated cron job calls image_generate, the agent turn closes before receiving the image callback. The image is delivered as a direct fallback to the channel, but the cron never continues past the image generation step — PR, Nirvana task, and notification are never created.

Steps to reproduce

  1. Create a cron job with sessionTarget: isolated and payload.kind: agentTurn.
  2. Inside the agent turn, call image_generate as part of a multi-step workflow (e.g. generate image → save to disk → git commit → open PR).
  3. Trigger the job (manually or via schedule).
  4. Observe that the turn ends with stopReason=toolUse immediately after calling image_generate, before the image callback arrives.
  5. The generated image is delivered as a direct fallback to the configured channel target, but the cron workflow does not resume after the image step.

Expected behavior

The agent turn should receive the image_generate completion callback and continue executing the remaining steps of the workflow, as it does in interactive chat sessions.

Actual behavior

The turn closes with stopReason=toolUse after calling image_generate. durationMs is ~140–180s (consistent with image generation time), output_tokens is ~5000–8000, and the summary is truncated mid-sentence at the image generation step. The image is delivered via direct fallback to the channel ("The generated image is ready."), but the cron never creates the PR, Nirvana task, or sends the completion notification. Reproduced on every run (5+).

OpenClaw version

2026.5.27

Operating system

Ubuntu 24.04

Install method

npm global

Model

anthropic/claude-sonnet-4-6

Provider / routing chain

openclaw -> anthropic

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Run summary (truncated): "Ahora redacto el artículo completo sobre depreciación de coches:"
durationMs: 181355
input_tokens: 18, output_tokens: 7646, total_tokens: 52631
status: ok (no error, but workflow incomplete)
Image delivered to channel as direct fallback (Telegram message "The generated image is ready.")
Session history: empty (messages: []) after run completes

Impact and severity

• Affected: any isolated cron job that uses image_generate as part of a multi-step workflow • Severity: High — the cron reports status: ok but the workflow is silently incomplete; no PR, no task, no notification • Frequency: 100% reproduction (5+ consecutive runs across versions 2026.5.22 and 2026.5.27) • Consequence: automated content pipeline completely blocked; manual intervention required every run

Additional information

Related to #86459 (fixed in 5.27). That fix correctly prevents stale callbacks from poisoning subsequent runs. However, this is a separate issue: the agent turn itself closes before receiving the callback, so the workflow never resumes regardless of where the callback is routed. Last known good: 2026.5.18. The fix in #86459/PR #86529 addressed callback routing but not turn lifecycle in isolated cron sessions.

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

The agent turn should receive the image_generate completion callback and continue executing the remaining steps of the workflow, as it does in interactive chat sessions.

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]: image_generate in isolated cron session closes turn before receiving callback — cron never completes [1 pull requests]