Skip to content

macOS Codex App repeatedly resets healthy Remote Control streams with "stream became unknown" and sequence gaps #32241

Open

Description

@jamiwe-dev

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:

  1. 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.
  2. 19:27:35 — the socket watcher observed no established connection.
  3. 19:27:37.724 — macOS initiated a new TCP connection to the same OpenAI/Cloudflare endpoint.
  4. 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
  1. 19:27:41.957 — reconnect started.
  2. 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 en0 remained up;
  • IPv4, IPv6, and DNS remained reachable;
  • no ERR_NETWORK_CHANGED event 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 unknown by 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

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?

Activity

  1. added
    bugSomething isn't working
    appIssues related to the Codex desktop app
    connectivityIssues involving networking or endpoint connectivity problems (disconnections)
    on Jul 10, 2026
  2. austintraver commented on Jul 16, 2026

    @austintraver

    Additional corroboration from a different setup on 2026-07-16:

    • macOS Codex App 26.707.72221 / bundle 5307, bundled Codex CLI 0.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.148Z and 01:06:50.195Z, both streams were closed only 47 ms apart with code 4000 and remote control app-server stream sequence gap detected.
    • The desktop then failed queued interactive thread/read requests 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.

  3. poer2023 commented on Jul 16, 2026

    @poer2023

    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 (bundle 5440)
    • 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 inProgress with no task error and continued producing messages and completing tool calls successfully.
    • No task-local error, failed, or aborted events 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.

  4. joscar02ny-spec commented on Sep 17, 2026

    @joscar02ny-spec

    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.

  5. Mark-RE-Johnson commented on Sep 23, 2026

    @Mark-RE-Johnson

    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/start succeeds. 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/list requests and one thread/turns/list request did not return until 23:22:06.748–06.822, with reported durations of 57.988–58.152 seconds and queueWaitMs=0.
    • Thirteen background requests expired after approximately 30 seconds queued.
    • The test turn/start succeeded 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.

  6. cerodb commented on Sep 29, 2026

    @cerodb

    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.

  7. chasewang0718 commented on Oct 3, 2026

    @chasewang0718

    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.

  8. jamiwe-dev commented on Oct 10, 2026

    @jamiwe-dev
    Author

    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/read latency 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

    Requested investigation

    1. 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?
    2. Please expose expected/received stream sequence IDs, resume cursor, relay generation, and ping/pong timing so the client/relay/server boundary can be identified.
    3. Is there a supported migration path for existing Remote Control tasks to direct SSH that preserves task ownership, sidebar association, history and running work?
    4. 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.

  9. hd2210 commented on Oct 12, 2026

    @hd2210

    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.30912 on 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

    1. Remote Control initially connects successfully, and I can open the Mac mini's active Codex session from my MacBook Air.
    2. After some time, the remote client stops displaying new output, sometimes remaining stuck on "Loading model...".
    3. Codex continues executing normally on the Mac mini. I have verified directly on the host that the task is still running and producing output.
    4. When I leave and reopen the remote session on my MacBook Air, all previously missing output appears immediately.
    5. 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_GAP
    • UNKNOWN_CONVERSATION
    • TRANSPORT_CLOSED
    • CONNECTION_FAILED
    • WEBSOCKET_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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingconnectivityIssues involving networking or endpoint connectivity problems (disconnections)remote

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions