image_gen output no longer saved to accessible local path

Open 💬 4 comments Opened Jun 18, 2026 by nieyy
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Regression in recent Codex Desktop versions: image_gen output is rendered in the UI but is no longer saved under ~/.codex/generated_images/<thread_id>/, and the agent cannot access a filesystem path for the generated artifact.

This used to work. Existing historical files are still present under ~/.codex/generated_images/<old_thread_id>/, with last modified times around Jun 11 / May 22. However, newly generated images do not appear under ~/.codex/generated_images or any recent ~/.codex image path.

Impact: workflows that generate Image 2.0 diagrams and then commit them into a repo are broken. The only workaround is manually downloading the image from the UI to ~/Downloads and asking the agent to copy it into the workspace.

Codex version: 26.611.62324

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #28848
  • #28711
  • #28526
  • #28422

Powered by Codex Action

Jason5Lee · 2 months ago

If you used the hatch pet skill and got the response "The built-in image-generation call did not leave a retrievable file, so I can’t safely mark the base job complete from it," I believe it's related to this issue. A workaround is to add the following to your prompt in the Codex App: "In the current version of Codex, you cannot read generated images directly, so after generating the image, please stop. I'll save the image, then tell you to continue." Then, save the generated image and provide the path to the AI. This requires some manual effort but works until the issue is fixed.

fahdarafat · 2 months ago

Confirming the same behavior on another macOS machine.

Environment:

  • macOS 26.1, arm64
  • codex-cli 0.141.0
  • Codex Desktop session using the built-in image_gen tool

Observed today:

  • Asked Codex to generate a square PNG vocabulary flashcard image.
  • The image generation path appeared to run, but no usable local artifact/path was exposed to the agent.
  • $HOME/.codex/generated_images exists and contains historical generated PNGs, but the newest PNG there is still from 2026-06-11.
  • Searching $HOME/.codex, writable temp dirs, and recent image files did not find a new generated PNG from the current request.
  • The agent could not copy/move the generated image into the workspace or provide a file path to the user.

This matches the reports here and in #28422/#28848: image generation can proceed visibly/inline, but current released builds do not leave a retrievable saved_path or fresh file under generated_images.

jianxunzhang1101 · 1 month ago

If you hit this on recent versions (0.144.x): check your task JSONL — in every case I diagnosed, the full base64 image is already there (image_generation_call.result), it just never gets a saved_path. The active tracking issue for the current regression is #32153.

Until it's fixed, this read-only Skill recovers the image from the local JSONL and saves/displays it (no regeneration, no network): https://github.com/jianxunzhang1101/recover-codex-images