Skip to content

image_gen returns unrelated educational infographic instead of requested UI mockup #19219

@ai-da-stas

Description

@ai-da-stas

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:

Image Image

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?

Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIbugSomething isn't workingmodel-behaviorIssues related to behaviors exhibited by the modeltool-callsIssues related to tool calling

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions