Skip to content

Codex App renders generated image as broken image placeholder #26187

Open

Description

@simfor99

What version of the Codex App are you using (From “About Codex” dialog)?

Version 26.601.21317 • Released 02.06.2026. CLI visible in the same environment: codex-cli 0.136.0.

What subscription do you have?

ChatGPT Pro, described by the reporter as the highest available private/consumer subscription (possibly referred to as "Pro x20").

What platform is your computer?

Windows Codex App with a WSL workspace.

Observed WSL environment from the reporting workspace:

Linux SimonRy9 6.6.87.2-microsoft-standard-WSL2 x86_64 GNU/Linux

What issue are you seeing?

Generated images sometimes do not render correctly in the Codex App conversation. Instead of showing the generated bitmap inline, the chat displays a broken image icon and the localized alt text Generiertes Bild 1.

In the attached/reported screenshot, the assistant message says it created a new concept screen, but the image area below only shows the small broken-image indicator plus Generiertes Bild 1. The rest of the chat remains usable, so this appears to be an image rendering/asset resolution issue rather than a full session crash.

This looks related to, but slightly different from, #19027. In #19027 the generated images were not automatically embedded. Here the UI appears to attempt rendering an image entry, but the rendered result is broken and only the fallback alt text is visible.

What steps can reproduce the bug?

  1. Use the Codex App on Windows with a WSL-backed workspace.
  2. Ask Codex to generate a visual concept/mockup/image.
  3. Wait for the image generation response to complete.
  4. Observe the generated image area in the conversation.
  5. Sometimes the image is not displayed; only a broken image icon and text such as Generiertes Bild 1 are shown.

What is the expected behavior?

Generated images should render inline in the Codex App chat once generation completes. If the image file cannot be resolved or loaded, the UI should expose a clear error or file/path diagnostic instead of silently falling back to a broken image placeholder.

Additional information

Screenshot context from the report:

  • Codex App UI language: German.
  • The visible failed image label is Generiertes Bild 1.
  • The workspace shown in the app is sanctum-os.
  • The active thread was generating a website concept/mockup.
  • The right environment panel shows a local workspace and branch main.

I do not have the exact generated image file path from the screenshot, so this report is based on the visible app behavior rather than a specific local file inspection.

Activity

  1. added
    bug
    app
    windows-os
    on Jun 3, 2026
  2. simfor99 commented on Jun 3, 2026

    @simfor99
    Author
    Image
  3. wbdb commented on Jun 3, 2026

    @wbdb

    Same: 019e8f3f-d88b-7702-8ad0-24a71deded42

    Image

    For one image 30 minutes?

    Image
  4. jianxunzhang1101 commented on Jul 11, 2026

    @jianxunzhang1101

    For anyone landing here with a blank/broken image box on recent builds: the image data usually did arrive intact (check the task JSONL for a ~3M-char image_generation_call.result). The render/persist regression is tracked in #32153; until then you can recover the actual file locally with https://github.com/jianxunzhang1101/recover-codex-images (read-only, no regeneration).

  5. rdvo commented on Aug 26, 2026

    @rdvo

    Still reproduces on the current Windows Store build.

    Environment:

    • Codex Desktop 26.820.7780.0
    • Windows 11 Pro 10.0.26200, build 26200
    • WSL 2.7.12.0, kernel 6.18.33.2-2
    • WSL-backed project

    I captured the renderer failure in the desktop log:

    sa_server_request_failed
    method=get
    routePattern=/files/download/{file_id}
    status=422
    url=/files/download/
    errorMessage={"detail":"No file_id provided."}
    
    Image asset download failed
    assetPointer=""
    fileId=""
    pointerScheme=unknown
    resolverKind=codex
    

    The generated output is a valid PNG and opens normally in Windows Explorer. Its ACL grants the Windows user full access and CodexSandboxUsers read/execute access. The same file renders inline if the assistant explicitly embeds its absolute WSL path, for example ![preview](/mnt/c/Users/<user>/.codex/generated_images/<task>/<file>.png).

    This makes an elevation or filesystem-permissions problem unlikely. It looks like the generated-image result reaches the desktop renderer with empty attachment metadata, causing the request to /files/download/ without an ID.

    This also appears distinct from #34801: that report has a populated sediment:// pointer followed by a 403, while this case has an empty pointer and file ID followed by a 422.

    Minimal reproduction:

    1. Open a WSL-backed task in Codex Desktop for Windows.
    2. Ask Codex to generate an image.
    3. The image file is created successfully, but the inline preview is blank or broken.
    4. Right-clicking/opening the file directly works.
    5. Explicitly embedding the resulting /mnt/c/...png path also works.
  6. Taverick commented on Sep 2, 2026

    @Taverick

    The same empty-image-reference failure is occurring on Codex Desktop for Windows, including after updating and restarting into app package version 26.831.2377.0 (previously 26.831.1445.0). The project is WSL-backed.

    Symptoms

    • Generated-image previews fail in the app, including opening/enlarging the affected cards. The user identifies Canvas view as the affected surface.
    • Saving the images still works.
    • The underlying generated PNGs exist and are readable.
    • Copying a PNG into the workspace and explicitly embedding its absolute local path in ordinary Markdown produces a working preview. The user confirmed that this fresh preview also enlarges successfully.
    • Updating/relaunching did not eliminate the error: it recurs in the new process's log.
    • A newly generated image was also tested after the update, and the user confirmed it still does not display in Canvas. This is not limited to old image cards.

    Reproduction in this environment

    1. Generate or edit an image in a WSL-backed task in Codex Desktop for Windows.
    2. Open the generated-image preview/Canvas.
    3. Observe the broken/blank preview or failure to enlarge.
    4. Save/open the PNG directly, or embed it through an explicit absolute local path: the image remains usable.

    Sanitized diagnostic fields

    sa_server_request_failed
    method=get
    routePattern=/files/download/{file_id}
    status=422
    url=/files/download/
    errorMessage={"detail":"No file_id provided."}
    
    Image asset download failed
    assetPointer=""
    fileId=""
    pointerScheme=unknown
    resolverKind=codex
    

    These fields were observed again after the update. They match the earlier empty-pointer/HTTP 422 report on this issue.

    Expected: generated-image cards and Canvas should resolve and display the valid image, and opening/enlarging should work.

    This appears consistent with an image-reference resolution problem rather than lost image data. The precise root cause is not confirmed. No full logs or private images are attached.

  7. carlosrmendes commented on Sep 24, 2026

    @carlosrmendes

    same issue, generated images in Codex, with WSL backend, is broken...:

    Image
  8. StreamVi commented on Sep 28, 2026

    @StreamVi

    This still occurs on Windows MSIX 26.924.2738.0 with a WSL-backed workspace, observed on 2026-09-28. Adding a current-version report with the exact user-facing error and fresh diagnostic evidence.

    Environment

    • Windows 11 Pro, version 10.0.26200, x64.
    • Installed package: OpenAI.Codex 26.924.2738.0 (verified with Get-AppxPackage; this is the package version, not a transcription of the About dialog).
    • Agent environment: WSL2, kernel 6.6.114.1-microsoft-standard-WSL2.
    • Russian UI.

    Observed behavior

    The built-in image-generation tool completed and produced three UI mockups. Its results were returned through the native generatedImage(result) output helper, and the tool reported that the PNGs were saved locally.

    When opening the generated images in the desktop app, the user reports this exact error:

    Не удалось загрузить это изображение. Закройте его и откройте заново, чтобы повторить попытку

    Translation: “Failed to load this image. Close it and open it again to retry.”

    Fresh diagnostic evidence

    The desktop log records repeated failures during this occurrence, including at 00:37:26.648, 00:37:27.704 and 00:40:47.242 UTC on 2026-09-28. Relevant fields:

    [electron-message-handler] Image asset download failed
    assetPointer=""
    fileId=""
    pointerScheme=unknown
    resolverKind=codex
    errorMessage={"detail":"No file_id provided."}
    

    The three locally saved PNG files are present and readable. Checks of their PNG signatures, all chunk CRCs, IEND chunks, zlib-decompressed image data lengths and row filter bytes passed. All three are 1774 × 887, 8-bit RGB PNGs; sizes are 884,236, 879,895 and 854,598 bytes.

    This matches the empty-reference failure already described in this issue. It is consistent with missing image reference metadata; the point where that metadata is lost has not been traced. The empty IDs also prevent mapping each log entry to an individual generated file.

    Observed reproduction flow

    1. Open a WSL-backed workspace in the Windows desktop app.
    2. Ask for UI mockup images using built-in image generation.
    3. Wait for generation to finish and the native generated-image results to be returned.
    4. Open a generated image.
    5. The app shows the error above despite valid saved PNG data.

    This report is based on the current existing chat and its diagnostics; a fresh-chat or post-restart reproduction has not been tested.

    Expected: native generated-image previews should open successfully after generation, without requiring regeneration or manual image re-embedding.

    Only the relevant diagnostic fields are included here; no private images, project details, full logs or account data are attached.

  9. strive822 commented on Oct 5, 2026

    @strive822

    Additional diagnostic evidence for the Windows + WSL generated-image gallery failure, observed on 2026-10-06.

    App version: 26.930.41038 (build 13022). Windows Store MSIX package: 26.930.4958.0.

    The same response displays images correctly when they are embedded in ordinary Markdown using a verified absolute local path, while the native generated-image gallery and its thumbnails remain broken.

    Read-only thread/read inspection returned seven completed imageGeneration items. Each contained a nonempty Linux savedPath and complete base64 result; the saved PNG files were readable. The payload lengths and prefixes matched the files. Relevant desktop log fields were:

    Image asset download failed
    assetPointer=""
    fileId=""
    pointerScheme=unknown
    resolverKind=codex
    errorMessage={"detail":"No file_id provided."}
    

    Inspection and isolated execution of this build's bundled functions revealed a concrete failure path:

    1. Both main-process and renderer image-item normalizers prefer savedPath over result.
    2. The generated-image source hook converts a Linux absolute path to app://fs/@fs/mnt/c/... when the host descriptor is local. Gallery calls pass shouldLoadFileDataUrl: false, so the environment-aware binary reader is skipped when that direct URL exists.
    3. The Windows file protocol resolves this through the Windows filesystem. A Windows API check resolved the Linux path to C:\mnt\c\Users\<user>\..., which did not exist; its actual C:\Users\<user>\... counterpart was readable.
    4. The failed-image handler retries the asset query. That query is disabled for the empty asset pointer, but its exposed retry callback still invokes query refetch. This supplies an empty ID to the download resolver and explains the subsequent No file_id provided warning.

    Candidate implementation changes tested in isolation:

    • Prefer the supplied nonempty image result for rendering in both normalizers, retaining savedPath for file operations and as the fallback when result is empty.
    • Guard asset retries on pointer presence and enabled loading. Rebuild React callback dependencies as part of the change so an empty-to-valid pointer transition does not retain a stale callback.
    • Separately address environment-aware resolution of path-only images.

    Seven real image payloads round-tripped byte for byte. Twelve isolated checks passed, including pointer retries, enabled-state and pointer transitions, path-only fallback, data URLs, and source-priority agreement between main process and renderer. React, query-client and host/environment selectors were stubs; the relevant normalization and source-resolution functions came from the installed build.

    No installed client resources or session history were modified. The candidate was not deployed or visually validated in the native gallery, so this is a reproducible code-level diagnosis, not a claim that the shipped client is fixed. No private images, session IDs, project paths, account data or full logs are included.

  10. shtash commented on Oct 8, 2026

    @shtash

    Still reproducible on Windows with a WSL workspace on 2026-10-08.

    Running app: 26.930.61225, build 13232, prod channel (app update check).
    Registered Windows package: OpenAI.Codex 26.930.7945.0.
    WSL kernel: 6.18.33.2-microsoft-standard-WSL2.
    The app reports restart_required; this report does not establish whether the pending restart changes the behavior.

    Three built-in image generations completed, with readable local PNGs (805x1953 and two 793x1984 images). Each automatic Generated image 1 entry is a broken placeholder. The desktop logs record this for each attempt:

    2026-10-08T23:39:57.681Z warning Image asset download failed assetPointer="" fileId="" pointerScheme=unknown resolverKind=codex errorMessage={"detail":"No file_id provided."}
    2026-10-08T23:40:26.911Z warning Image asset download failed assetPointer="" fileId="" pointerScheme=unknown resolverKind=codex errorMessage={"detail":"No file_id provided."}
    2026-10-08T23:43:12.194Z warning Image asset download failed assetPointer="" fileId="" pointerScheme=unknown resolverKind=codex errorMessage={"detail":"No file_id provided."}
    

    Explicit assistant Markdown embeds of the same saved PNGs produce local-file thumbnails. The working thumbnail and broken automatic card coexist in the same conversation. This is a workaround, not proof that automatic rendering or the full image viewer is repaired.

    There is also a separate queued Windows screenshot attachment failure:

    2026-10-08T23:41:05.257Z error method=thread/queue/add code=-32600 message="local queued attachment is invalid: No such file or directory (os error 2)"
    2026-10-08T23:47:04.749Z error method=thread/queue/add code=-32600 message="local queued attachment is invalid: No such file or directory (os error 2)"
    

    The pasted Windows Temp PNGs exist and can be opened by the agent through the corresponding /mnt/c paths. That manual path recovery does not repair submission before the message reaches the agent.

    Could the generated-image resolver use the saved local image when the asset pointer/file ID is empty, and could the queued attachment bridge normalize Windows paths before handing them to the WSL app-server?

    No screenshots, transcript, account identifiers, project names or credentials are included in these excerpts.

  11. firestige commented on Oct 20, 2026

    @firestige

    Additional reproduction observed on 2026-10-20: Windows desktop app with a WSL-backed project.

    Environment:

    • Installed Microsoft Store package (queried using Get-AppxPackage): OpenAI.Codex 26.1013.4894.0. This is the installed package version; the running process's About version was not independently verified.
    • Agent kernel: Linux 6.6.87.2-microsoft-standard-WSL2.
    • Chinese UI.

    Observed:

    1. Built-in image generation completed for two images, returned via generatedImage(result).
    2. Both tool results contained a nonempty data:image/png;base64,... image_url.
    3. The saved PNGs exist under the Windows user profile, accessible from WSL through /mnt/c/... .
    4. Both PNGs are 1536 x 1024. File sizes: 2,739,392 and 2,757,286 bytes. Read-only validation passed: PNG signature, CRC for every chunk, and zlib decompression of the concatenated IDAT stream.
    5. A user-provided screenshot shows a broken generated-image entry, broken gallery thumbnails, and a blank right-side image viewer. A manually reattached copy is visible as a thumbnail in the composer.

    Fresh desktop log, 2026-10-20T03:46:37.937Z:

    [electron-message-handler] Image asset download failed
    assetPointer=""
    fileId=""
    pointerScheme=unknown
    resolverKind=codex
    errorMessage="{\"detail\":\"No file_id provided.\"}"
    

    This matches the empty-reference failure reported above. The data is present; native gallery resolution is failing. We have not traced this installed build's internal normalizers or confirmed that path conversion is the initial trigger. Ordinary Markdown embedding and a queued open-file request were attempted, but successful client display was not independently confirmed, so neither is claimed here as a verified workaround.

    Expected: render the available generated image without issuing a download request with an empty file ID. Please consider guarding empty asset retries and preserving an environment-aware local/data-URL fallback.

    No private images, full logs, usernames, account identifiers, project paths, or session identifiers are included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugimagenwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions