codex - 💡(How to fix) Fix Codex App built-in image_gen lacks deterministic gpt-image-2 output dimensions for generate and edit workflows [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#19175Fetched 2026-04-24 05:59:24
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

Root Cause

In ChatGPT web I can generate high-quality GPT-image-2 images and edit/iterate them while choosing specific output dimensions. In macOS Codex App, that does not appear to be available in the built-in path. In practice, this makes my workflow impossible, because I need exact dimensions on both the initial generation and subsequent edits.

Code Example

{ "type": "image_generation", "output_format": "png" }
RAW_BUFFERClick to expand / collapse

What variant of Codex are you using?

Codex App on macOS (26.417.41555 (1858)), Pro

What feature would you like to see?

I need the built-in image_gen / image_generation path in Codex App to support explicit, deterministic output dimensions for GPT Image workflows.

In ChatGPT web I can generate high-quality GPT-image-2 images and edit/iterate them while choosing specific output dimensions. In macOS Codex App, that does not appear to be available in the built-in path. In practice, this makes my workflow impossible, because I need exact dimensions on both the initial generation and subsequent edits.

From the public Codex repo, the current built-in tool surface still appears to expose only:

{ "type": "image_generation", "output_format": "png" }

Relevant file:

  • codex-rs/tools/src/tool_spec.rs

By contrast, the CLI fallback now defaults to gpt-image-2 and already supports arbitrary valid WIDTHxHEIGHT sizes, with validation rules for:

  • max edge <= 3840
  • both dimensions multiples of 16
  • aspect ratio <= 3:1
  • total pixels between 655,360 and 8,294,400

Relevant file:

  • codex-rs/skills/src/assets/samples/imagegen/scripts/image_gen.py

What I need from the built-in Codex App path:

  • explicit size support on built-in image_gen
  • arbitrary valid WIDTHxHEIGHT, not only a few presets
  • exact size control on both initial generation and edit iterations
  • deterministic output sizing instead of prompt-only guessing
  • clear validation errors for invalid sizes rather than silent fallback

This is the parity gap I’m trying to close:

  • ChatGPT web: exact-dimension GPT Image workflow available
  • Codex CLI fallback: gpt-image-2 size control available
  • Codex App built-in image_gen: no explicit dimension control exposed

Additional information

Related issues:

  • #18636 Ability to reliably generate transparent images
  • #18905 Codex image generation saves transparent-background requests as opaque RGB PNGs
  • #18944 Built-in image_gen is missing basic image controls like transparent background, size, quality, and masks (closed as duplicate)

Those threads are related, but my blocker is specifically deterministic built-in dimension control in the macOS app workflow, for both generate and edit.

extent analysis

TL;DR

To address the issue, the image_gen tool in the Codex App needs to be updated to support explicit, deterministic output dimensions for GPT Image workflows, similar to the ChatGPT web and Codex CLI fallback.

Guidance

  • Review the codex-rs/tools/src/tool_spec.rs file to understand the current implementation of the image_generation tool and identify where dimension control can be added.
  • Consider modifying the image_gen tool to accept a size parameter, allowing users to specify arbitrary valid WIDTHxHEIGHT sizes, with validation rules applied to ensure dimensions meet the required criteria (e.g., max edge <= 3840, multiples of 16, aspect ratio <= 3:1, total pixels between 655,360 and 8,294,400).
  • Refer to the codex-rs/skills/src/assets/samples/imagegen/scripts/image_gen.py file for guidance on implementing size validation and control in the image_gen tool.
  • Test the updated image_gen tool to ensure it produces deterministic output sizing and provides clear validation errors for invalid sizes.

Example

No code example is provided as the issue requires modifications to the existing image_gen tool, which is not fully specified in the issue.

Notes

The solution will require updates to the Codex App's image_gen tool to support explicit dimension control, which may involve modifying the tool's configuration or implementation.

Recommendation

Apply a workaround by using the Codex CLI fallback, which already supports arbitrary valid WIDTHxHEIGHT sizes, until the built-in image_gen tool is updated to support explicit dimension control.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING