Codex Desktop image edits fail with 3+ reference images and certain benign prompt text
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- api, backend-api-design, desktop
Research direction
Start by reproducing the image_gen edit matrix against the built-in /backend-api/codex/images/edits entry point, comparing two versus three references and the failing prompt variant. Trace how the request is serialized and how backend failures become a generic network error. Done means supported multi-reference edits work or the limitation is documented, and rejected requests expose a structured failure category with a safe correlation ID.
Written by the indexing model from the issue text.
Description
What version of the Codex App are you using?
26.721.4979.0
What subscription do you have?
ChatGPT Pro
What platform is your computer?
Windows x64 (Codex Desktop)
What issue are you seeing?
Codex Desktop's built-in image_gen edit path fails deterministically for some valid reference-image requests and surfaces only a generic transport error:
network error: error sending request for url (https://chatgpt.com/backend-api/codex/images/edits)
The public Image API documentation demonstrates editing with four reference images:
https://developers.openai.com/api/docs/guides/image-generation#edit-images
I tested the Codex built-in tool using only the four official sample assets from that example (body-lotion.png, bath-bomb.png, incense-kit.png, and soap.png). The built-in Codex behavior differs from the documented public API capability.
Reproduction matrix
All requests were run serially in the same Codex Desktop environment.
| References | Prompt characteristic | Result |
|---|---|---|
| 0 | Simple image prompt | Success |
| 1 | Simple edit prompt | Success |
| 2 | Simple edit prompt | Success |
| 3 | Simple edit prompt | Fails with /codex/images/edits network error |
| 4 | Official four-image example structure | Same failure |
| 3 | All inputs converted to 512×512 JPEG, ~76 KB combined | Same failure |
| 1 | Label text RELAX |
Success |
| 1 | Label text Relax and Unwind |
Success |
| 1 | Label text A & B |
Success |
| 1 | Exact label text Relax & Unwind |
Repeatably fails with the same network error |
A separate real workflow also failed with only two small references (~92 KB total) and a short prompt, so image byte size alone does not explain the behavior.
Minimal reproduction A: reference count
- Download the official sample assets from the documentation link above.
- Invoke Codex Desktop's built-in
image_genedit flow with one or two references and a simple benign composition prompt. It succeeds. - Invoke it with three references and the same simple prompt. It fails.
- Convert the same three images to small 512×512 JPEGs (about 76 KB combined) and retry. It still fails.
Minimal reproduction B: prompt-specific failure
Use one official reference image and request a simple product composition with a readable label.
RELAXsucceeds.Relax and Unwindsucceeds.A & Bsucceeds.- Exact text
Relax & Unwindrepeatably fails.
The prompt is benign, and the semantically equivalent variants succeed. The failure is surfaced as a network error rather than a validation or policy error.
Expected behavior
- Codex Desktop should support the documented multi-reference edit capability, or clearly document a lower Codex-specific limit.
- A benign prompt variation should not produce a transport-shaped error.
- If the backend rejects the request, Codex should expose the actual structured failure category and a safe correlation/request ID instead of returning a generic network error.
Environment and controls
- Codex Desktop built-in
image_gen; no OpenAI SDK or direct Image API request. - ChatGPT-account authentication.
- VPN/proxy is present in the network path, but it does not fully explain the result: in the same session, zero-reference, one-reference, and two-reference requests succeed, while three-reference requests fail even at ~76 KB combined.
- The ChatGPT web image workflow succeeds with the same account, prompt, and images.
- Test date: 2026-07-27 (UTC+8).
Questions for maintainers
- Does the Codex internal
/backend-api/codex/images/editswrapper have an undocumented two-reference limit? - Is a prompt validation or moderation failure being incorrectly surfaced as
network error? - Could multipart upload/serialization or internal request shaping differ between two and three reference images?
- Can the built-in tool return a structured status and safe correlation ID for diagnosis?
Privacy
This report uses only OpenAI's official sample assets. No user product images, private filesystem paths, credentials, or full session logs are included.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·