Skip to content

Generated images are not automatically embedded after image generation #19027

Open

Description

@joshEng1

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

26.417.41555

What subscription do you have?

Plus

What platform is your computer?

Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 x86_64

What issue are you seeing?

When I have codex generate images with the built in image generation tool, the images are created and saved correctly, however in the chat it doesn't embed correctly so all I see are empty responses or "Generated Image #".

The multiple images were generated under this path : mnt/c/Users/<my_user>/.codex/generated_images/...
But the response itself did not include the Markdown image tags, so nothing appeared visually in the conversation until I asked why the images were not showing. Codex had to manually locate the files and embed them with absolute Markdown links to show up in the chat.

Image

What steps can reproduce the bug?

  1. Ask codex to generate mockup images or any images using the built in image generation tool
  2. Wait for image generation to complete
  3. Observe if Codex returns a response without image embeds.
  4. Check if Codex can find the files or check if the files were generated at the image generation path
  5. See if Codex can embed the files manually afterwards.

Model : GPT 5.4 XHigh
Session ID: 019db360-7e19-7210-8402-dfae24d13313
Context Window: 133k / 258k

What is the expected behavior?

The expected behavior is Codex should automatically render the generated image files inline in the chat using the Markdown image tags with absolute paths. It should visually show each image inline and embedded right after the prompt asking for the image generation without further prompting necessary.

Additional information

This happened in a WSL workspace. Generated files were saved under /mnt/c/Users/<my_user>/.codex/generated_images/..., so path translation may also be involved. However, the first failure was that Codex did not include any Markdown image embeds after image generation.

Activity

  1. added
    app
    on Apr 22, 2026
  2. added
    bug
    windows-os
    tool-calls
    on Apr 22, 2026
  3. github-actions commented on Apr 22, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

  4. joshEng1 commented on Apr 22, 2026

    @joshEng1
    Author

    This is not a duplicate as my issue is about using image generation in the Codex App not embedding correctly. The other issue is about non generated images not refreshing when file path is overwritten.

  5. wbdb commented on Apr 29, 2026

    @wbdb

    I encountered the same issue today with Windows and WSL2.

    Image
  6. TigerHix commented on May 1, 2026

    @TigerHix

    Same issue on WSL2 and Codex 26.422.30944

  7. pablopoo commented on May 2, 2026

    @pablopoo

    same issue here for weeks.

  8. pablopoo commented on May 2, 2026

    @pablopoo

    per codex debug, the app is using the placeholder name in the generated markdown message, instead of the real filename.
    II I ask to display the image using the real filename works.
    If there is a process that translate the placeholder to the real name, also could be that.

  9. ex-devo commented on May 4, 2026

    @ex-devo

    Also happening for me, but this used to work a few days ago.

  10. yyxiaohui commented on Jul 14, 2026

    @yyxiaohui

    Additional macOS reproduction on the current extension-backed image path.

    Environment:

    • Codex Desktop 26.707.31428, build 5059
    • Embedded codex-cli 0.144.0-alpha.4
    • Darwin 25.3.0 arm64
    • ChatGPT Pro

    The code-mode call followed the tool contract exactly:

    const result = await tools.image_gen__imagegen({ prompt: "..." });
    generatedImage(result);

    Observed:

    • image generation completed successfully
    • a valid PNG was persisted locally: 1448 x 1086, 2,506,370 bytes
    • the outer functions.exec result contained an input_image data URL plus the output hint
    • no generated image card appeared in the conversation
    • the assistant message was empty because this build still instructed the agent not to say anything after image generation

    A separate no-generation canary, calling generatedImage with a valid 1 x 1 PNG data URL, also produced only a functions.exec tool output containing input_image; it did not produce a visible generated image card.

    I am not treating the absence of a legacy image_generation_call record as proof by itself, because PRs #31596, #31597, and #30188 changed the extension and rollout paths. The user-visible defect is that a successful extension result is present and valid, yet the extension-to-app display handoff renders nothing.

    This differs from the original WSL report only in that the PNG is saved successfully. It is also related to #32153, which reports the same Desktop version and image data reaching the session without a usable UI result.

    PR #32866 removes the post-generation silence instruction, which should prevent the empty-message symptom, but it does not appear to address the missing image display handoff.

    Expected: generatedImage output should be visible on the active tool surface or be projected into a renderable image item.

    I can share the private session through in-product feedback if maintainers need the full trace; no user paths or prompt contents are included here.

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

    appbugimagentool-callswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions