Repository navigation
Description
What issue are you seeing?
Remote Codex connections are repeatedly disconnecting during long-running coding sessions, to the point that Remote is not reliable enough for sustained project work.
This is not an isolated one-time disconnect. The Remote connection repeatedly drops while the local Codex work on the host can otherwise continue, and reconnecting is unreliable or requires repeated attempts.
The issue is especially disruptive for large, long-running development tasks where continuity of the same Codex session matters.
Environment
- ChatGPT plan: Pro
- Host platform: Windows
- Remote controller/client: ChatGPT Android app
- Workload: large local software project with long-running Codex tasks
- Local execution on the host can continue, while the Remote connection is the unstable part
Exact Codex/ChatGPT build numbers can be supplied if needed.
What steps can reproduce the bug?
- Start or continue a Codex task on a Windows host.
- Connect to that host through ChatGPT Remote from an Android device.
- Continue a long-running coding session with multiple turns and tool executions.
- Leave the task running or continue interacting remotely for an extended period.
- Observe that the Remote connection disconnects repeatedly.
- Attempt to reconnect and continue the same task.
- The connection may fail again, become unstable, or require repeated reconnection attempts even though the local host/session itself is still available.
The problem has occurred repeatedly rather than as a single transient network event.
What is the expected behavior?
Remote should maintain a stable connection for long-running Codex sessions and recover transparently from brief transport interruptions.
If the network momentarily changes or a WebSocket/transport connection drops:
- the existing Codex task should remain intact;
- Remote should automatically reconnect to the same host/session;
- context and task state should not be lost;
- the user should not need repeated manual reconnection attempts;
- long-running development work should remain controllable from the Android client.
Actual behavior
- Remote disconnects repeatedly during active or long-running work.
- Reconnection is unreliable.
- The local host can still be working while Remote becomes unavailable.
- The instability interrupts development and makes Remote unsuitable for sustained Codex use.
Impact
Severity is high for users who rely on Remote for serious development workflows.
For large coding projects, repeated Remote disconnects can interrupt supervision of long-running tasks, force repeated recovery attempts, waste user time, and create uncertainty about whether a task is still running or whether state/context has been preserved.
Requested investigation
Please investigate the Remote connection lifecycle, including:
- WebSocket / long-lived transport stability;
- reconnect/backoff behavior;
- Android-to-host Remote session recovery;
- host/session identity preservation across reconnects;
- whether an existing healthy local task is incorrectly treated as unavailable after a Remote transport failure;
- whether Remote reconnect attempts can enter a stale or failed state instead of reattaching to the existing session.
It would also be very helpful to expose a user-visible diagnostic reason when Remote disconnects (transport failure, auth/session expiry, host heartbeat loss, app-server failure, etc.) instead of only presenting a generic lost connection.
Additional information
This report intentionally omits private project contents, credentials, session IDs, and filesystem details. I can provide sanitized timestamps, logs, screenshots, and exact app/Codex versions if the Codex team requests them.
Activity
github-actions commentedon Aug 21, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
youngbumkim80 commentedon Aug 21, 2026
youngbumkim80 commentedon Aug 21, 2026
Additional reproducible symptom — Android app restart only restores Remote briefly
The failure is continuing and is now reproducible in a more specific way:
This temporary recovery after recreating the Android client process is important because the local Windows Codex task/host can remain available while only the Remote control path fails. That pattern suggests a possible client transport/session-state/reconnect lifecycle problem rather than the local coding task itself stopping.
Current client context:
Regarding the bot-suggested potential duplicate #39860
#39860 may be related because it also concerns Windows/Android Remote reconnect failures, but there is not enough evidence yet to close this report as a duplicate. #39860 has a specific measured trigger: an oversized initial
thread/listpayload (~259 KB) and unbounded previews, with connection recovery after reducing that payload. In this report, that payload-size trigger has not been measured or established. The strongest observed trigger here is different: fully restarting the Android app temporarily restores Remote, then the connection drops again shortly afterward while the local host remains usable.Please keep this issue open unless maintainers confirm the same root cause. If useful, please advise which sanitized Remote/app-server logs or timestamps would best distinguish:
thread/list/ envelope failure,The current behavior makes Remote effectively unusable for sustained development because the user must repeatedly kill and relaunch the phone app just to regain a short-lived connection.
rellaqaq commentedon Sep 7, 2026
Android/macOS corroboration: Retry fails; phone-side host connection off/on restores
Adding a related recovery discriminator, not claiming the same root cause as the Windows report.
Observed 2026-09-07, with one Honor Android phone and one macOS ChatGPT host:
The user confirms ordinary ChatGPT works while only Remote fails. Remote can show a green Mac indicator alongside an offline page. The user explicitly reports:
This is a narrower reported recovery operation than the full Android app restart in the August21 follow-up. It does not require the reported recovery instructions to include deleting/re-pairing the device or restarting the Mac. Duration of recovery and durable repeated-entry acceptance are not established.
Sanitized host observations, local time UTC+8:
forwarding remote control connection closed transport event.thread/resumearrivals are recorded before and after that event, including17:21:48 and17:24:05. Arrival is not proof of successful response delivery or UI rendering.The precise user-toggle timestamp/client identity has not been correlated, so the connection-close event must not be asserted as the exact toggle. Host logging also cannot exclude unlogged or client-only stalls. We have not established ACK starvation, a payload threshold, auth failure, or a common mechanism with#41573/#41775.
Which supported Android diagnostic export/error fields would distinguish stale client recovery state, a response/stream delivery failure, and endpoint-specific network failure in this Retry-versus-connection-reset case? No raw credentials, enrollment identifiers or conversation contents are included.
lowbyyj commentedon Sep 9, 2026
Adding a Windows/Android report with host-side transport evidence. In my case, Remote usually reconnects after a short wait; repeated phone-app restarts are not required. Work continues normally on the PC throughout the reported mobile interruptions.
Environment and symptoms
Host evidence
Three Remote WebSocket disconnect/reconnect cycles were recorded on September 7. Host status returned to
Connectedafter approximately 1.95 s, 2.77 s, and 2.13 s. These intervals measure host transport recovery, not full mobile UI recovery.The first cycle contained the following messages. Absolute timestamps have been replaced with elapsed time, and identifying fields have been omitted:
No corresponding Windows sleep/shutdown or network-profile disconnect event was found at those three times. The inspected Application events also contained no Codex-related crash/hang record. Brief network-path loss and mobile-side problems are not ruled out.
These are separate host observations, not a complete count or exact correlation of every mobile reconnect. Is there a supported mobile diagnostic export or session-disconnect reason that would help distinguish screen-transition reconnects from unexpected session/relay drops? No raw database, credentials, device/session identifiers, screenshots, or conversation contents are attached.
bbottema commentedon Oct 26, 2026
Can confirm. Long running sessions are killing on Codex Remote.
XgrislyX commentedon Nov 2, 2026
Confirmed user recovery: clearing accumulated sessions restored Windows/Android Codex Remote
Update (2026-11-02): After extensive repeated Remote reconnection failures, I discovered approximately 14 accumulated Codex sessions/connections. I disconnected the accumulated sessions and re-established remote access. Since then, Remote has operated normally during my observation period.
Before cleanup
After cleanup/reconnection
Recovery steps for affected users
Outcome: Clearing the accumulated sessions and reconnecting resolved the issue on this system. The precise internal failure mechanism (count limit versus stale/conflicting state) has not been isolated. Please investigate session accumulation, stale enrollment cleanup, and whether excessive session state affects Remote lifecycle, thread listing, and UI interaction.
Related: #39954.