macOS Codex App repeatedly resets healthy Remote Control streams with "stream became unknown" and sequence gaps
What version of the Codex App are you using?
- Codex App:
26.707.31428 - Bundle:
5059 - Bundled codex-cli:
0.144.0-alpha.4
What platform are you using?
- macOS
27.0(26A5378j) - Apple Silicon / arm64
Remote hosts
I can reproduce this with two independent Linux servers from different providers:
- Hetzner
- IONOS
Both hosts run Codex app-server 0.144.1 using managed Remote Control. The two servers do not share infrastructure, networking, or systemd units.
Summary
The Codex macOS App repeatedly loses an individual Remote Control app-server stream for approximately 2–4 seconds and then reconnects.
The recurring errors are:
remote control app-server stream became unknown
remote control app-server stream sequence gap detected
Both remote app-server daemons remain running with unchanged PIDs during the failures. Their Unix control sockets remain healthy, and no host-side restart, OOM event, network-interface outage, or systemd restart occurs.
The same failure pattern has been observed on both remote hosts. At one point, both environments reported sequence-gap failures within about 13 seconds of each other.
Example event
At 2026-07-10 19:27 CEST / 17:27 UTC:
19:27:34.949— the existing long-lived TCP connection was closed cleanly. The first observed TCP FIN was sent by the macOS endpoint. Because the connection is TLS-encrypted, this does not rule out an earlier WebSocket Close frame from the relay.19:27:35— the socket watcher observed no established connection.19:27:37.724— macOS initiated a new TCP connection to the same OpenAI/Cloudflare endpoint.19:27:40.955— the Codex App closed the affected app-server stream with code 4000:
app_server_connection.closed
code=4000
reason="remote control app-server stream sequence gap detected"
transport=websocket
19:27:41.957— reconnect started.19:27:43.555— the app-server stream was connected and initialized again.
The user-visible interruption lasted approximately 2.6 seconds.
Shortly before this event, at 19:25:35.945, the same environment was reset with:
app_server_connection.closed
code=4000
reason="remote control app-server stream became unknown"
transport=websocket
That earlier stream reset did not coincide with replacement of the underlying shared TCP connection.
Relevant sanitized logs
2026-07-10T17:25:35.945Z
app_server_connection.state_changed
cause=transport_closed
closeCode=4000
connectionError={
"code": "connection-failed",
"message": "remote control app-server stream became unknown"
}
previous=connected
next=error
transport=websocket
2026-07-10T17:27:40.955Z
app_server_connection.state_changed
cause=transport_closed
closeCode=4000
connectionError={
"code": "connection-failed",
"message": "remote control app-server stream sequence gap detected"
}
previous=connected
next=error
transport=websocket
The corresponding remote-host checks showed:
app-server PID: unchanged
pid-update-loop PID: unchanged
app-server version: 0.144.1
control socket: healthy
systemd service: active
OOM/restart event: none
Local network checks
During the captured events:
- the macOS default route remained present;
- Wi-Fi interface
en0remained up; - IPv4, IPv6, and DNS remained reachable;
- no
ERR_NETWORK_CHANGEDevent was logged; - no TCP RST was observed;
- both remote hosts remained reachable independently.
Expected behavior
A temporary reconnect of the shared relay WebSocket should resume all Remote Control streams without producing an observable sequence gap.
If the relay cannot resume a stream, the App should log enough information to identify the failing boundary, including:
- shared WebSocket close code and close reason;
- whether the close was local or received from the relay;
- last successful ping and pong;
- previous and received stream
seq_id; - resume/subscription cursor;
- relay connection generation ID;
- whether the stream was reported as
unknownby a pong/status response.
Actual behavior
The App intentionally closes the affected stream with code 4000 after receiving an unknown stream status or detecting a sequence gap. It then reconnects successfully, but the short outage repeats every few minutes.
Related issues and changes
- #29262 — same
remote control app-server stream became unknownerror on the macOS desktop app - #30301 — stalled/failed Remote Control relay generations and missing in-process recovery
- #21572 — stream sequencing hardening and stream-scoped gap recovery
- #17902 — per-stream sequence IDs to prevent apparent gaps caused by interleaved streams
The behavior strongly suggests a problem in the desktop-to-relay WebSocket lifecycle or relay stream resume/cursor handling rather than a failure of either remote app-server.
Is the shared Remote Control WebSocket expected to be recycled this frequently? Are there known cases where reconnect/resubscribe returns incomplete stream history or reports a still-active stream as unknown?
Additional corroboration from a different setup on 2026-07-16:
- macOS Codex App
26.707.72221/ bundle5307, bundled Codex CLI0.144.2. - Two Remote Control environments were connected: the Windows and WSL sides of one physical host, each with its own app-server.
- At
01:06:50.148Zand01:06:50.195Z, both streams were closed only 47 ms apart with code4000andremote control app-server stream sequence gap detected. - The desktop then failed queued interactive
thread/readrequests with-32000 Codex app-server is not available, including resume metadata reads. - Both connections began automatic recovery about one second later and later returned to connected/initialized.
- Immediately afterward, direct SSH to both OS sides succeeded.
This makes a single host-side networking or app-server failure less likely.
Related distinction: an earlier reconnect had yielded Invalid request: AbsolutePathBuf deserialized without a base path when resuming an idle remote thread. This time there was no new AbsolutePathBuf entry: the resume attempt first failed because the app-server stream was unavailable. That makes the path error look like a possible follow-on recovery bug, consistent with #31983, rather than the cause of the sequence gap.
Additional corroboration with a distinct user-visible impact: background Remote Control reconnect storms can affect an unrelated local task.
Environment:
- Codex App
26.707.91948(bundle5440) - macOS
26.5.2, Apple Silicon
During an approximately 30-minute reproduction window:
- Desktop logs recorded 171 code-4000 closes with
remote control app-server stream sequence gap detected. - Several configured Remote Control hosts repeatedly entered recovery/initialization loops, roughly every 30 seconds.
- An unrelated local task repeatedly showed reconnecting UI.
- The local task itself remained
inProgresswith no task error and continued producing messages and completing tool calls successfully. - No task-local
error,failed, orabortedevents were found.
The reconnect attempts were also followed by Codex app-server initialize handshake timed out.
Network checks during the same period completed 240 requests across three relevant OpenAI endpoints with zero transport failures and expected HTTP statuses. The Desktop log window contained no ERR_SSL, tls handshake eof, or stream disconnected before completion.
This suggests Remote Control recovery state may not be fully isolated by host and can leak into renderer/UI reconnect state for unrelated local conversations.
Raw logs are not attached because they contain conversation IDs, local paths, and remote host identifiers. I can provide a sanitized diagnostic bundle if maintainers specify the required fields.
Additional bidirectional Mac-to-Mac reproduction with downgrade comparison
I can independently reproduce this exact failure between two Apple-silicon Macs using managed Remote Control in both directions. The controller logs contain both:
closeCode=4000 reason="remote control app-server stream sequence gap detected"
closeCode=4000 reason="remote control app-server stream became unknown"
The host-side app-server remained alive through the events, with no matching app restart, orphan-worker event, sustained CPU alert, WLAN association loss, DNS failure, or general network interruption. The user-visible symptom is the connection indicator changing from green to yellow/red with “Reconnecting,” then recovering.
Version boundary
Both Macs previously ran desktop release 26.901.20858. Both were downgraded to the signed desktop release 26.810.52044 (bundle 6662, bundled Codex CLI 0.148.0-alpha.9) and held there for comparison.
The downgrade materially reduced the defect but did not eliminate it:
| Controller → host | Before downgrade | After both Macs were downgraded |
|---|---|---|
| Mac A → Mac B sequence gaps | 13 in 52.92 h (0.246/h) | 1 in 14.56 h (0.069/h) |
| Mac B → Mac A sequence gaps | 88 in 52.92 h (1.663/h) | 15 in 14.56 h (1.030/h) |
| Combined rate | 1.909/h | 1.099/h |
The initial clean interval after both Macs matched the older build was 13.10 hours in one direction and 8.39 hours in the other. For Mac B → Mac A, median recovery improved from 6.207 s to 3.902 s and the longest observed recovery improved from 174.887 s to 4.376 s. Every post-downgrade true sequence-gap recovery completed within 4.4 seconds.
The post-downgrade window still contained two stream became unknown closes. One coincided with an intentional host app restart; the other did not, which provides another instance of an active stream becoming unknown while the remote app-server stayed running.
Interpretation
This strongly matches the relay stream sequence/resume problem described in this issue. The version comparison suggests that a newer desktop release significantly amplified the frequency and recovery severity, while the underlying sequence-gap defect also exists in 26.810.52044. It does not correlate with local DNS, WLAN, host process death, version skew between the two Macs, or resource exhaustion.
Raw logs are not attached because they contain task IDs, local paths, and device identifiers. Sanitized timestamped excerpts can be supplied if a maintainer specifies the fields needed.
Additional Mac-to-Mac reproduction on desktop 26.917.51856 (10492)
Both controller and host run macOS 27.0 and ChatGPT/Codex desktop 26.917.51856 (10492). Both desktop apps and their bundled app-server processes were restarted before these tests. The same symptoms previously occurred on 26.915.31945 (9922).
I regularly see the brief “Connection to [host] was lost. Reconnecting...” banner both at home and away, approximately 5–6 times daily, sometimes more. That frequency/location is my observation, not a controlled count. The captured sequence-gap closures below corroborate recurrence outside the deliberate roaming tests.
Recent brief disconnect — 23 September 2026, UTC
| Time | Controller-to-host observation |
|---|---|
| 08:14:40.655 | WebSocket closes with code 4000: remote control app-server stream sequence gap detected |
| 08:14:41.659 | Automatic reconnect starts |
| 08:14:48.618 | WebSocket connection attempt fails with ETIMEDOUT in node:net |
| 08:14:50.623 | Next reconnect attempt starts |
| 08:14:56.443 | Connection is initialized/connected again, with 69 pending client requests |
That close-to-connected interval is about 15.8 seconds. The controller logs contain five explicit sequence-gap closures between 00:00 and approximately 08:18 UTC on 23 September. This is not claimed to equal the number of visible banners; sleep/idle/network state was not correlated for every event.
Reconnect stalls and submission failures — 22 September 2026, UTC
A controlled Wi-Fi → hotspot → Wi-Fi test used an existing remote Git project and the same read-only hostname/Git-root request. The host remained at home. Tailscale stayed enabled.
On the hotspot leg:
- 23:14:16.415: Composer submission fails with
Timed out waiting for MCP response to fs/createDirectory. - 23:14:17.685: code-4000 sequence-gap close, with 31 pending requests.
- 23:14:23.785: initialized/connected again, with 77 pending requests.
- 23:16:38.816: the eventual test
turn/startsucceeds. I reported needing a retry or restart; the exact intervention was not recorded.
On return to Wi-Fi, independent probes captured the network transition and recovery:
- The 23:21:17.370 sample passed public HTTPS, a home HTTP endpoint and SSH/Git to the host; subsequent sampled checks continued passing. Probe timestamps are sample-start times, not exact per-command completion times.
- Four
thread/attachment/listrequests and onethread/turns/listrequest did not return until 23:22:06.748–06.822, with reported durations of 57.988–58.152 seconds andqueueWaitMs=0. - Thirteen background requests expired after approximately 30 seconds queued.
- The test
turn/startsucceeded at 23:22:09.690. Recovery on this leg was automatic. No sequence-gap close or filesystem timeout was captured on this return leg.
A further Composer fs/createDirectory timeout occurred at 23:38:08.203, followed by a successful submission at 23:38:19.228. There were no queue-full, queue-expired or connection-close records in the captured 23:29–23:44 window. No further network change had been requested, but continuous network health at that instant was not measured.
Scope and requested follow-up
These observations support a recurring Remote Control failure and additional request delay after basic connectivity recovers. They do not prove that every filesystem timeout shares the sequence-gap cause: on the hotspot leg the filesystem timeout precedes the gap, and the later timeout occurs without a captured gap or queue-rejection burst. Git corruption is not established.
Could the Remote Control team confirm whether this remains a known issue on this build, identify a specific fixed build if available, or provide a supported diagnostic procedure for correlating client/host/relay request receipt, dispatch, response and stream sequence/resume state?
Bounded original logs are retained privately. This comment deliberately omits raw logs, account/device/session identifiers, private paths, addresses and conversation content. Sanitized correlation fields can be supplied if maintainers specify what is needed. No in-app Feedback ID has been generated; this is the single submission of this evidence to the existing tracked issue.
Still reproducible on 2026-09-29 with Codex Desktop 26.924.22138 on macOS -> Pop!_OS Linux app-server 0.159.0. Updating/restarting Desktop and updating/rebooting the remote host did not resolve it.
Uploaded feedback thread: 01a0ed0b-2e9d-7e10-9c6d-1dde077d6d8c.
Opening a remote chat with a large history and attachments reproduces the gap. The same error also occurred before opening that chat, so attachments are not established as the root cause.
Controlled reproduction (2026-09-29, UTC):
| Event | Time |
|---|---|
| Chat began loading | 21:26:05 |
| First stream sequence gap / close 4000 | 21:26:40.676 |
| Reconnected | 21:26:46.922 |
| Second stream sequence gap / close 4000 | 21:27:24.225 |
| Reconnected | 21:27:30.721 |
Both closures recorded remote control app-server stream sequence gap detected, with the trace handlePong -> closeForStreamReconnect. Linux logs independently corroborate both connection closures and new initialize requests approximately six seconds later.
Queue saturation followed the first gap, rather than preceding it. Before the first closure there was no recorded full queue or expired request, only four client and two internal requests pending. thread/items/list had waited 34.1 s, thread/attachment/list 13.3 s, and two configRequirements/read calls about 13.4 s.
After reconnecting, Desktop had 70 pending requests; the queue hit its 64-entry limit, with roughly 20 account/read requests among the rejected requests. This prolonged UI recovery beyond transport reconnection. Whether this congestion causes subsequent gaps is unproven.
The available logs expose neither expected/received sequence counters nor pong contents or per-message server emission evidence. We cannot rigorously distinguish Desktop reception/processing, relay behavior, or remote app-server transport as the original source.
Please correlate telemetry with these timestamps and the uploaded feedback, and investigate both the initial sequence gap and the post-reconnect burst of account/history requests. If further diagnostics are needed, please advise how to capture sequence counters without chat payloads or credentials.
Additional Windows-to-Windows reproduction on 26.930.3930.0 (2026-10-03)
We observed the same error signatures on native Codex Remote between two Windows devices. This is corroborating symptom-level evidence, not proof that all reports share a root cause.
Environment and impact
- Desktop app version observed on both devices: 26.930.3930.0.
- Controller: Windows laptop in China using a proxy; remote host: Windows desktop in the Netherlands. Both use Wi-Fi.
- The disconnected notification briefly appears and then automatically recovers. Work generally continues. The user perceives more frequent occurrences with multiple concurrent projects, but no controlled low/high concurrency experiment was performed.
Verified controller-to-host event, UTC on 2026-10-03
| UTC | Event |
|---|---|
| 08:21:00.941 | app_server_connection.closed, code 4000, reason remote control app-server stream became unknown; connected -> error |
| 08:21:00.942 | Reconnect scheduled with a 1000 ms delay |
| 08:21:01.949 | Reconnect starts; error -> connecting |
| 08:21:03.194 | connected again |
Close-to-connected duration: 2.253 seconds, calculated on the same client clock. These lifecycle entries represent one disconnect. This is a normalized excerpt verified against the original logs, not an unmodified raw log attachment.
Bounded passive measurements
Approximately 20 minutes of normal workload produced 239 laptop samples and 240 desktop samples. Traffic values are approximately 5-second network-adapter averages, not Codex-specific traffic.
| Observation | Laptop | Netherlands desktop |
|---|---|---|
| Last pre-event sample time, UTC | 08:20:59.868 | 08:20:58.416 |
| Pre-event RX / TX, Mbps | 0.107 / 0.028 | 0.2966 / 0.4596 |
| Post-recovery burst sample time, UTC | 08:21:09.871 | 08:21:08.438 |
| Post-recovery RX / TX, Mbps | 16.219 / 0.492 | 18.1667 / 31.5849 |
| Successful local gateway probes | 60 / 60 | 80 / 80 |
| Gateway mean / maximum RTT, ms | 2.48 / 13 | 2.1625 / 40 |
| NIC error/discard counter increases | 0 | 0 |
The laptop main app process remained present throughout all samples. No app restart was observed on that device. CPU observations did not establish overload as the cause.
A larger traffic burst followed recovery; its cause is unknown. The sampled pre-event traffic does not support sustained local bandwidth saturation as the trigger for this occurrence. It cannot exclude shorter bursts, upstream congestion, or proxy/relay issues. Gateway probes only measure the local network. Wi-Fi negotiation rates were not treated as internet capacity. Cross-host timestamps use UTC but clock offsets were not independently measured.
Separate reverse-direction event
The Netherlands desktop's connection to the laptop closed at 08:11:28.132 UTC with code 4000, reason remote control app-server stream sequence gap detected, and reconnected at 08:11:30.398 UTC (2.266 seconds). It is a separate event, not another count of the controller-to-desktop unknown-stream closure above.
Capture validation and limits
The desktop collector initially used an invalid date path for incremental event collection. The complete capture window was subsequently re-read directly from original logs using shared file access; network/process samples were unaffected. Empty incremental event output was not interpreted as absence of disconnects. No relay/server trace was available, and the logical stream-close message alone does not prove an underlying WebSocket or physical network failure.
Could maintainers correlate these timestamps with stream lifecycle/resume and sequence handling, and advise whether there is a supported diagnostic procedure to capture the missing sequence/pong correlation without message payloads or credentials? Is there any documented native Remote throughput/concurrency limit relevant to this behavior? Less disruptive notification behavior during a short successful reconnect would also help.
Bounded original logs are retained privately; this comment omits raw logs, email/account/device/session identifiers, IP addresses, private paths and project/conversation content. No configuration change or connection repair was performed, and passive monitoring has ended. No in-app feedback/session ID was generated. The official Help Center AI support received the report but stated it could not create an engineering ticket or case ID, and directed us to this issue tracker.
Update: recurrence on October 10, 2026, with network and SSH comparison
This is an update from the original reporter's environment. The Remote Control sequence-gap resets still occur with current installed versions. I want to identify the failing component and a supported way to prevent the interruptions without stopping running tasks.
Environment
- Controller: macOS 27.0.1, Apple Silicon; desktop app 26.1007.21159, build 20052; bundled CLI 0.162.0-alpha.17.2.
- Two independent Linux hosts: Ubuntu/Hetzner with installed CLI 0.162.0, and IONOS with installed CLI 0.162.1.
- Existing tasks use managed Remote Control. Independent SSH diagnostics use Tailscale, generally a direct peer-to-peer connection.
- Host service checks found both app-server services running with unchanged PIDs and zero systemd restarts. Selected checks found no OOM events or resource exhaustion; both control sockets responded.
Recent Remote Control resets
All timestamps below are UTC on 2026-10-10. These are connection state transitions, not counts of repeated renderer error messages.
| Host | Transport closed | Connected again | Interruption |
|---|---|---|---|
| Ubuntu | 19:13:42.299 | 19:13:45.354 | 3.055 s |
| IONOS | 19:13:43.389 | 19:13:45.677 | 2.288 s |
| Ubuntu | 19:35:50.507 | 19:35:52.306 | 1.799 s |
| Ubuntu | 20:10:17.809 | 20:10:20.044 | 2.235 s |
The recurring close reason is remote control app-server stream sequence gap detected, with close code 4000. IONOS did not have simultaneous resets in the last two examples. The two running Ubuntu tasks were still reported as active/inProgress with no turn error at the subsequent checks.
Selected diagnostic fields, reconstructed from logs with account, host and conversation identifiers omitted:
19:35:50.507 Ubuntu cause=transport_closed closeCode=4000
previous=connected next=error
pendingClientRequests=0 pendingInternalRequests=2
19:35:52.306 Ubuntu next=connected initialized=true
20:10:17.809 Ubuntu cause=transport_closed closeCode=4000
previous=connected next=error
pendingClientRequests=11 pendingInternalRequests=4
20:10:20.044 Ubuntu next=connected initialized=true
Several intervals between Ubuntu resets were approximately 34 minutes; the last two above were 34 min 27.302 s apart. This is an observation, not proof of a token or timer-related cause.
Some resets closely followed controller enrollment/token refresh. For example, refresh finished at 19:35:47.726 and the gap occurred 2.781 s later. A scan through 19:35 found 6 of 23 host sequence-gap closes within 10 s of a preceding refresh completion, with 14 refresh completions logged. Other gaps did not show this close relationship. Please treat this as correlation, not an established root cause.
Network and independent SSH comparison
I switched from Wi-Fi/DSL to a phone hotspot and later returned to Wi-Fi/DSL. The longer observation window contained both networks and cannot be treated as a controlled hotspot-only comparison.
- An initial 180-second DSL SSH test completed 120 repeated read queries per host with no query timeout or transport disconnect.
- During the longer test, both isolated SSH app-server probes hit a 12-second response wait timeout after approximately 899 seconds. Both probe processes were still alive at termination. Ping monitoring also recorded a roughly 130-packet consecutive loss burst on both hosts in that period. This is evidence of a network/transport disturbance and prevents a claim that SSH was continuously healthy for the whole 45-minute observation.
- After the confirmed return to Wi-Fi, a fresh 180-second test again completed 120 repeated read queries per host without errors. Each host also received all 180 ping replies. Median
configRequirements/readlatency was 18.28 ms on Ubuntu and 22.12 ms on IONOS. - In the approximate later Wi-Fi segment of the long ping capture, loss was around 2% on each host with occasional multi-second latency spikes. Network instability is therefore a real confounder.
- Around the 19:35:50 Remote Control reset, a nearby 66-probe window had no loss to either host and maximum RTTs below 80 ms. Ping timing was inferred from sequence numbers, so this is not exact subsecond correlation. Fresh SSH checks after the reset succeeded.
- A subsequent 60-probe control check to both hosts and two public Internet destinations had zero loss. A corrected 30-probe check to the actual Wi-Fi gateway also had zero loss.
The SSH app-server probes used isolated stdio servers and read-only requests; they did not start turns or attach to the running tasks. These results do not establish the stability of the Desktop Remote SSH path itself. They also cannot exclude transient relay-path faults.
Migration and stale-host requests
Enabling SSH and disabling the old Remote Control connections did not migrate the existing chats' host association. Project/chat visibility changed, tasks appeared disconnected, and an attempted project reassignment failed with The sidebar task belongs to a different host. Restoring Remote Control restored access to the existing running tasks.
Requests targeting the disabled SSH identity continued for a time. Selecting Local in an empty new-task composer reduced generic metadata requests. Archiving and subsequently deleting three stale tasks removed their remaining polling. No further stale SSH-host requests were found after 19:08:38 in the inspected window, but Remote Control sequence-gap resets still occurred afterward. Thus stale task polling was not sufficient to explain or eliminate those resets.
Related GitHub reports and change
- #38385: desktop requests remain stuck and saturate the shared queue. This may explain prolonged UI delays, but a shared root cause with this issue has not been established.
- #35727: partial Remote Control transcript after a sequence gap.
- #35955: Remote Control task keeps spinning after the host completes.
- #41573: separate Remote SSH no-pong failure involving large plugin responses. That signature has not been established in this environment.
- PR #50348: reconnect backoff with jitter, listed in release 0.162.0. This addresses repeated reconnect attempts; it is not evidence that sequence-gap detection/resumption itself is fixed.
Requested investigation
- Can a controller token/enrollment refresh or relay connection replacement lose stream history or return a cursor that causes these code-4000 resets? Is there any relevant roughly 34-minute lifecycle?
- Please expose expected/received stream sequence IDs, resume cursor, relay generation, and ping/pong timing so the client/relay/server boundary can be identified.
- Is there a supported migration path for existing Remote Control tasks to direct SSH that preserves task ownership, sidebar association, history and running work?
- Is a released fix or supported mitigation available for this signature?
No credentials, IP addresses, account/environment identifiers, project paths, task contents or raw log files are included in this update.
I can reproduce what appears to be the same Remote Control streaming/synchronization issue in a Mac-to-Mac setup.
Environment
- Codex Desktop version:
26.1007.30912on both Macs - Host (remote machine): Mac mini, running Codex locally
- Client (controlling machine): MacBook Air, using Codex Desktop Remote Control
- Host network: OpenWrt with Clash transparent proxy
- Client network: Company Wi-Fi with Clash TUN enabled
- Tailscale: Installed on both machines
Symptoms
- Remote Control initially connects successfully, and I can open the Mac mini's active Codex session from my MacBook Air.
- After some time, the remote client stops displaying new output, sometimes remaining stuck on "Loading model...".
- Codex continues executing normally on the Mac mini. I have verified directly on the host that the task is still running and producing output.
- When I leave and reopen the remote session on my MacBook Air, all previously missing output appears immediately.
- Live streaming then resumes temporarily, but the problem occurs again.
This is reproducible and significantly affects long-running tasks.
Diagnostic findings
I examined both the Codex app-server SQLite logs and the Codex Desktop application logs.
The client-side Desktop logs contain repeated occurrences of:
SEQUENCE_GAPUNKNOWN_CONVERSATIONTRANSPORT_CLOSEDCONNECTION_FAILEDWEBSOCKET_ERROR- WebSocket close code
4000
There were multiple clusters of sequence-gap errors, along with repeated WebSocket and transport failures.
The Rust-side app-server logs also showed intermittent remote-control WebSocket disconnections, including:
remote control websocket reader disconnected,
err: failed to read from websocket:
IO error: peer closed connection without sending TLS close_notify
And reconnection failures such as:
failed to connect to app-server remote control websocket:
IO error: tls handshake eof
These Rust-side connection errors were observed on the MacBook Air, although they may relate to its own Remote Control host connection rather than the client-side subscription to the Mac mini.
Troubleshooting performed
- Confirmed that the Mac mini continues processing tasks normally while remote output is frozen.
- Confirmed that both machines use the exact same Codex Desktop version (
26.1007.30912). - Enabled Clash TUN on the MacBook Air, which resolved the initial Remote Control connectivity issue but did not resolve the recurring live-output freezes.
- Confirmed basic HTTPS connectivity to the Remote Control endpoint.
- Reopening the affected remote session consistently restores the missing output without restarting the task.
Suspected issue
The behavior suggests that the remote event stream may be interrupted or develop a sequence gap, and the client does not reliably recover its live subscription afterward.
The fact that reopening the session immediately restores the complete output suggests that the host-side execution and persisted conversation state remain intact, while the client-side live synchronization becomes stale.
I cannot yet determine whether the initial interruption is caused by the network/proxy or the Remote Control transport itself. However, the failure to recover live updates appears to be an important part of the issue.
Expected behavior
Remote Control should automatically reconnect, recover any missing events, and continue streaming new output without requiring the user to manually leave and reopen the session.
Is this a known issue in build 26.1007.30912? Are there any workarounds or additional diagnostics that would help identify why live event synchronization fails to recover?
I can provide additional sanitized logs or perform targeted tests if needed.
Historical follow-up: matching-version failures, 9–23 October 2026
Following up on my 23 September report. This has continued for weeks. The usual symptom is a brief connection-lost banner followed by automatic recovery within 30 seconds.
Version drift is not required to reproduce it. The earlier report already recorded identical desktop builds on both Macs. The retained October logs now provide quantified matching-runtime evidence across three versions.
Historical evidence
I reviewed retained native desktop logs dated 9–23 October, with a cutoff of 23 October 13:45 UTC, for the same two Macs using full Remote Control in both directions. I counted each explicit remote control app-server stream sequence gap detected closure once, attributed it to its process-scoped connection, and paired it with the next connected state for that peer. Repeated renderer error messages were not counted as separate closures.
| Direction | Sequence-gap closures | Median close-to-connected time | Recovered within 30 seconds |
|---|---|---|---|
| Mac A → Mac B | 291 | 4.179 s | 274/291 |
| Mac B → Mac A | 71 | 4.058 s | 71/71 |
These are protocol-event counts, including background activity, not counts of banners I saw. Durations are wall-clock intervals; longer outliers can include sleep.
267 A → B and 66 B → A closures occurred with matching app-server versions reported by the live connections:
| Matching app-server version on both Macs | A → B closures | B → A closures |
|---|---|---|
0.162.0-alpha.17.2 |
173 | 44 |
0.163.0-alpha.10.2 |
78 | 16 |
0.163.0-alpha.11 |
16 | 6 |
The remaining events are not all being classified as version mismatches; some retained process histories lack the initial local-version record.
Three recent A → B examples while the controller was fully awake, all 23 October, UTC:
| Sequence-gap close | Connected again | Interruption |
|---|---|---|
| 08:58:22.655 | 08:58:26.941 | 4.286 s |
| 10:26:41.185 | 10:26:44.971 | 3.786 s |
| 12:13:22.829 | 12:13:26.666 | 3.837 s |
The remote desktop app and its app-server remained running across these examples. The wider retained power history also includes 60 gaps more than a minute after a full wake, so sleep is not a necessary trigger. Controller refresh and pubsub reconnect timing do not explain every occurrence. This does not establish uninterrupted network health or locate the initiating message loss.
Both Macs are now on desktop 26.1016.62342 / build 21477, with app-server 0.163.0-alpha.11.2. The short observation after the latest update is not evidence of a fix; the historical matching-version failures remain the basis of this report.
Diagnostics needed to identify and fix the cause
Could the Remote Control team provide a supported, bounded diagnostic procedure for one naturally occurring reset, covering the controller, host and relay? Specifically:
- Sequence continuity: last accepted, expected and received
seq_idat the controller; corresponding host emission and relay retained/replayed sequence ranges; whether the gap was detected in a server message, chunk/segment or pong. - Resume/history: cursor before and after reconnect, requested versus returned replay range, stream/connection generation changes, and the reason a stream is reported as unknown or its history unavailable.
- Transport timing: underlying WebSocket close code/reason and initiator, separately from the logical code-4000 stream close; last successful ping/pong and relevant reconnect or credential-refresh timing.
- Safe correlation: a logging setting or command for both Macs that captures those fields without chat payloads or credentials, without patching vendor source or interrupting running turns. Please specify a secure channel if opaque correlation identifiers are needed.
Is there a known root cause or a released fix for this signature? If so, which desktop/app-server build contains it? I am looking for a causal repair rather than suppressing the banner or adding retries, watchdogs or another transport.
Bounded original evidence is retained privately. This update contains no raw logs, private host identifiers, network addresses, local paths, credentials or conversation content.
This issuenhas either been resolved or highly improved because I have not noticed it at all in about a month.
Regards,
Jayson Smith
On Fri, Oct 23, 2026, 9:53 AM Mark-RE-Johnson @.***> wrote:
Mark-RE-Johnson left a comment (openai/codex#32241) https://github.com/openai/codex/issues/32241#issuecomment-6366496968 Historical follow-up: matching-version failures, 9–23 October 2026
Following up on my 23 September report https://github.com/openai/codex/issues/32241#issuecomment-5791526363. This has continued for weeks. The usual symptom is a brief connection-lost banner followed by automatic recovery within 30 seconds.
Version drift is not required to reproduce it. The earlier report already recorded identical desktop builds on both Macs. The retained October logs now provide quantified matching-runtime evidence across three versions. Historical evidence
I reviewed retained native desktop logs dated 9–23 October, with a cutoff of 23 October 13:45 UTC, for the same two Macs using full Remote Control in both directions. I counted each explicit remote control app-server stream sequence gap detected closure once, attributed it to its process-scoped connection, and paired it with the next connected state for that peer. Repeated renderer error messages were not counted as separate closures. Direction Sequence-gap closures Median close-to-connected time Recovered within 30 seconds Mac A → Mac B 291 4.179 s 274/291 Mac B → Mac A 71 4.058 s 71/71
These are protocol-event counts, including background activity, not counts of banners I saw. Durations are wall-clock intervals; longer outliers can include sleep.
267 A → B and 66 B → A closures occurred with matching app-server versions reported by the live connections: Matching app-server version on both Macs A → B closures B → A closures 0.162.0-alpha.17.2 173 44 0.163.0-alpha.10.2 78 16 0.163.0-alpha.11 16 6
The remaining events are not all being classified as version mismatches; some retained process histories lack the initial local-version record.
Three recent A → B examples while the controller was fully awake, all 23 October, UTC: Sequence-gap close Connected again Interruption 08:58:22.655 08:58:26.941 4.286 s 10:26:41.185 10:26:44.971 3.786 s 12:13:22.829 12:13:26.666 3.837 s
The remote desktop app and its app-server remained running across these examples. The wider retained power history also includes 60 gaps more than a minute after a full wake, so sleep is not a necessary trigger. Controller refresh and pubsub reconnect timing do not explain every occurrence. This does not establish uninterrupted network health or locate the initiating message loss.
Both Macs are now on desktop 26.1016.62342 / build 21477, with app-server 0.163.0-alpha.11.2. The short observation after the latest update is not evidence of a fix; the historical matching-version failures remain the basis of this report. Diagnostics needed to identify and fix the cause
Could the Remote Control team provide a supported, bounded diagnostic procedure for one naturally occurring reset, covering the controller, host and relay? Specifically:
- Sequence continuity: last accepted, expected and received seq_id at the controller; corresponding host emission and relay retained/replayed sequence ranges; whether the gap was detected in a server message, chunk/segment or pong.
- Resume/history: cursor before and after reconnect, requested versus returned replay range, stream/connection generation changes, and the reason a stream is reported as unknown or its history unavailable.
- Transport timing: underlying WebSocket close code/reason and initiator, separately from the logical code-4000 stream close; last successful ping/pong and relevant reconnect or credential-refresh timing.
- Safe correlation: a logging setting or command for both Macs that captures those fields without chat payloads or credentials, without patching vendor source or interrupting running turns. Please specify a secure channel if opaque correlation identifiers are needed.
Is there a known root cause or a released fix for this signature? If so, which desktop/app-server build contains it? I am looking for a causal repair rather than suppressing the banner or adding retries, watchdogs or another transport.
Bounded original evidence is retained privately. This update contains no raw logs, private host identifiers, network addresses, local paths, credentials or conversation content.
— Reply to this email directly, view it on GitHub https://github.com/openai/codex/issues/32241?email_source=notifications&email_token=BYD5GYPFNH6HW2JX4SBV65T5VNPEVA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMZWGY2DSNRZGY4KM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-6366496968, or unsubscribe https://github.com/notifications/unsubscribe-auth/BYD5GYOCPLADKMTBADFUIL35VNPEVAVCNFSNUABFKJSXA33TNF2G64TZHM4TMNJUGE2TMNBZHNEXG43VMU5TIOBVG44DAOBZGQ2KC5QC . Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS https://github.com/notifications/mobile/ios/BYD5GYLJDH6BKO2CJGC44BL5VNPEVA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMZWGY2DSNRZGY4KM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJKTGN5XXIZLSL5UW64Y and Android https://github.com/notifications/mobile/android/BYD5GYNPYIW4VM5AXYYMPDT5VNPEVA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMZWGY2DSNRZGY4KM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI. Download it today! You are receiving this because you commented.Message ID: @.***>
Remote Control streams repeatedly become unknown while the Windows host keeps working
Codex desktop reports up_to_date on its configured release channel:
- Desktop 26.1023.51421, build 22530, prod.
- Installed Windows package 26.1023.6621.0.
- Controller and affected host report app-server 0.165.0-alpha.1.2.
- Windows controller and Windows host; the host remains running on Ethernet.
Correlated failure, 29 October 2026 (UTC)
- 12:28:06.042: a read-only status request begins against an already running remote thread.
- 12:28:12.412: existing connected app-server stream closes with code 4000, reason "remote control app-server stream became unknown".
- Its state transition records two pending client requests.
- 12:28:12.505–12:28:12.507: thread/read and thread/turns/list fail with -32000 "Codex app-server is not available", failureReason=remote_unavailable; durations approximately 6.45 seconds.
- 12:28:12.820: the higher-level status tool reports it cannot determine whether the thread exists because the remote host is unavailable.
- 12:28:14.025: the same host is connected and initialized again.
- 12:29:05.931: another status snapshot succeeds and reports cursorReset=true; the original turn remains inProgress without an error.
- 12:29:42.457: another stream closes with the same reason, then returns to connected at 12:29:44.154.
The affected host's original app-server process was still running with its original creation time during later verification. The thread continued producing work. Independent SSH identity checks and commands succeeded. Current sleep settings disable sleep, and no matching power/network event was found in the inspected bounded window; this does not prove uninterrupted end-to-end network health. A targeted search of retained host app-server log records found no outbound-queue overflow/slow-connection warning.
Read-only inspection of the installed controller code identifies this exact close reason in handlePong when the remote response status equals unknown. This is distinct from the separate pong-timeout and sequence-gap branches. No vendor binaries or configuration were changed.
Expected
A separate timing review, independently checked against the original records, counted 13 established-stream unknown closures for the affected host between 11:37:11 and 12:29:42 UTC. All 13 reconnected; close-to-connected intervals were approximately 1.6–3.8 seconds. At 12:13:42.218 and 12:13:42.240, two different remote hosts reported the same stream-unknown closure only 22 milliseconds apart. Some closures align with a 30-second cadence. This is a lead for shared stream-lifecycle investigation, not proof that a particular timer or shared component caused them. No heartbeat records in these desktop logs establish what happened to the server-side registrations.
A healthy, active remote thread remains observable through transient transport churn. Read-only status requests recover after stream replacement, rather than exposing thread existence as undetermined or leaving status stale.
Requested maintainer guidance
Please identify the reason the relay/host reports these streams as unknown, and whether a released desktop/app-server fix exists. If more evidence is needed, please provide a supported payload-free procedure to correlate stream generation, last successful ping/pong, server stream removal reason, subscribe cursor, and replacement stream. We can provide bounded sanitized events. We do not want to rotate credentials, recreate enrollment, restart active agents, or deploy unreviewed runtime patches merely to diagnose this.
No raw transcripts, credentials, account/device identifiers, private addresses, local usernames, or customer files are included. This is a proposed follow-up to openai/codex#32241, not a claim that all reports share one proven cause.
I reproduced this on Windows-to-Windows Codex Desktop Remote Control. The Windows controller was running 26.1120.6357.0, and both PCs were on the same Wi-Fi.
The controller logged code=4000, hostKind=remote-control, and reason="remote control app-server stream became unknown" four times on December 1, 2026 (UTC).
18:48:38.46718:49:08.46218:50:08.51218:50:38.580
The 18:49:08.462 drop interrupted a chat resume. The controller reconnected at 18:49:11.205. The 18:50:08.512 drop occurred with zero pending requests.
The host app-server kept running and logged no matching TLS alert, WebSocket close, or relay reconnect. Neither PC logged a coincident Wi-Fi disconnect or sleep event. Host chat-session Interrupt and Shutdown entries preceded three closes by about 2.4 seconds, but we couldn’t match them to the same stream.
Can the Remote Control team correlate these timestamps with server-side stream logs and confirm whether a fix or supported workaround is available?