Desktop: first turn sometimes shows "Reconnecting... 2/5" even though app-server transport remains connected
Summary
In Codex Desktop on Windows, the first message in a newly created conversation sometimes shows:
Reconnecting... 2/5, 3/5, 4/5, 5/5
However, the local desktop logs suggest this is not always a real transport reconnect. In the failing case below, the app-server transport stayed connected, and the problem looked more like a conversation/turn state sync race:
- client receives
turn/startedfor an unknown conversation - then repeatedly reports
No turns for conversation - UI surfaces this as
Reconnecting...
This makes the issue look like a model/network reconnect, but the underlying failure appears to be conversation state initialization on the first turn.
Environment
- OS: Windows
- App: Codex Desktop
- Desktop package version seen in logs:
26.415.4139.0 - CLI/app-server version seen in logs:
0.122.0-alpha.1
Minimal Reproduction
- Launch Codex Desktop on Windows.
- Open or create a fresh conversation.
- Send the first message in that conversation.
- Observe that the UI may show:
Reconnecting... 2/5Reconnecting... 3/5- etc.
This seems more likely on the first turn of a newly created conversation than on later turns in the same thread.
Expected Behavior
- The first turn in a new conversation should start streaming normally.
- If the underlying issue is conversation initialization rather than transport loss, the UI should not display a reconnecting state.
Actual Behavior
- UI shows
Reconnecting... N/5. - The turn may still eventually proceed, but the user sees what looks like a transport failure.
- Desktop logs show conversation-state errors rather than a clean transport disconnect/reconnect cycle.
Key Evidence
1. Transport appears to initialize and remain connected
From the desktop log:
app_server_connection.state_changed ... next=connectinginitialize_handshake_result ... outcome=successapp_server_connection.state_changed ... next=connected
This suggests the app-server transport successfully initialized.
2. First-turn state race symptoms
During the timeframe matching the UI reconnecting behavior, the log shows:
Received turn/started for unknown conversation- followed by
thread/read - followed by repeated
No turns for conversation
This strongly suggests the client receives turn events before the local conversation state is ready.
3. UI likely maps this state failure to reconnecting
The user-facing UI showed reconnect attempts, but the log did not show a fresh app-server state transition from connected -> disconnected -> reconnecting at that same moment.
Relevant Log Excerpts
Log file:
C:\Users\Think\AppData\Local\Packages\OpenAI.Codex_2p2nqsd0c76g0\LocalCache\Local\Codex\Logs\2026\04\18\codex-desktop-40ba8e35-9737-40fa-9cea-d938935f4635-10792-t0-i1-072620-0.log
Startup / connected:
- line 4: app-server state changed to connecting
- line 13:
initialize_handshake_result ... outcome=success - line 15: app-server state changed to connected
First-turn failure pattern:
- line 3810:
Received turn/started for unknown conversation conversationId=019da05c-a16c-7bb2-8526-9a32097ba214 - line 3811:
response_routed ... method=thread/read ... conversationId=019da05c-a16c-7bb2-8526-9a32097ba214 - line 3816+: repeated
No turns for conversation conversationId=019da05c-a16c-7bb2-8526-9a32097ba214
A second similar case happens immediately after:
- line 3941:
Received turn/started for unknown conversation conversationId=019da05f-447e-7941-98ec-ffce9ac2bb3d - line 3942:
response_routed ... method=thread/read ... conversationId=019da05f-447e-7941-98ec-ffce9ac2bb3d - line 3943+: repeated
No turns for conversation conversationId=019da05f-447e-7941-98ec-ffce9ac2bb3d
Interpretation
This looks like a race between:
- conversation creation / local state hydration
- incoming
turn/startedevents
The UI may be treating this as a reconnect-worthy failure, even when the underlying transport is still healthy.
Additional Note
I also saw a separate earlier log entry on the same date where analytics/event traffic hit a 403 Forbidden Cloudflare challenge page. That may indicate an independent network/environment issue, but it does not appear to be the primary cause of this specific first-turn reconnecting symptom.
Possible Fix Direction
- Delay handling of
turn/starteduntil conversation state is guaranteed present locally, or - buffer unknown-conversation turn events briefly and retry state resolution before surfacing reconnect UI, or
- distinguish transport reconnect from conversation-state hydration failure in UI messaging.
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
- #16817
Powered by Codex Action
A workaround that consistently fixed this for me on macOS was to set proxy environment variables for Codex via ~/.codex/.env.
For example, either of these worked:
https_proxy=http://127.0.0.1:7892
http_proxy=http://127.0.0.1:7892
all_proxy=socks5://127.0.0.1:7892
or just:
all_proxy=http://127.0.0.1:7892
After adding that file and restarting Codex, the repeated Reconnecting... attempts at the start of a new conversation stopped for me.
So at least in my case, the symptom looked related to proxy / transport handling rather than only conversation-state initialization. This may not be the root cause for every report in this thread, but it could help others quickly confirm whether their environment is part of the problem.
you should having simular issues with like Discord , or Electron based apps / chromium based apps too
This issue has been happening to me all day on new threads, on macOS and multiple Codex APP versions I updated through today, even the lastest Version 26.422.62136 (2180)
The same issue happens to me for the CLI, ending after ~100s in the error: ⚠ Falling back from WebSockets to HTTPS transport. timeout waiting for child process to exit
Described my bug in detail in #19994
I dont face it anymore , seems to be fixed for me - I only faced it once , at 5.5 launch
Additional current Windows reproduction from 2026-07-13. In my case, the conversation-state race escalates to a fatal app-server exit.
Environment
- Windows 11
- Unified ChatGPT Desktop package:
26.707.8479.0 - Bundled app-server:
0.144.2 - Model:
gpt-5.6-sol
Reproduction
- Updated the Desktop package from
26.707.8168.0to26.707.8479.0. - Started from a fresh parent task without opening the previously affected conversation.
- Created a new delegated child conversation. A minimal no-tool probe completed once.
- Created another fresh delegated child for one bounded task.
- Desktop crashed as the delegated conversation started.
This was reproduced more than once on fresh tasks, so it is not limited to reopening an old or contaminated rollout.
Relevant redacted evidence
The Desktop log around the failure contains repeated conversation-state errors including:
Received item/... for unknown conversation
Conversation state not found
The app-server then exits with:
code=3221225786
0xC000013A
The crash dialog displays this WARN as the "Most recent error":
Model personality requested but model_messages is missing,
falling back to base instructions.
That WARN may be incidental/last-seen rather than the root cause. The stronger correlation in this reproduction is new delegated-conversation creation followed by unknown-conversation/state-not-found events and then the fatal exit.
Control
The standalone CLI was upgraded to the current 0.144.3 and tested with an ephemeral, read-only, no-tool prompt using the same model/provider route:
model: gpt-5.6-sol
provider: openai
exit code: 0
result: CLI_CONNECTIVITY_OK
elapsed: 4.3s
This does not prove the model is universally fault-free, but it narrows the failing path toward Desktop conversation/subagent state coordination rather than basic model connectivity.
Impact / request
Fresh delegated conversations are unsafe because a conversation hydration/routing race can terminate the entire local app-server. Please consider buffering events for not-yet-hydrated conversation IDs, retrying state resolution, and showing the actual fatal-path error instead of the last WARN.
Possibly related: #16271 and #22996. I can provide redacted timestamped log excerpts through a secure feedback channel if needed.
I can reproduce a very similar issue on the new Windows desktop app.
Environment
ChatGPT Windows app: 26.715.2236.0
Windows 11 Pro Insider Preview, build 26220.8764
Proxy is configured through WinHTTP / Clash Verge
Regular Chat works normally in the desktop app. Existing/historical Work conversations can also send messages successfully. However, every newly created Work conversation remains indefinitely stuck on “Sending”; Codex is affected as well.
The same account works normally in ChatGPT Work on the web. I have also reproduced this after reinstalling/resetting the app, flushing DNS, syncing system time, and switching proxy nodes.
This seems more consistent with a Windows Desktop new-conversation/session-initialization issue than a general connectivity failure. I have also reported it to OpenAI Support.
I can reproduce the same issue on Windows with the latest Codex Desktop package:
- App version:
26.721.11231.0 - Symptom: every newly created conversation shows repeated
Reconnecting... N/5attempts before eventually working normally. - Reproduction rate: every new conversation / first turn.
- Existing conversations work normally once started.
I ruled out the common local/network causes:
- Performed several clean reinstalls and cleared local app data.
- Tested different virtual network adapters and global/system proxy modes.
- The behavior is unchanged across those tests.
- During a fresh reproduction, Mihomo routed
chatgpt.com,ab.chatgpt.com, andws.chatgpt.comthrough the proxy without timeout, reset, or connection-refused errors.
The Desktop log shows the same conversation-state symptom described in this issue. At the moment the new conversation starts, it records:
Received turn/started for unknown conversation
and later:
Received turn/completed for unknown conversation
Meanwhile, I do not see a corresponding app-server transition from connected to disconnected or a real transport reconnect.
This appears to be a new-conversation state/routing synchronization issue rather than a proxy or local-cache problem. Please investigate whether the fix is expected to cover current Desktop builds as well.
Additional Windows + Clash Verge Rev reproduction and product suggestion.
Environment:
- Windows desktop Codex package: 26.727.6591.0
- Bundled Codex CLI: 0.146.0-alpha.9.2
- ChatGPT authentication, built-in
openaiprovider - Clash Verge Rev / mihomo local HTTP proxy:
127.0.0.1:7897 - Windows user/system proxy is enabled and points to
127.0.0.1:7897
Symptom:
- Every newly created thread/first turn may show
Reconnecting 1/5 ... 5/5and remain blocked for minutes. - Once the first turn eventually succeeds, subsequent work is generally smooth.
A/B diagnostic result:
- With the Windows system proxy enabled but without
HTTP_PROXY,HTTPS_PROXY, orALL_PROXYin the Codex process environment:- provider HTTPS reachability was available;
- Responses WebSocket reachability timed out at the 15-second connect timeout;
- the diagnostic reported a WebSocket handshake timeout.
- In a fresh process with:
HTTP_PROXY=http://127.0.0.1:7897 HTTPS_PROXY=http://127.0.0.1:7897 ALL_PROXY=http://127.0.0.1:7897- Responses WebSocket handshake succeeded;
- handshake result:
HTTP 101 Switching Protocols; - duration was about 1 second.
This suggests that the Windows desktop/app-server/WebSocket path does not reliably consume the Windows system proxy, while it does consume the standard proxy environment variables.
Product suggestions:
- On Windows, automatically discover and use the enabled user/system proxy for the Codex App, app-server, HTTPS, and Responses WebSocket clients, or provide a documented per-app proxy setting.
- Ensure child processes inherit the proxy configuration consistently.
- If the WebSocket handshake cannot be established, fall back to HTTPS/SSE promptly instead of spending several long retries in the UI.
- Expose a supported WebSocket connect-timeout/retry setting or show the actual transport/proxy cause in the UI.
The successful A/B result indicates this is reproducible as a proxy-discovery/transport compatibility issue, not simply an unavailable network.
I'm hitting what looks like the same issue on Windows 11 (Codex desktop app, package OpenAI.Codex_2p2nqsd0c76g0, version 26.825.6671.0). Every new chat/task enters a "再接続中 N/5" ("Reconnecting N/5") countdown and then loops on "Reconnecting... waiting for network" forever, on every fresh message, 100% reproducible. chatgpt.com in a regular browser on the same machine/network works fine at the same time.
Before assuming this was environmental, I ruled out (each individually, with retest):
- Logging out/back in of all ChatGPT sessions
- Full uninstall + local app data wipe + clean reinstall
- Switching networks (home Wi-Fi vs. mobile tethering), full reboot
- WireGuard, ExpressVPN, and FortiClient - including a FortiClient kernel-level NDIS filter driver (ft_fortifilter) that stayed bound to the network adapter even after the app itself was closed
- A Codex-created outbound-block firewall rule (codex_sandbox_offline_block_outbound) - disabling it made no difference
- System-wide proxy (none configured), domain policies (machine isn't domain-joined), Windows Defender Network Protection (disabled)
- IPv6 path health via ICMPv6 pings to the actual backend IP (0% loss, ~7-15ms)
The key diagnostic: while the UI was stuck on "Reconnecting... waiting for network," I checked the OS-level TCP connections held by the app's own process (codex.exe) directly:
Get-NetTCPConnection -OwningProcess
The connection stayed Established on the same local ports across repeated checks spanning 8+ seconds, while the UI kept showing the reconnect loop and never produced a response - same pattern this issue describes (transport connected, UI incorrectly surfaces it as reconnecting).
Happy to share more logs/diagnostics if useful.