Repository navigation
Codex Desktop repeatedly disconnects when analyzing images; still reproducible after #32394 #33094
Description
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?
- Open Codex Desktop on macOS.
- Start a new or existing conversation.
- Attach an image, or ask Codex to inspect an image used by the project.
- Ask Codex to analyze the image or use it as a visual reference.
- Wait for the task to run.
- 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:
- Viewing images causes sessions to be stuck in a Reconnecting loop #32394 — image analysis causing a reconnect loop in Codex Desktop
- WebSocket disconnects before response.completed after viewing multiple images in a long Codex CLI turn #32868 — WebSocket disconnect after viewing images in a Codex CLI turn
- Codex Desktop on macOS: image-input turns take 130s cold / 45s warm before a trivial response #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.
Activity
github-actions commentedon Jul 14, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Moncefmd commentedon Jul 19, 2026
Same thing happens to me. This problem is extremely annoying as the work eventually just starts fully stopping with a
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 commentedon Jul 24, 2026
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:
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.