Built-in image_gen shows preview but does not save/expose generated image file path

Open 💬 1 comment Opened Jun 18, 2026 by chisan043

What version of the Codex App are you using?

Codex App 26.611.62324 (bundle version 4028). Bundled CLI reports codex-cli 0.140.0-alpha.19.

What platform is your computer?

macOS 26.5.1, Apple Silicon / arm64.

What issue are you seeing?

The built-in image generation tool completes and shows an image preview in the Codex desktop conversation, but the generated image file is not saved/exposed anywhere the agent can access.

This blocks workflows where Codex should generate a bitmap asset and then copy/move it into a project. The image is visible in the UI, but there is no new file under ~/.codex/generated_images, no surfaced local path in the tool result, and no recent image file found in Codex state or temp/cache locations.

This is different from #19027: in that issue the generated files were saved but not embedded. In this case the preview appears, but no new file/path is available to the model.

What steps can reproduce the bug?

  1. In Codex desktop app, ask Codex to generate an image using the built-in image_gen tool.
  2. Observe that the image preview appears in the conversation.
  3. Before/after the call, compare the newest file timestamp under ~/.codex/generated_images.
  4. Poll for 30 seconds and search ~/.codex, OS temp dirs, Application Support, Caches, and Containers for recent image files.
  5. Restart Codex and repeat the same flow.

Expected behavior

After built-in image_gen completes, Codex should expose a saved local file path to the model and/or save the generated image under $CODEX_HOME/generated_images/..., so the agent can copy the selected PNG into the workspace.

This is also what the bundled imagegen skill says to expect, and it matches the June 8, 2026 changelog wording that local image attachments and standalone image generations expose saved file paths to the model.

Actual behavior

The preview appears in the Codex desktop UI, but:

  • no new file appears under ~/.codex/generated_images
  • no path is exposed to the model
  • no recent image file is found in Codex state/temp/cache locations
  • the issue still reproduces after restarting Codex

Additional information

A previous image generation on the same machine did work: on 2026-06-16 a generated PNG appeared under ~/.codex/generated_images/.../ig_*.png and Codex could copy it into the project. The current behavior no longer does that.

The ~/.codex/generated_images directory exists and is writable; a manual probe file can be written and removed there.

codex doctor --json summary: installation/config/auth/network checks pass, image_generation feature flag is enabled, ChatGPT auth is configured, and provider endpoints/websocket are reachable. The overall doctor status only failed because the noninteractive shell used for diagnostics has TERM=dumb, which does not seem related to image file persistence.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗