Codex App built-in image_gen times out after ~240s for ordinary card-art prompts while simple prompts succeed

Open 💬 14 comments Opened Jun 23, 2026 by dondong

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

OpenAI Codex 26.616.71553 (4265)

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Darwin 25.5.0 arm64 arm macOS 26.5.1 Build 25F80 Apple Silicon

What issue are you seeing?

The Codex App built-in image_gen tool works for a very simple image prompt, but consistently times out for ordinary, policy-safe card-art illustration prompts.

A minimal prompt generated successfully in approximately 40 seconds:

"A single matte red wooden cube centered on a plain light gray background, soft studio lighting, no text, no logo."

However, an ordinary illustration prompt consistently ran for approximately 240 seconds and then failed:

"Square cel-shaded anime illustration: one young fantasy scout stepping across a shallow creek in dark storm ruins, centered full body, navy and brown clothing, cyan highlights, generous margins, no text or frame."

The resulting error was:

image generation failed: network error: error sending request for url (https://chatgpt.com/backend-api/codex/images/generations)

Image generation with three valid local PNG reference images also failed after approximately 240 seconds:

image generation failed: network error: error sending request for url (https://chatgpt.com/backend-api/codex/images/edits)

The same behavior occurred with:

  • a detailed structured prompt;
  • a shortened prompt;
  • an extremely short one-sentence prompt;
  • local image references passed through referenced_image_paths;
  • conversation images passed through num_last_images_to_include;
  • a text-only generation request with no image references.

The tool invocation itself appears valid because:

  • the minimal red-cube prompt succeeded with the same image_gen tool;
  • requests passed argument validation and reached the correct generations or edits endpoint;
  • invalid parameters would normally fail immediately rather than after approximately four minutes.

The Codex App has been restarted multiple times. ChatGPT's normal conversational image generation works on the same account and network.

This appears to be a Codex image-generation backend timeout, queueing, rate-limiting, or error-reporting problem rather than an invalid prompt or invocation.

What steps can reproduce the bug?

  1. Open Codex App on macOS.
  1. Start a new thread.
  1. Invoke the built-in image_gen tool without references:

tools.image_gen__imagegen({
prompt: "A single matte red wooden cube centered on a plain light gray background, soft studio lighting, no text, no logo."
})

  1. Observe that the image succeeds in approximately 40 seconds.
  1. Invoke the same built-in tool with this policy-safe illustration prompt:

tools.image_gen__imagegen({
prompt: "Square cel-shaded anime illustration: one young fantasy scout stepping across a shallow creek in dark storm ruins, centered full body, navy and brown clothing, cyan highlights, generous margins, no text or frame."
})

  1. Wait approximately 240 seconds.
  1. Observe this failure:

image generation failed: network error: error sending request for url (https://chatgpt.com/backend-api/codex/images/generations)

  1. Optionally retry with valid local PNG reference images:

tools.image_gen__imagegen({
referenced_image_paths: [
"<redacted-path>/reference-1.png",
"<redacted-path>/reference-2.png",
"<redacted-path>/reference-3.png"
],
prompt: "<ordinary policy-safe card illustration prompt>"
})

  1. After approximately 240 seconds, observe:

image generation failed: network error: error sending request for url (https://chatgpt.com/backend-api/codex/images/edits)

  1. Restarting Codex App and repeating the test does not resolve the issue.

What is the expected behavior?

The built-in image_gen tool should successfully generate ordinary policy-safe illustrations, including requests with valid local reference images.

If the backend rejects, rate-limits, queues, or times out a request, Codex should fail promptly and expose a specific structured error instead of waiting approximately four minutes and returning a generic network error.

Simple and more detailed prompts should use the same reliable generation path.

Additional information

Authentication:

  • Signed into Codex through ChatGPT.
  • No OPENAI_API_KEY is configured.
  • The built-in image_gen workflow is documented as not requiring an API key.

Control test:

  • Simple red-cube generation succeeded.
  • Ordinary illustration prompts repeatedly failed.
  • Therefore, the image_gen tool is present, callable, and at least partially authenticated.

Reference-image validation:

  • All three reference files were readable PNG images.
  • Two were square.
  • One was a wide landscape image.
  • The same failure occurred without any reference images, ruling out local file paths as the sole cause.

At least six image-generation attempts failed across the generations and edits endpoints.

ChatGPT conversational image generation works normally on the same account and network.

Possibly related but not identical:
https://github.com/openai/codex/issues/23015

That report concerns Codex CLI reconnecting for a much longer period after an image-generation rejection. This report concerns Codex App requests failing after approximately 240 seconds with a generic backend network error.

View original on GitHub ↗

14 Comments

jxb127039-hash · 1 month ago

I can reproduce the same failure on the current macOS Codex Desktop build.

Environment

  • Codex App: 26.623.81905
  • Bundled CLI: codex-cli 0.142.5
  • Subscription: ChatGPT Plus
  • macOS: 26.5.2 (25F84)
  • Architecture: Apple Silicon / arm64
  • Authentication: signed into Codex with ChatGPT; built-in image generation path, no API key

Observed behavior

On July 2, 2026, multiple calls to the built-in image_gen tool entered the generating state, waited approximately 4–5 minutes, and then failed with:

image generation failed: network error: error sending request for url (https://chatgpt.com/backend-api/codex/images/generations)

This reproduced:

  • in multiple fresh Codex threads;
  • with both a detailed Chinese infographic prompt and a shorter retry prompt;
  • after restarting Codex;
  • across multiple network/VPN exit regions.

The tool is present and accepts the request; the failure occurs only after the long wait.

Control evidence

  • ChatGPT conversational image generation succeeds with the same ChatGPT account and network.
  • Codex built-in image generation previously succeeded on this machine through June 30, 2026.
  • Codex Desktop updated on July 1, 2026; the repeated failures started after the update.
  • The error is isolated to the Codex image endpoint rather than general ChatGPT access or account image entitlement.
  • A direct endpoint probe from the affected environment received a Cloudflare challenge response (HTTP 403, cf-mitigated: challenge), although the authenticated Codex tool surfaces only the generic network error.

Expected behavior

Codex should either complete image generation or surface the actual structured backend/Cloudflare/rate-limit error promptly instead of waiting 4–5 minutes and reporting a generic network failure.

Related local Codex thread ID available for investigation: 019f2147-4911-7dd2-af11-b696469e1e2f.

This looks identical or very close to the timeout reported here, with the additional signal that ChatGPT image generation continues to work normally on the same account and network.

jxb127039-hash · 1 month ago

Follow-up after updating Codex Desktop on July 3, 2026: the issue is only partially improved and remains reproducible for complex image requests.

Updated environment

  • Previous Codex App build: 26.623.81905
  • Current Codex App build: 26.623.101652
  • Bundled CLI remains: codex-cli 0.142.5
  • macOS: 26.5.2 (25F84)
  • Apple Silicon / arm64
  • ChatGPT Plus authentication

A/B result after the app update

Simple control prompt succeeded

A minimal prompt requesting one matte red wooden cube on a light gray background completed successfully in approximately 16 seconds.

Complex prompt still timed out

A policy-safe Chinese educational infographic prompt requested:

  • vertical 4:5 layout;
  • six connected causal steps;
  • large Chinese headings and labels;
  • simple cartoon icons;
  • two summary sections.

The request remained in the generating state for approximately four minutes, then failed with the same error:

image generation failed: network error: error sending request for url (https://chatgpt.com/backend-api/codex/images/generations)

Compressed fallback succeeded

Immediately afterward, the content was reduced from six detailed steps plus two summary sections to four short steps and one summary section. That simplified request succeeded in approximately one minute.

Comparison with ChatGPT Images

ChatGPT Images successfully generated a substantially denser version from the same source material and account/network: eight causal steps, multiple analysis sections, policy recommendations, illustrations, and Chinese text.

This makes an account entitlement or general image-model outage unlikely. The observed boundary is now:

  • simple / compressed prompt: succeeds;
  • detailed structured infographic prompt: consistently reaches the ~240-second boundary and fails with a generic network error.

The update restored basic generation but did not resolve complex-request timeout handling.

Requested improvement

Please consider:

  1. allowing long-running image jobs to continue asynchronously beyond the current timeout;
  2. polling a server-side generation job instead of holding one request open;
  3. returning the actual backend status (queue timeout, moderation, rate limit, gateway timeout, etc.) instead of mapping everything to network error;
  4. exposing a lower-quality/draft option in the built-in tool so complex layouts can complete reliably.

Affected Codex thread: 019f2147-4911-7dd2-af11-b696469e1e2f.

longer96 · 1 month ago

network error: error sending request for url (https://chatgpt.com/backend-api/codex/images/edits)

I also encountered this problem. I uploaded 3 reference images, but the images couldn't be generated

babysorry · 1 month ago

Additional cross-network/device A/B evidence (July 16–17, 2026)

I reproduced the same behavior with the current unified ChatGPT/Codex desktop build and collected several useful controls.

Environment

  • Desktop app: 26.715.21425 (5488)
  • Runtime recorded by current Codex tasks: 0.145.0-alpha.18
  • Standalone Codex CLI: 0.144.5
  • macOS: 15.7.7 (24G720)
  • Architecture: Intel x86_64
  • Authentication: signed in with ChatGPT
  • Official built-in imagegen only; no API-key fallback and no third-party portrait skill

Most useful A/B test: same Mac, account, app build, and phone hotspot

Adult portrait failed twice

Codex session: 019f6dd9-37ef-7d21-affd-71c06a6e3264

The prompt requested a clearly adult 25-year-old East Asian woman, a tasteful photorealistic half-length historical portrait, vermilion clothing, soft palace lanterns, no text or watermark. The first built-in call failed after roughly two minutes. A second, simplified English version failed after roughly four minutes. Total task duration was 448737 ms (about 7m29s). Both returned:

image generation failed: network error: error sending request for url (https://chatgpt.com/backend-api/codex/images/generations)

Both terminal events were:

image_generation_end
status: failed
result: ""

No-person landscape succeeded

Codex session: 019f6dda-675a-7900-ba10-b0ef91601a14

Prompt: “Generate a distant view of Mount Fuji, with no people.”

The image-generation event completed in about 64 seconds and the whole task completed in 98022 ms (about 1m38s), returning and saving a PNG.

This makes the phone-hotspot comparison particularly useful: the network, machine, account, app build, and approximate test time were the same, while the ordinary adult portrait repeatedly failed and the no-person landscape completed normally.

Other controls

  • 019f6b2a-e96c-79b3-a80f-d8cde6300193: a wireless-earbud product image completed in about 74 seconds; total task duration 86046 ms.
  • 019f64a2-e0dd-7530-bc89-9a1a722c26d6: the same policy-safe adult-woman-on-a-train prompt first timed out twice in one turn (about 21 minutes total), then succeeded when submitted unchanged without prompt expansion/translation; the successful generation took about 78 seconds and the turn about 91 seconds.
  • 019f6dc7-3416-7002-8bfc-ba853c29617d: after disabling project .env proxy variables, a Chinese structured version and a simplified English version of the adult portrait both failed after roughly five minutes each with the same generations-endpoint network error. Total task duration: 674061 ms (about 11m14s).
  • Two other short adult portrait prompts (019f64b4-b8d5-7aa2-8dc4-18721933877d and 019f64b5-2d40-76e1-be7d-7174740bc709) succeeded on July 15 in roughly 58–65 seconds of generation time. This shows that adult-person content is not categorically rejected and the failure is intermittent.

Network and device matrix

The same long waits or failures were observed across:

  • company network;
  • home network;
  • phone hotspot;
  • Clash Verge Global mode;
  • Clash Verge TUN mode;
  • multiple proxy nodes;
  • a different proxy provider;
  • project proxy environment variables disabled;
  • this macOS machine;
  • another Windows machine.

At home, one person-image request eventually succeeded after approximately six minutes, while another failed. The Windows machine showed the same general intermittent/slow behavior. Corporate routing or proxy quality may influence reliability, but it cannot explain all results.

ChatGPT Chat vs. Codex task control

The updated desktop app now displays ordinary ChatGPT cloud chats and local Codex tasks in one sidebar, but they remain distinguishable: ChatGPT chats only expose chat actions, while Codex tasks expose a working directory, Codex session ID, deep link, and task continuation actions.

Using the same desktop app, account, and network, ordinary ChatGPT Chat successfully generated the same kind of adult portrait while a Codex task continued to fail. The successful Chat conversation did not create a corresponding local entry under ~/.codex/sessions.

This does not prove the exact server endpoint used by Chat, but it is a strong control showing that account image entitlement, the prompt category, and general access to ChatGPT image generation are working. The failure is more narrowly associated with the Codex built-in ImageGen dispatch/queue/timeout/result-return path.

About the session IDs

The representative Codex session IDs above are included only in case they can be correlated with internal telemetry. They are Codex session IDs, not image-backend request/job IDs. Local transcripts remain under ~/.codex/sessions, and the current ImageGen error does not expose a backend generation request ID.

If the session ID alone is not sufficient for internal correlation, exposing a generation job/request ID in future errors would make reports like this much more actionable.

Interpretation

The combined evidence is more consistent with intermittent Codex-specific queueing, timeout, or terminal-event handling than with an invalid prompt, adult-person policy rejection, missing account entitlement, or one broken proxy node. Possible failure modes include:

  1. a server-side generation job outliving the client request timeout;
  2. different prompt classes being assigned to different queues or processing paths;
  3. a real queue/rate-limit/gateway/moderation result being collapsed into generic network error;
  4. the image completing server-side but the Codex client failing to receive or recover the terminal result.

It would help if Codex could return a traceable image job/request ID, poll an asynchronous job rather than hold a single long request, distinguish queue/generation/transport/gateway/rate-limit errors, and resume result retrieval after a reconnect.

HeyStarXF · 1 month ago

Additional Windows CLI reproduction with precise timing data.

Environment

  • Codex CLI/TUI: 0.144.5
  • Platform: Windows, PowerShell / Windows Terminal
  • Model: gpt-5.6-sol
  • Authentication: ChatGPT sign-in; no API key used for the built-in tool
  • Ordinary text conversations and Responses WebSocket requests work normally

Control test: simple prompt succeeds

The built-in image_gen tool successfully generated a square image containing one centered blue circle on a white background.

  • Tool invocation started: 2026-07-17T04:01:31.505Z
  • Generation completed around: 2026-07-17T04:02:22.264Z
  • Approximate duration: 50.8 seconds

Complex prompt: repeatable timeout-like failure

A policy-safe, detailed technology-brand image prompt asked for the exact letters SXF integrated into a semiconductor chip, with cinematic 3D materials, circuit traces, communication elements, lighting, composition, and negative constraints.

Attempt 1:

  • Tool duration: 306,417 ms
  • Result: success=false

Attempt 2 used a shortened/simplified version of the same concept:

  • Tool duration: 306,213 ms
  • Result: success=false

Both attempts ended with exactly:

image generation failed: network error: error sending request for url
https://chatgpt.com/backend-api/codex/images/generations

The HTTP client log shows the POST session closing after approximately 306s idle time, with no useful HTTP status or structured backend error exposed.

Networking observations

  • Codex successfully reaches authenticated Codex endpoints; /backend-api/codex/models returns 200 OK.
  • Text conversations remain usable in the same session.
  • Different proxy exit nodes were tested.
  • The behavior correlates much more strongly with generation complexity/duration than with general connectivity: a simple image succeeds, while detailed prompts repeatedly terminate near the same ~306-second boundary.

Expected behavior

  1. Detailed but supported image-generation requests should be allowed enough time to finish, or use an asynchronous/polling delivery path that is not constrained by a single long-held request.
  2. If the backend queues, rejects, times out, or loses the generated result, Codex should return a structured error distinguishing service timeout, gateway timeout, moderation, overload, and client transport failure.
  3. Ideally expose a safe request/correlation ID so maintainers can determine whether the render completed server-side before delivery failed.

This Windows CLI reproduction appears to be the same underlying issue as the macOS App report, but with a very consistent ~306-second failure boundary. Full logs are available and can be shared after redacting account identifiers.

FELAX77 · 1 month ago

Additional Windows reproduction: simple generation succeeds, reference-image edits fail after network-path isolation

I can reproduce the same failure pattern on Windows with a current Codex Desktop build.

Environment

  • Codex Desktop: 26.715.3651.0
  • Bundled runtime / codex-cli: 0.145.0-alpha.18
  • Windows x64
  • Signed in through ChatGPT; built-in image_gen; no API key involved

Control and reproduction

  1. A minimal text-to-image request succeeded in approximately 18 seconds and returned a valid PNG.
  2. In the same app/account session, an edit using one readable local landscape PNG remained pending for roughly 148–180 seconds and then failed with:

``
image generation failed: network error: error sending request for url (https://chatgpt.com/backend-api/codex/images/edits)
``

  1. I re-encoded and downscaled the reference to a 960×540 JPEG (about 86 KB), copied it into the writable workspace, and retried. The same endpoint failed in the same way.
  2. The reference was independently readable through Codex's image-viewing path, so this was not simply an unreadable file.

Network isolation
The failure was reproduced through both:

  • an explicit local HTTP/HTTPS proxy; and
  • a TUN/direct route with NO_PROXY covering chatgpt.com, openai.com, oaiusercontent.com, oaistatic.com, oaistatsig.com, and challenges.cloudflare.com.

Direct endpoint reachability was available, and the minimal generation control still succeeded. ChatGPT web reference-image generation also works on the same account and network.

Sandbox check
The current Windows sandbox log reported successful setup with errors=[] during these reproductions. Older ACL setup failures seen on a previous build no longer reproduced, so changing the sandbox mode is not supported by this current run as the explanation or workaround.

Expected
A reference-image edit should return the generated image, or fail promptly with a specific terminal/backend status. Waiting several minutes and surfacing a generic network error makes a backend/terminal-result lifecycle failure indistinguishable from actual connectivity loss.

This Windows reproduction suggests the issue is not limited to macOS, reference file size/path, DNS/TCP reachability, or one proxy mode.

tonycky · 1 month ago
tonghonghao1025-star · 1 month ago

Fresh Windows reproduction on 2026-07-26.

Environment:

  • Codex Desktop: 26.721.4979.0
  • OS: Windows
  • Built-in image_gen through ChatGPT authentication
  • ChatGPT web image generation works normally on the same account/network

Sequential control test:

  1. Minimal square children's-book prompt succeeded after 112.9 seconds.
  2. A text-only 2:3 split-panel anime illustration prompt, with no reference images, failed after 346.8 seconds with:

image generation failed: network error: error sending request for url
(https://chatgpt.com/backend-api/codex/images/generations)

This has reproduced repeatedly:

  • simple prompts may succeed;
  • ordinary/complex illustration prompts wait several minutes and then fail;
  • restarting Codex may temporarily allow a simple request but does not restore reliable complex generation.

This closely matches the issue description and shows the problem is still present in Codex Desktop 26.721.4979.0 on Windows.

LEOJWL · 29 days ago

Fresh Windows reproduction with a tight ~304–306s edits boundary (2026-07-29)

I reproduced the same built-in ImageGen failure pattern on the current Windows Codex Desktop build and collected precise A/B timing.

Environment

  • Codex Desktop: 26.721.4979.0
  • Runtime recorded by the Codex session: 0.146.0-alpha.3.1
  • Windows x64
  • Model used by the Codex task: gpt-5.6-sol
  • Authentication: ChatGPT sign-in
  • Route: built-in image_gen; no API key and no standalone CLI used for image generation

A/B results

  • Simple text-only control in a fresh Codex task: succeeded in 57.636s.
  • Complex request with one readable local JPEG reference: succeeded once in 172.998s and returned a valid 1254×1254 PNG.
  • Four complex/reference edit calls failed in:
  • 303.808s
  • 306.467s
  • 303.697s
  • 306.015s

All four failures surfaced the same generic terminal error:

image generation failed: network error: error sending request for url
(https://chatgpt.com/backend-api/codex/images/edits)

No HTTP status, structured terminal cause, image request ID, or recoverable job ID was exposed.

The reference was a readable 946×945 JPEG of approximately 648 KiB. Because the same built-in route successfully generated an image from that reference once, an unreadable file or invalid path cannot be the sole cause. The four failures clustering inside a 2.8-second band around five minutes strongly suggests a fixed request-lifecycle or terminal-result boundary rather than random local connectivity loss.

This is consistent with the other Windows/macOS reports here: simple or faster jobs can complete, while slower generations/edits reach a repeatable long-request boundary and collapse to network error.

Requested diagnostics / behavior

  1. Expose a safe image request/job correlation ID.
  2. Distinguish queue, render, moderation, rate-limit, gateway, and transport failures.
  3. Allow long-running jobs to continue asynchronously or resume terminal-result retrieval after the client request disconnects.
  4. If a fixed client/gateway timeout exists, fail with a specific status instead of generic network error.
EmerenSolutions · 27 days ago

Fresh macOS reproduction on 2026-08-01 (current desktop build)

I can confirm that this is still reproducible on a newer macOS build.

Environment

  • Codex Desktop 26.727.51351 (build 6119)
  • Bundled codex-cli 0.146.0-alpha.9.2
  • macOS 26.6 (25G72), Apple Silicon arm64
  • ChatGPT-authenticated built-in image_gen

Reproduction

  • Made one text-only generation request with no reference images.
  • The request was a policy-safe landscape concept sheet containing five waist-up adult virtual-author designs, with no text or logos.
  • The image request remained active for approximately 296 seconds and then emitted image_generation_end with status: failed and an empty result.
  • Terminal error:
image generation failed: network error: error sending request for url
(https://chatgpt.com/backend-api/codex/images/generations)

No image was returned, and no retry was made.

This follows additional failures observed on 2026-07-31 on the same machine:

  • reference-guided /backend-api/codex/images/edits: generic network error after roughly five minutes;
  • text-only /backend-api/codex/images/generations: one generic network error and one HTTP 503 / upstream connection termination after roughly five minutes.

A trivial 10×10 white-image control succeeded earlier in the broader testing sequence, so the capability is at least intermittently reachable.

The near-five-minute boundary on the current macOS build matches the 303–306-second Windows evidence above and further supports a fixed Codex request/result-lifecycle timeout rather than prompt validation.

Codex session for correlation: 019fb749-9512-76e2-a622-7b9297d47051

smeshny · 26 days ago

Built-in image generation times out for moderately complex prompts while simple prompts succeed

The Codex desktop app's built-in image generation tool accepts image requests and begins processing them, but moderately complex illustration prompts eventually fail with a network error after approximately 4–5 minutes.

Very simple prompts complete successfully, which indicates that the image generation tool is enabled, authentication is working, and requests are reaching the backend. The failure appears to depend on generation complexity or processing time.

This behavior closely resembles the issue reported in #29645, but I am providing an additional controlled reproduction with successful and failed prompts from the same Codex session.

Environment

  • Application: Codex desktop app distributed inside ChatGPT.app
  • App version: 26.727.51351
  • Bundled Codex CLI: codex-cli 0.146.0-alpha.9.2
  • Operating system: macOS 26.6
  • macOS build: 25G72
  • Architecture: Apple Silicon (arm64)
  • Image generation method: Codex's native built-in image_gen tool
  • API key used: No
  • External image API or local image generation script used: No
  • Date reproduced: August 1, 2026

Steps to reproduce

Test 1: Simple object — succeeds

Start a new image generation request in Codex using the following prompt:

A single matte red wooden cube centered on a plain light gray background, soft studio lighting, no text, no logo.

Result

The request completes successfully in approximately 17 seconds and produces a valid 1536 × 1536 PNG image.

---

Test 2: Moderately complex single-panel illustration — fails

In the same Codex session, submit the following prompt:

A single-panel silent comic: a tired young digital artist at a desk proudly shows a finished drawing on a monitor, while a mischievous orange cat beside the keyboard has just unplugged the computer cable. Clear visual punchline, expressive faces, clean colorful European comic-book illustration, one panel only, no text, no logos.

Result

The request is accepted and continues processing for approximately 4–5 minutes. It then fails with:

image generation failed: network error: error sending request for url (https://chatgpt.com/backend-api/codex/images/generations)

No generated image is returned.

---

Test 3: Highly simplified comic — succeeds, but slowly

Submit the following reduced-complexity prompt:

Minimal one-panel black-ink comic on white: one simple stick-figure artist smiles at a tiny drawing, while an oversized pencil lies exhausted on the floor. Clear visual joke, sparse lines, no shading, no text.

Result

The request completes successfully after approximately 2–3 minutes and produces a valid 1536 × 1024 PNG image.

Expected behavior

The built-in image generation tool should either:

  1. Complete the requested generation regardless of whether it takes longer than the usual processing time; or
  2. Return a structured backend error explaining the actual failure, such as a generation timeout, queue timeout, capacity issue, or rate limit.

A generation that is still processing should not eventually surface as a generic client-side network error.

Actual behavior

  • Simple object prompts complete quickly.
  • Simplified illustration prompts may complete after several minutes.
  • Moderately complex illustration prompts consistently fail after approximately 4–5 minutes.
  • The only returned error is a generic network error for the following endpoint:
https://chatgpt.com/backend-api/codex/images/generations

The request is not rejected immediately, so this does not appear to be a prompt validation, authentication, or tool availability problem.

Reproducibility

The failure was reproduced multiple times with:

  • A four-panel comic request
  • A single-panel comic request
  • A shortened version of the illustration prompt
  • A retry in the same session

The common behavior is:

  1. Codex accepts the request.
  2. Image generation begins.
  3. The request remains active for several minutes.
  4. It fails near the apparent backend timeout boundary.
  5. Codex reports a network error for /backend-api/codex/images/generations.

At the same time, very simple prompts continue to succeed.

Diagnostics performed

I verified the following:

  • The image_generation feature is enabled in the Codex desktop logs.
  • Codex can invoke the native built-in image_gen tool.
  • A valid image can be generated from a simple prompt in the same session.
  • The Codex usage limit was not exhausted.
  • No OpenAI API key was involved.
  • No custom SDK, CLI wrapper, HTTP client, local image model, or third-party image API was involved.
  • Removing custom image-generation integrations did not change the behavior.
  • Retrying the failed request produced the same result.
  • The app logs did not show a local skill-loading or authentication error.
  • OpenAI Status showed no active general outage during the reproduction.

Suspected cause

Based on the controlled tests, this appears to be an upstream timeout, queueing, or connection-lifetime issue in the Codex image generation backend.

The request seems to continue processing until it reaches a fixed timeout boundary. More expensive generations are more likely to cross that boundary and fail, while lightweight generations finish before it.

The generic network error may therefore be masking a backend generation timeout or an upstream connection being closed before the image is returned.

Impact

This makes the built-in image generator unreliable for normal creative work involving:

  • Multiple characters
  • Comic panels
  • Detailed environments
  • Complex compositions
  • Stylized illustrations
  • Requests that require more than a few minutes of processing

The current workaround is to simplify the prompt aggressively and generate one very simple element or panel at a time. This significantly limits the usefulness of the built-in image generation feature.

Suggested improvements

It would be helpful to:

  1. Increase or remove the fixed request timeout for active image generations.
  2. Keep long-running generations alive through polling or an asynchronous job mechanism.
  3. Return a structured timeout or capacity error instead of a generic network error.
  4. Preserve the generation job after the client connection times out, allowing the app to retrieve the result later.
  5. Expose a request or generation ID that users can include in bug reports.
  6. Add retry handling when the upstream connection closes while the generation is still running.
  7. Clarify whether different prompt complexities are routed to different generation queues or timeout policies.

Additional information

The successfully generated simple image and simplified comic confirm that the native tool itself is available and functional. The failure boundary appears to be related to generation duration or backend workload rather than installation or configuration.

I can provide the relevant sanitized Codex desktop log excerpts if needed.

Additional controlled test: reasoning level

I repeated the exact same moderately complex prompt after changing the Codex reasoning level from medium to max.

The result did not change:

  • The request was accepted.
  • Generation remained active for approximately 4 minutes.
  • It failed with the same network error for /backend-api/codex/images/generations.

This suggests that the failure is independent of the Codex reasoning setting and occurs after the native image-generation tool has already been invoked.

Timeout configuration investigation

I inspected the current openai/codex implementation.

The built-in image-generation extension performs a synchronous HTTP POST through ImagesClient. The generated request has timeout: None, and the default HTTP client does not set a whole-request timeout.

Therefore, the approximately 240-second failure does not appear to be caused by a configurable local Codex request timeout.

The documented stream_idle_timeout_ms option applies to streaming Responses API connections and is not used by the unary images/generations request path.

This suggests that the connection is being closed by the Codex image backend or an upstream gateway. Increasing a local waiting period would not solve the issue because the client receives a terminal network error and is not given a generation ID that could be polled afterward.

A robust fix may require an asynchronous generation job:

  1. Submit the image request.
  2. Return a generation/job ID immediately.
  3. Poll or stream generation status.
  4. Retrieve the completed image independently of the original HTTP connection lifetime.
ptoyip · 25 days ago

I can reproduce this on a newer Codex Desktop build.

Environment

  • Codex Desktop: 26.727.51351 (6119)
  • macOS 15.4.1 (24E263), Apple Silicon / arm64
  • Auth: signed in through ChatGPT; built-in image_gen; no API key used
  • Reproduced on 2026-08-03 (Asia/Shanghai)

Reproduction

  1. Use the built-in image_gen tool for an identity-preserving pixel-pet sprite edit.
  2. Pass one valid local PNG through referenced_image_paths (768×1134, 696 KB).
  3. Use a policy-safe prompt asking only to preserve the existing proportions and correct a limited color palette.
  4. Wait approximately 4–5 minutes.

Actual result

image generation failed: network error: error sending request for url (https://chatgpt.com/backend-api/codex/images/edits)

I reproduced this repeatedly after:

  • reducing the reference set from four images to one;
  • shortening the prompt to a single concise paragraph;
  • retrying through multiple independent built-in tool calls.

No edited image was returned. Ordinary image generation still works on the same account and network, which matches the differential behavior reported here. Basic connectivity to chatgpt.com is healthy, so this appears specific to the long-running authenticated Codex image-edit request rather than a general local network outage.

This confirms the issue is still reproducible on 26.727.51351, newer than the build in the original report.

saya-k · 25 days ago

I have a controlled A/B rollback result on Windows that narrows this down to a Codex Desktop app regression.

A/B result

  • Codex Desktop 26.721.81911: the same Halloween packaging image request completed successfully in about 3m 18s.
  • Codex Desktop 26.727.51351: the same request consistently fails after the long wait with:
image generation failed: network error: error sending request for url (https://chatgpt.com/backend-api/codex/images/generations)
  • Rolling back to 26.721.81911 immediately restores image generation.
  • Updating again to 26.727.51351 immediately reproduces the failure.
  • The bundled Codex core remained 0.146.0 in the local diagnostics.
  • Both tests used the same GPT-5.5 selection, ChatGPT account, prompt type, network, TUN/proxy configuration, and firewall settings.
  • ChatGPT web image generation continues to work on the same account and network.

Because the model, account, network, and bundled core were unchanged, while changing only the Desktop app build toggles the failure on and off, this appears more likely to be a regression in the Desktop app's image-tool bridge / long-running request handling than a general connectivity or entitlement problem.

Please compare the image request transport, proxy handling, connection lifetime, and response handoff between builds 26.721.81911 and 26.727.51351.

17380853402 · 24 days ago

I can confirm that this remains reproducible on a newer Windows Codex Desktop build and is severely disrupting production image work.

Environment

  • Codex Desktop: 26.727.6591.0
  • OS: Windows 11 Home, build 26200, x64
  • Authentication: signed in through ChatGPT
  • Image path: built-in image_gen tool; no API fallback used
  • Reproduced: 2026-08-03 (Asia/Shanghai)

Latest production reproduction

A normal policy-safe 9:16 educational cover edit used four valid local reference images for subject identity and visual style. The request was accepted by the built-in tool, then failed at the authenticated Codex image edit endpoint:

image generation failed: network error: error sending request for url (https://chatgpt.com/backend-api/codex/images/edits)

The latest failed call ran for approximately 47.5 seconds before returning the terminal network error. Earlier attempts on the same machine have also remained active for approximately 4–5 minutes before returning the same error.

The failure persists after:

  • reducing the reference-image count;
  • shortening and simplifying the prompt;
  • retrying in fresh and existing threads;
  • testing both /images/generations and /images/edits.

Controlled evidence on the same build

On the same Codex build, account, machine, and active network/proxy configuration:

  1. A minimal text-only image generation succeeded in about 22 seconds.
  2. A minimal edit of that generated image succeeded in about 97 seconds.
  3. A minimal edit using one local reference image succeeded in about 96 seconds.
  4. A real production edit with four valid local references later failed at /backend-api/codex/images/edits.

This mixed success/failure pattern makes a static authentication, entitlement, local file-read, or VPN configuration problem unlikely. It matches the issue described here: lightweight control requests may succeed, while normal production requests fail unpredictably at the Codex-specific image endpoints.

Impact

This is not an occasional cosmetic failure. It repeatedly blocks paid production work because no partial image, generation ID, structured backend error, or actionable retry interval is returned. Users spend minutes waiting and then must restart the entire generation.

Please prioritize:

  • preserving long-running generation jobs independently of the original HTTP connection;
  • returning a generation/request ID;
  • exposing the actual timeout, rate-limit, queue, gateway, or backend error;
  • adding automatic retry/resume handling for terminal network failures;
  • investigating the Desktop image-tool bridge regression reported between the 26.721 and 26.727 build families.

Sanitized affected Codex thread ID available for investigation: 019fc577-690a-7d82-abc5-216af8c79bd7.