TROUBLESHOOTING / CODEX / IMAGE OUTPUT

Codex generated an image, but it is not visible or saved

A completed-looking message does not prove that a file exists on disk. First locate the break: unavailable tool, active run, UI/session-only result, missing output path, or an upstream gateway/API failure.

START HERE / PRESERVE THE RESULT

Do not generate again yet

Another click or repeated prompt may start a second image call and obscure the original evidence. Record the Codex surface, version, operating system, prompt time, last visible status, and whether an image or path ever appeared. Keep the original session open and unarchived.

Separate three statesAn image visible in the UI, image data present in a session, and an image file saved to disk are different outcomes. Only a real path to a file you can open proves persistence.
  1. Tool unavailableNo image-generation call occurred, or Codex says image generation is unavailable.
    TOOL
  2. Still generating or waitingThe status remains generating, or the session is waiting for approval, network response, or completion.
    RUN
  3. UI or session onlyA preview or session result exists, but there is no evidence of a disk file.
    SESSION
  4. No saved_path or output pathThe call appears to have a result, but there is no usable path or new workspace file.
    DISK
  5. Gateway or API failureAn HTTP error, timeout, or structured provider error means generation may not have completed.
    API

DECISION TREE / ONE BRANCH AT A TIME

Answer four questions

  1. Did this turn contain an actual image-generation call?No, or Codex explicitly says the feature is unavailable: use the tool-unavailable branch. Yes: inspect its state.
  2. Has the call reached a terminal state?No, it is generating or awaiting approval: preserve, wait, or cancel it without a parallel retry. Yes: inspect the result.
  3. Can you view an image in the UI?Yes: classify it as UI-only until a disk file is verified. No: look for a clear API error or output path.
  4. Does the reported path point to a real image you can open?Yes: the remaining problem is UI display. No path, or a nonexistent path: use the missing saved_path branch and preserve evidence.

SAFE CHECKS / NO SECRET, NO SECOND CALL

Check the stage you actually reached

1. Tool unavailable: verify the documented invocation

OpenAI's Codex image-generation documentation says you can include $imagegen explicitly in a CLI, App, or IDE prompt. If that still returns a skill/tool unavailable message, or no generation call appears, this is not a persistence failure. Codex surfaces can also carry different versions and receive features at different times.

Use $imagegen to create a 64 x 64 solid-color test image.
Save the final PNG to ./artifacts/codex-image-check.png in this workspace.
Report only a workspace-relative path that really exists; if nothing was saved,
say "not saved" and do not guess a path.

This minimal prompt can create a new billable or usage-counted image request. Use it only to test availability after the original run has ended. Availability can also depend on the surface, plan, and workspace settings described in the official docs.

2. Still generating: inspect approval and terminal state

If the status remains generating, first check whether Codex is waiting for approval. OpenAI's troubleshooting guide recommends checking approval state and using a basic terminal command to see whether the terminal still responds. Do not send a second image request in parallel.

git status

git status only shows that the terminal and Git workspace respond. It does not prove that an image was generated or saved. Move on only after the call succeeds, fails, or is canceled.

3. UI or session only: ask about the existing result

Send this check in the original session. It asks Codex to inspect what already exists, without regenerating:

Do not regenerate. Inspect only the existing result from this turn:
1. If a disk file exists, return its workspace-relative path and file type.
2. If the result exists only in the UI or session, say "not saved."
3. Do not guess a path or output base64, credentials, or full logs.

If Codex reports a path, confirm the working directory and workspace changes:

pwd
git status

These commands do not search outside the workspace, and Git-ignored files might not appear. The path itself still needs to resolve to an image you can open. Do not treat an assumed default folder as proof.

4. Record the exact version

OpenAI documents these checks for Codex CLI and the CLI bundled with the macOS app. On Windows, record the App version from the Codex About dialog.

codex --version
/Applications/Codex.app/Contents/Resources/codex --version

KNOWN REPORT / NOT A UNIVERSAL DIAGNOSIS

What if result exists but saved_path does not?

A public report in the OpenAI Codex repository, Issue #32153, described image data in a local session record while the status remained generating, with no display, saved file, or saved_path. The issue was closed on July 16, 2026. Its versions and observations do not prove that every current failure has the same cause.

If your visible symptoms match, keep the original session, record the version and time, and submit a redacted reproduction. Do not paste session base64 into an Issue. Avoid making third-party session-extraction scripts the default recovery path: they process local session content that may include private prompts, paths, or images.

saved_path is a diagnostic clue, not a contractA field named in a public issue is not proof that every Codex surface and version must expose that field. The user-level test is still a real image file at a path you can open.

API BRANCH / FIX THE REQUEST FIRST

An HTTP error or timeout belongs to the API branch

If the UI shows a 4xx, 5xx, timeout, or structured gateway error, stop searching for a save path. The request may never have produced a complete image. Use the documentation for the official service or gateway you actually configured to check its image endpoint, model access, quota, and request format.

Visible signalCheck firstDo not
401 / 403Credential source, account permission, and image-model accessPaste a key into chat, screenshots, or Issues
400 / 404Provider-documented image endpoint, model name, and capabilityAssume a working text API also implements Images
429Wait for quota or rate limits; retain the original request timeOpen parallel retries to evade limits
5xx / timeoutRecord time, request ID if present, and a redacted error excerptDescribe a timeout as “generated but not saved”

“OpenAI-compatible” may cover only text endpoints. Images API support, edits, response formats, and timeout behavior need separate provider documentation and testing.

BUG REPORT / REDACT BEFORE SHARING

Report a reproducible case without leaking secrets

OpenAI's troubleshooting guide recommends searching existing Codex Issues before using in-product feedback or the repository's bug report template. Review every log before sharing it.

  • Codex surface (App, CLI, or IDE), exact version, operating system, and architecture.
  • Minimal reproduction prompt, timestamp and timezone, and the last visible call state.
  • Whether a preview appeared, whether a path was returned, and whether that path opened.
  • Any HTTP status, request ID, or approval wait; include only the necessary error excerpt.
  • Expected versus actual behavior, including whether retries would create another call.
Remove before postingAPI keys, Authorization headers, private Base URLs, account/workspace identifiers, private prompts and images, full gateway responses, session base64, unrelated local paths, and unreviewed full logs.

TWO DIFFERENT PATHS

Keep troubleshooting Codex first; consider Image2 separately

Image2 Studio does not fix Codex and is not a Codex configuration tool. It is an independent local desktop image workflow for users who already lawfully have an OpenAI-compatible Images API endpoint and key. Image2 is not affiliated with OpenAI or Sub2API, does not guarantee arbitrary gateway compatibility, and does not provide or endorse gateway services.

If you still need the result from this Codex turn, continue with the official Codex troubleshooting and feedback path. Consider Image2 only if you already wanted to separate image work from coding sessions. This marketing site never accepts API keys.

Current Image2 installers are unsigned and may trigger an OS warning. Read the installation and connection guide, and use only endpoints and credentials you are authorized to use.

SOURCES / EVIDENCE LEVELS

Sources and evidence boundaries

  • Official documentation: Codex image generation, for $imagegen, surface behavior, and availability boundaries.
  • Official documentation: Codex troubleshooting, for version checks, stuck-state recovery, feedback, log locations, and redaction.
  • Public project report: openai/codex #32153, a closed report about a result without display, persistence, or saved_path on specific older versions.
  • Community reports: a Linux.do user report and an r/codex user report describe UI-only or disk-missing symptoms. They are anecdotes, not official findings, prevalence data, or market-size evidence.
  • API reference: OpenAI image-generation API guide, for the official API only; third-party endpoints require their own documentation and real testing.