image_gen returns unrelated educational infographic instead of requested UI mockup

Resolved 💬 2 comments Opened Apr 23, 2026 by ai-da-stas Closed Apr 23, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What issue are you seeing?

When using Codex's built-in image_gen tool to generate a SaaS admin UI mockup, the tool repeatedly returns a completely unrelated educational infographic/poster instead of the requested dashboard screen.

The requested asset is a cropped tab content block for a software console UI. The prompt explicitly asks for a "software dashboard UI mockup", "SaaS admin console", "not a poster", "not an infographic", "not a map", and "not an illustration". Despite that, multiple attempts produced unrelated poster-like educational images, including medical/anatomy-style content.

This looks like the image generation tool is ignoring or losing the prompt semantics for this specific UI mockup request.

Here are the pictures I received after the problem occurred:

<img width="1402" height="1122" alt="Image" src="https://github.com/user-attachments/assets/bde56591-0ae1-4878-9773-b10cc6840c7b" />

<img width="1536" height="1024" alt="Image" src="https://github.com/user-attachments/assets/2937b9fc-5b7e-433a-803f-7e28b0f36804" />

What steps can reproduce the bug?

  1. Start Codex CLI in a local repository.
  2. Use the built-in image_gen tool.
  3. Ask it to generate a PNG UI mockup for a SaaS admin console tab named "Права и секреты" / "Permissions and secrets".
  4. Include explicit negative instructions such as:
  • "software dashboard UI mockup"
  • "not a poster"
  • "not an infographic"
  • "not a map"
  • "not a medical diagram"
  • "no decorative illustration"
  1. Repeat the request several times with simplified prompts and with an existing generated UI mockup shown as visual context.
  2. Observe that image_gen still returns unrelated poster/infographic content instead of the requested UI.

Example prompt excerpt:
"Generate a clean enterprise SaaS admin console UI mockup, PNG, 16:9. This must be a software dashboard screen fragment only: no poster, no map, no photo, no illustration, no full app sidebar. Product: kodex staff console. Section: package catalog. Active tab: Permissions and secrets."

Expected behavior:

The image_gen tool should generate a UI mockup matching the requested SaaS admin console tab, or return a clear error if it cannot satisfy the request.

It should not silently return unrelated educational, medical, or poster-like content when the prompt explicitly requests a software dashboard UI and explicitly excludes those categories.

What is the expected behavior?

<img width="1672" height="941" alt="Image" src="https://github.com/user-attachments/assets/9a45c0d5-ffda-49f1-b3cb-9bb5e1c891f9" />

Additional information

Additional information:

Environment:

  • OS: Ubuntu 25.10 (questing)
  • Kernel: Linux 6.17.0-22-generic x86_64
  • Codex CLI: codex-cli 0.124.0
  • Node.js: v22.20.0
  • npm: 11.7.0
  • Python: 3.12.11
  • Git: 2.51.0
  • Date/time observed: 2026-04-24T02:07:52+04:00

Notes:

  • The issue occurred with the built-in image_gen tool in Codex.
  • A direct Images API fallback was intentionally not used for the final workflow.
  • Other UI mockups in the same session were generated successfully, so the failure appears prompt/task-specific rather than a total outage.
  • The generated image was not saved into the project because it was unrelated to the requested UI mockup.

View original on GitHub ↗

2 Comments

etraut-openai contributor · 4 months ago

Thanks for the bug report. We'll share the feedback with the team responsible for training our codex models. If you see other model behavior that you'd like to report, please use the /feedback command. That will provide us with additional details including logs and conversation text.

DatsIsaiah · 2 months ago

Currently happening with me too but my prompts are nowhere near related to infographics and it starts making religous charts but I have never mention religioin once in any chats.