openai / openai/codex

Codex Desktop image generation repeatedly fails with 502 upstreamerror

Open
#43,212 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug connectivity imagen
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

26.901.51231 Powered by Codex & OWL

What subscription do you have?

ChatGPT subscription exact tier not provided

What platform is your computer?

Darwin 25.6.0 arm64 arm macOS 26.6.2 Build 25G83

What issue are you seeing?

Image generation in Codex Desktop consistently fails after several minutes. The failure occurs both when a JPG visual reference is included and when the request is text-only.

Full error:
image generation failed: http 502 Bad Gateway: {"error": {"type": "upstream_error", "message": "Failed to forward Codex image request"}}

No generated image is returned. No reference images, prompts, conversation content, local paths, task links, account identifiers, or other private data are included in this report.

What steps can reproduce the bug?
  1. Open Codex Desktop.
  2. Start an image-generation request.
  3. Submit the request with a JPG visual reference.
  4. Wait several minutes. The request fails with HTTP 502.
  5. Retry using an image already available in the conversation. The same error occurs.
  6. Retry with a text-only image-generation request, without forwarding an attachment. The same error occurs.

Observed frequency: 5 completed attempts; 5 out of 5 returned the same upstream_error. One separately interrupted attempt is not counted.

What is the expected behavior?

Codex should return the generated image. If the request cannot be processed, it should return a specific validation or policy error instead of an upstream gateway failure.

Additional information

Date: September 6, 2026
Time zone: UTC+8

The error is reproducible with multiple image-input methods and with a text-only request, suggesting the failure is not specific to the attachment or prompt content. Retrying did not resolve the issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file, test, or code entry point is named in the report. Start by reproducing the request in Codex Desktop and inspecting its logs or HTTP response; done means image generation succeeds or a specific validation or policy error is returned instead of HTTP 502.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos
Domain
api, desktop
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.