Repository navigation
Codex Desktop on macOS gets stuck reconnecting because failed/completed turns are restored with markedStreaming=true #19690
Description
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
Activity
github-actions commentedon Apr 26, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
wangyaok2 commentedon Apr 28, 2026
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.
coindmit-cmyk commentedon Aug 2, 2026
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 Desktop thrashes resume/unsubscribe when >4 heartbeat automations have target_thread_id #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 Responses WebSocket closes before response.completed #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.
pharmatorium commentedon Aug 31, 2026
Additional reproduction on Codex Desktop 26.825.51511 (build 7377), bundled codex-cli 0.151.0-alpha.7.2, macOS 26.5.1 (25F80), arm64.
Two unrelated local tasks simultaneously reproduced the completed-backend / streaming-UI mismatch:
status=notLoadedandlatest turn=completed; the actual turns had completed after about 26 and 32 minutes. No backend compute remained active.idle; for the other, a minimal terminal no-op turn produced a fresh completed event. Existing results were preserved.Expected: when the latest turn is terminal, the Desktop renderer should immediately clear the streaming/in-progress state, hide/disable Stop, clear stale queue state, and allow a new turn.
This appears to be the same root condition described here (
latestTurnStatus=completedwhile the renderer remains marked streaming), with two additional user-visible consequences: cancellation errors and an unusable local message queue. I can provide sanitized screenshots and matching desktop-log excerpts if maintainers need them.ChrisEvans2 commentedon Sep 8, 2026
I can reproduce a closely related state-recovery failure on a newer Codex Desktop build.
Environment
26.901.5123126.6.2(Apple Silicon)gpt-5.6-sol, reasoning efforthighTimeline
stream disconnected before completion: Transport error: network error: error decoding response bodytask_completewith that error, butlast_agent_messagewas empty.continuein the same task.latestTurnStatus=interrupted markedStreaming=true, along with:Rebinding placeholder latest turn to incoming eventConversation state not foundReceived item/started for unknown conversationAdditional session evidence
continueturn never persisted a completed assistant message or a usable final answer.response_id, so this evidence proves one Codex turn with multiple reasoning items, but not the exact number of provider Responses.Expected behavior
markedStreaming=true.This appears closely related to this issue. The additional user-visible symptom here is repeated answer content after sending
continue, rather than only a reconnecting/Thinking state.H644b commentedon Sep 30, 2026
I have the same problem
jordanschwartz-js commentedon Oct 16, 2026
I am also experiencing recurring stuck follow-up messages in the macOS desktop app. After a response finishes, the next message can remain in the queue indefinitely. Fully quitting and reopening the app temporarily restores sending, but it recurs. Restarting is disruptive when other chats are running. Is there a supported recovery for just the affected chat without restarting the whole app?