Codex Desktop image edits fail with 3+ reference images and certain benign prompt text

Open 💬 0 comments Opened Jul 27, 2026 by xinlingwj-ai

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

  1. Download the official sample assets from the documentation link above.
  2. Invoke Codex Desktop's built-in image_gen edit flow with one or two references and a simple benign composition prompt. It succeeds.
  3. Invoke it with three references and the same simple prompt. It fails.
  4. 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.

  • RELAX succeeds.
  • Relax and Unwind succeeds.
  • A & B succeeds.
  • Exact text Relax & Unwind repeatably 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

  1. Does the Codex internal /backend-api/codex/images/edits wrapper have an undocumented two-reference limit?
  2. Is a prompt validation or moderation failure being incorrectly surfaced as network error?
  3. Could multipart upload/serialization or internal request shaping differ between two and three reference images?
  4. 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.

View original on GitHub ↗