Skip to content

[Bug]: image_generate in isolated cron session — agent correctly uses sessions_yield but runner aborts with AbortError after callback is delivered #92120

Description

@nailujac

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

In an isolated cron agentTurn session, calling image_generate followed by sessions_yield results in the runner aborting the job with AbortError: aborted even though the image is successfully generated and the callback is delivered. The workflow never continues past the image step. Reproduced on OpenClaw 2026.6.5, referenced against closed issue #88001.

Steps to reproduce

  1. Create a one-shot isolated cron job (sessionTarget: isolated, payload.kind: agentTurn).
  2. The agent prompt instructs: call image_generate, then call sessions_yield to wait for the callback, then send a sessions_send confirmation.
  3. Trigger the job.
  4. Observe: image_generate starts successfully (taskId returned), agent calls sessions_yield (status: yielded), image is generated and the callback arrives as an inter-session message — but the runner marks the job as error: AbortError: aborted (durationMs ~9756) and the sessions_send step never executes.

Expected behavior

After sessions_yield, the session should remain resumable. When the image_generate callback arrives, the agent turn should resume and continue with the remaining steps (as it does in interactive chat sessions).

Actual behavior

Runner aborts the job with AbortError: aborted shortly after sessions_yield completes. The image callback arrives later as an inter-session message to the (now-dead) session, but no further agent steps execute. Job durationMs: 9756ms. Session transcript shows the full sequence: image_generate call → toolResult: Background task started → sessions_yield call → toolResult: yielded → end. No error inside the session itself.

OpenClaw version

2026.6.5

Operating system

Ubuntu 24.04 (Linux 6.17.0, arm64)

Install method

npm global

Model

All music generation models failed (2): google/lyria-3-pro-preview: {"error":{"message":"","code":404,"status":""}}

Provider / routing chain

openclaw → google

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Session transcript (c73c0343-ab87-4f74-ba4b-ee38e1acbdcd):
- tool_use: image_generate { prompt: "a simple red circle...", outputFormat: "png" }
- tool_result: "Background task started for image generation (57d04078-...). Wait for the completion event..."
- tool_use: sessions_yield {}
- tool_result: { status: "yielded", message: "Turn yielded." }
[session ends here]

Cron run state:
  lastRunStatus: error
  lastError: "AbortError: aborted"
  lastDurationMs: 9756

Inter-session callback (arrived after abort):
  sourceSession: image_generate:57d04078-dd28-425f-9037-c14a3e1ba175
  content: image/jpeg, 59976 bytes ✅ (image was generated successfully)

Impact and severity

• Affected: any isolated cron workflow that includes image_generate as a non-final step
• Severity: blocks workflow (remaining steps — file save, git commit, PR, notifications — never execute)
• Frequency: 100% reproduced
• Consequence: silent partial failure; image is generated but the cron job reports error and stops

Additional information

This is a regression from #88001 (closed 2026-05-31). The previous symptom was the turn closing with stopReason=toolUse before the callback arrived. The new symptom in 6.5 is different: the agent now correctly calls sessions_yield, the image is generated and the callback arrives, but the runner still aborts. The underlying cause per #88001's Codex review is terminate: true in the image_generate started result causing the embedded runner to treat the turn as terminal progress — this appears unresolved in 6.5. Current workaround: use openclaw infer image generate via exec (synchronous CLI) instead of the image_generate tool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.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