Skip to content

[codex] Persist built-in image results reported as generating#28656

Merged
won-openai merged 4 commits into
mainfrom
won-fix-image-generation-artifact-persistence
Jun 17, 2026
Merged

[codex] Persist built-in image results reported as generating#28656
won-openai merged 4 commits into
mainfrom
won-fix-image-generation-artifact-persistence

Conversation

@won-openai

@won-openai won-openai commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Why

#27920 stopped persisting image-generation items unless their status was completed, preventing failed standalone extension items with empty results from being saved. Built-in image generation can instead emit a terminal response.output_item.done containing a complete base64 PNG while the item status remains generating. In that case, app-server emits no savedPath, so Codex Apps can render the inline image but cannot expose a file artifact.

What changed

  • Persist image-generation items whenever result contains image data. Failed terminal items still have empty results and remain unpersisted.
  • Update the existing built-in image-generation integration test to cover a terminal generating item and verify both saved_path and the written PNG bytes.

Validation

  • Confirmed with a raw built-in websocket trace: the image progressed through in_progress, generating, and partial_image, then emitted one response.output_item.done with status: "generating" and a complete PNG result.
  • just test -p codex-core builtin_image_generation_call_persisted is currently blocked before test execution by a pre-existing compile error in thread-store/src/thread_metadata_sync.rs:171.

@won-openai
won-openai marked this pull request as ready for review June 17, 2026 05:03
@won-openai
won-openai requested a review from a team as a code owner June 17, 2026 05:03
@won-openai won-openai changed the title [codex] Persist terminal image generation results [codex] Persist built-in image results reported as generating Jun 17, 2026
@won-openai
won-openai enabled auto-merge (squash) June 17, 2026 05:04
@won-openai
won-openai merged commit 1315198 into main Jun 17, 2026
46 of 47 checks passed
@won-openai
won-openai deleted the won-fix-image-generation-artifact-persistence branch June 17, 2026 06:03
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants