Codex Desktop repeatedly disconnects when analyzing images; still reproducible after #32394

Open 💬 3 comments Opened Jul 14, 2026 by gh286991
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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

Exact version not available at the time of filing. I am using the current Codex Desktop app available on July 14, 2026. I can provide the exact build number if needed.

What subscription do you have?

ChatGPT Plus

What platform is your computer?

macOS

What issue are you seeing?

During this week, Codex Desktop has repeatedly become unstable when a task involves images. Text-only tasks are comparatively more reliable, but when Codex needs to inspect or analyze an image, the session often enters a reconnect loop and eventually fails with:

stream disconnected before completion: websocket closed by server before response.completed

The behavior appears specifically correlated with image-related tasks rather than normal text-only prompts.

A very similar report was filed in #32394 and later closed after the original reporter suspected a local network issue. However, I am seeing the same behavior independently, and another user also reported continued reproduction after that issue was closed. This suggests the problem may not be limited to one user's network environment.

What steps can reproduce the bug?

  1. Open Codex Desktop on macOS.
  2. Start a new or existing conversation.
  3. Attach an image, or ask Codex to inspect an image used by the project.
  4. Ask Codex to analyze the image or use it as a visual reference.
  5. Wait for the task to run.
  6. Codex frequently enters repeated Reconnecting... states and may terminate with the WebSocket error above.

What is the expected behavior?

Codex should analyze the image and finish the task normally. If a transient network interruption occurs, the client should recover without leaving the current response or conversation unusable.

Additional information

  • Date observed: week of July 13–14, 2026.
  • The issue has occurred repeatedly rather than as a one-time failure.
  • Related reports:
  • #32394 — image analysis causing a reconnect loop in Codex Desktop
  • #32868 — WebSocket disconnect after viewing images in a Codex CLI turn
  • #33018 — unusually slow image-input turns in Codex Desktop on macOS

Please investigate whether image inputs are increasing the likelihood of server-side WebSocket termination or causing the client to fail to recover before response.completed.

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 1 month ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #32394
  • #32868

Powered by Codex Action

Moncefmd · 1 month ago

Same thing happens to me. This problem is extremely annoying as the work eventually just starts fully stopping with a

stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses)

The only (very painful given what I'm working on) workaround I found is to hand off a threads work to a fresh one whenever a few images are generated (through imagegen). I also sometimes use subagents but those don't have the same level of context to have the best quality for what I want to do.

I end up with a lot of threads in my project and have to manually manage them.

Another workaround has been my google subscription to do this type of work instead. While its not super good and not that reliable, at least I can go through a full pass of of generated images without Antigravity lagging and stopping by itself every few minutes (plus they have extremely fast token output rate).

henson957 · 1 month ago

I can reproduce a closely related failure in Codex Desktop on macOS (observed 2026-07-24).

Key distinction: the app's ordinary text-only conversation remained connected and usable throughout. The reconnect loop was isolated to separate task threads that handled image assets.

Observed sequence:

  1. A task generated four images (one cover plus three article images).
  2. The task then stalled during the handoff from image results to local file processing, while the UI repeatedly showed “Reconnecting…”, reaching 4/5 retries.
  3. I started a fresh recovery task using the already-written local PNG files and explicitly prohibited image generation, image display, and visual inspection. That task also entered repeated reconnects before completing.
  4. No sensitive logs, raw image data, project contents, credentials, or screenshots are attached.

This does not look like a general local connectivity outage: normal text-only interaction in the same Codex Desktop session stayed stable while the image-related task threads repeatedly reconnected.

A useful fix would be to keep large image/tool results out of replayed thread payloads (or replace them with lightweight file references), and to expose a specific diagnostic when a task stream is retried because of a large multimodal/history payload rather than showing only generic reconnect progress.