Codex Desktop on macOS gets stuck reconnecting because failed/completed turns are restored with markedStreaming=true
What version of the Codex App are you using (From “About Codex” dialog)?
26.422.30944
What subscription do you have?
Free
What platform is your computer?
Darwin 25.3.0 arm64 arm
What issue are you seeing?
The Codex Desktop app on macOS gets stuck showing reconnecting/connecting/compressing context for a conversation even after the latest turn is already failed or completed in the local rollout. In the desktop logs, thread resume repeatedly shows latestTurnStatus=failed or completed but markedStreaming=true for the restored conversation. The affected conversation is 019da98a-89e3-7df3-abc3-1b044f3f0872. The issue is not isolated to one conversation; another unrelated conversation also showed latestTurnStatus=completed with markedStreaming=true. The app UI then keeps behaving as if the conversation is still streaming. We also saw repeated internal_server_error/high demand events mixed in, but the persistent reconnecting behavior appears to be caused by desktop resume state recovery, not just temporary server failure.
What steps can reproduce the bug?
- Launch Codex Desktop on macOS.
- Open conversation 019da98a-89e3-7df3-abc3-1b044f3f0872.
- Restart Codex Desktop.
- Desktop restores the thread and calls thread/resume.
- In desktop logs, maybe_resume_success shows latestTurnStatus=failed or completed but markedStreaming=true.
- The UI then continues showing reconnecting/connecting/compressing context instead of settling to an ended state.
- Sending another user message may start a new turn, but the UI can still get stuck again.
Relevant observed logs included entries like:
- maybe_resume_success conversationId=019da98a-89e3-7df3-abc3-1b044f3f0872 latestTurnStatus=failed markedStreaming=true
- another unrelated conversation also restored with latestTurnStatus=completed markedStreaming=true
Additional detail:
- This same conversation can be resumed successfully from CLI with:
/Applications/Codex.app/Contents/Resources/codex resume 019da98a-89e3-7df3-abc3-1b044f3f0872 --no-alt-screen -C /Users/wangyaok2/Desktop -m gpt-5.4
- That suggests the issue is in Desktop resume/renderer state recovery rather than the underlying conversation data alone.
What is the expected behavior?
After a conversation is restored, the Desktop app should recognize that the latest turn is already ended when latestTurnStatus is failed/completed/interrupted. The UI should stop showing reconnecting/connecting/compressing context and allow normal continued use of the thread without getting stuck in a pseudo-streaming state.
Additional information
Conversation ID involved: 019da98a-89e3-7df3-abc3-1b044f3f0872
Relevant desktop log example:
- codex-desktop-3a3d2458-33c3-4932-a68a-1a95e7d78212-40838-t0-i1-105920-0.log
Example observed resume line:
- maybe_resume_success conversationId=019da98a-89e3-7df3-abc3-1b044f3f0872 latestTurnId=019dc96e-2694-7ef3-92ce-942881563126 latestTurnStatus=failed markedStreaming=true
I also observed another unrelated conversation restore with latestTurnStatus=completed and markedStreaming=true, which suggests this is not limited to a single corrupted conversation.
Short-term workaround confirmed:
- Resume the same conversation from CLI instead of the Desktop UI:
/Applications/Codex.app/Contents/Resources/codex resume 019da98a-89e3-7df3-abc3-1b044f3f0872 --no-alt-screen -C /Users/wangyaok2/Desktop -m gpt-5.4
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I checked #19563 more closely. It looks related, but not identical to this report.
Both issues show the same suspicious symptom in the Desktop resume path:
maybe_resume_successreports an already ended turn (completedorfailed) while the conversation is still marked streaming (markedStreaming=true). That makes it look likely that the two reports share the same underlying resume/stream-state bug family.However, #19563 appears to be a specific automation-triggered repro: more than 4 heartbeat automations with
target_thread_idcause repeatedthread/read -> thread/resume -> maybe_resume_success -> thread/unsubscribecycling, high CPU / Energy impact, and broad looping across multiple target threads.This report is different in one important way: the stuck reconnecting behavior reproduced for a normal conversation restore path without requiring heartbeat automations or the
>4 target_thread_idcondition. In this case, the same affected conversation can be resumed successfully from the CLI, while Desktop restore keeps behaving as if the thread is still streaming.So my current read is: related to #19563, and possibly the same underlying state-machine defect, but not a strict duplicate because the trigger path here does not depend on automations.
Windows confirmation: multi-chat reconnect state persists until a new message
I am seeing what appears to be the Windows side of this Desktop resume/state-recovery bug, with transport failures related to #20739.
Environment
10.0.26200(build26200)26.727.6591.00.144.1>4 target_thread_idtrigger described in #19563.User-visible behavior
The issue occurs across unrelated local chats, not just one old or remote session.
Affected turns show one of these errors:
or:
After the retries, Desktop can remain indefinitely in a pseudo-streaming/reconnecting state even though the network is healthy. Sending an additional user message sometimes makes the same chat responsive immediately. That suggests the new event is causing the renderer to reconcile stale turn state.
The problem continued several hours after Desktop had updated and restarted, so it is not limited to the update interruption itself.
Sanitized local evidence
For 2026-08-02, aggregated Desktop logs showed:
resumeState=needs_resume: 31 occurrencesmaybe_resume_success: 16 occurrencesConversation state not found: 8 occurrencesunknown conversation: 20 occurrencesThe currently affected chats are local (
hostId=local). A floatingavatarOverlayrenderer was active and produced some of the missing/unknown-conversation events, while the primary renderer also handled resume activity.This looks like two related failure layers:
response.completed, matching #20739.Network checks during a live failure
chatgpt.comsucceeded consecutively.This does not look like a general loss of internet connectivity. The
10054reset affects the long-lived Responses WebSocket while ordinary HTTPS remains available.Expected behavior
response.completed, Desktop should terminate or retry the affected turn with a bounded, actionable result.Raw logs are not attached because they can contain local paths, conversation IDs, remote-host aliases, and other private metadata. Redacted excerpts can be provided if a maintainer requests specific event windows.
The
latestTurnStatus=failed/completedplusmarkedStreaming=truerestoration is a good persisted-state boundary: Desktop loops as if the turn is live, while the same conversation resumes through CLI.Codex Rescue cannot fix the renderer’s streaming flag or reconnect loop. I’m testing whether it independently reads the durable rollout, recognizes an ended/interrupted boundary conservatively, and avoids replaying anything. The original source remains untouched and verification may require manual review.
If the affected conversation still exists, could you try:
pipx install codex-rescue==0.1.0a3codex-rescue sessionscodex-rescue doctor --latestSanitized output only is enough—please don’t publish raw rollouts, databases, logs, prompts, local paths, account data, or secrets.
https://github.com/shleder/codex-rescue