Skip to content

Codex desktop stream disconnects repeatedly on macOS #52294

Open

Description

@Richardmageai

Bug

On October 8, 2026, Codex desktop on macOS repeatedly disconnected mid-response. Long-running threads often fail; restarting Codex and creating new chats only helps briefly. This interrupted development work for multiple hours.

Errors

  • stream disconnected before completion: error sending request
  • websocket closed by server before response.completed
  • Error running remote compact task: stream disconnected before completion: error sending request

Steps

  1. Use a long-running Codex conversation and send a prompt.
  2. Streaming begins, retries several times, and fails.
  3. Restart app or create another conversation. Failures recur.

Expected

Streams finish successfully, with automatic recovery from transient disconnects.

Diagnostics

App bundles codex-cli 0.162.0-alpha.2. Connection establishment succeeds but WebSocket connections are subsequently closed before completion; several retries were spaced roughly 80 seconds apart. The issue also recurred after successful automatic compaction. The available logs do not establish a root cause. Please investigate repeated streaming disconnects and retry behavior.

Activity

  1. added
    bug
    app
    connectivity
    on Oct 8, 2026
  2. chaojian-zhang commented on Oct 13, 2026

    @chaojian-zhang

    Seriously can someone take care of this? It seemed to fail on some sessions but not others and makes Codex CLI impossible to use at all.

  3. kalexander-alt commented on Oct 21, 2026

    @kalexander-alt

    Additional macOS occurrence — 21 October 2026, with a deduplicated failure ledger

    Codex desktop 26.1016.51333, build 21161, bundle com.openai.codex; macOS 26.6.2, Apple Silicon. A long-running local chat repeatedly terminated with the same stream-disconnection error and required continuation.

    The retained terminal-turn metadata and sanitized reporting receipts establish 30 distinct failed main turns today, from 04:14:36 through 18:34:59 Europe/Zurich (UTC+02:00) / 02:14:36 through 16:34:59 UTC:

    • 29 stream/transport failures, exact short error: stream disconnected before completion: error sending request.
    • One separate capacity failure, exact short error: Selected model is at capacity. Please try a different model. This is included for completeness and is not classified as a transport failure.

    Each terminal turn is counted once. Nested request retries, recoverable tool/script errors, worker failures and ordinary interruptions are not additional entries. This is the retained ledger for this one local chat, not an account-wide outage claim.

    # UTC, 21 October Europe/Zurich, 21 October Terminal error
    1 02:14:36 04:14:36 Stream disconnected before completion; error sending request
    2 02:19:31 04:19:31 Stream disconnected before completion; error sending request
    3 02:21:48 04:21:48 Stream disconnected before completion; error sending request
    4 02:29:59 04:29:59 Stream disconnected before completion; error sending request
    5 02:45:45 04:45:45 Stream disconnected before completion; error sending request
    6 02:47:20 04:47:20 Stream disconnected before completion; error sending request
    7 02:48:01 04:48:01 Stream disconnected before completion; error sending request
    8 02:49:50 04:49:50 Stream disconnected before completion; error sending request
    9 02:51:24 04:51:24 Stream disconnected before completion; error sending request
    10 02:54:05 04:54:05 Stream disconnected before completion; error sending request
    11 02:57:11 04:57:11 Stream disconnected before completion; error sending request
    12 03:06:24 05:06:24 Stream disconnected before completion; error sending request
    13 03:30:23 05:30:23 Stream disconnected before completion; error sending request
    14 03:37:00 05:37:00 Stream disconnected before completion; error sending request
    15 04:15:23 06:15:23 Stream disconnected before completion; error sending request
    16 04:30:33 06:30:33 Stream disconnected before completion; error sending request
    17 04:36:33 06:36:33 Stream disconnected before completion; error sending request
    18 04:58:14 06:58:14 Stream disconnected before completion; error sending request
    19 05:07:33 07:07:33 Stream disconnected before completion; error sending request
    20 05:27:01 07:27:01 Stream disconnected before completion; error sending request
    21 08:05:30 10:05:30 Selected model is at capacity; try a different model
    22 11:25:42.572 13:25:42.572 Stream disconnected before completion; error sending request
    23 14:27:13 16:27:13 Stream disconnected before completion; error sending request
    24 14:27:53.021 16:27:53.021 Stream disconnected before completion; error sending request
    25 14:29:33.204 16:29:33.204 Stream disconnected before completion; error sending request
    26 14:30:03.170 16:30:03.170 Stream disconnected before completion; error sending request
    27 14:34:15 16:34:15 Stream disconnected before completion; error sending request
    28 14:44:00 16:44:00 Stream disconnected before completion; error sending request
    29 16:15:32.039 18:15:32.039 Stream disconnected before completion; error sending request
    30 16:34:59 18:34:59 Stream disconnected before completion; error sending request

    A final fresh check found the 18:34:59 Zurich failure and a successor already active from 18:35:15 Zurich / 16:35:15 UTC (approximately a 16-second gap at the available one-second timestamp precision). No duplicate monitor continuation was sent. This later event is outside the bounded afternoon timing audit below.

    Before that latest failure, three saved completed-render receipts at 18:28:13–18:28:27 Zurich / 16:28:13–16:28:27 UTC recorded exit 0 and 2,777 rendered pages across the three document outputs. Three saved navigation reports at 18:30:47–18:30:49 Zurich / 16:30:47–16:30:49 UTC recorded 336/336 references current, with zero stale fields, placeholders, binding gaps or rendered-number mismatches. The six receipts were independently hashed and their linked document/PDF/render-receipt pins agreed. These checks establish saved progress, not complete visual acceptance, source closure or final publication.

    Measured recovery gaps and saved progress

    A separate bounded audit of 14:00:00–18:18:02 Zurich / 12:00:00–16:18:02 UTC found seven of the failures above. Gaps with no main turn after these failures totaled 15m 10.054s:

    • 16:34:15.473–16:41:49.862 Zurich: 7m 34.389s.
    • 16:44:00.728–16:51:04.718: 7m 03.990s.
    • 18:15:32.039–18:16:03.639: 31.600s.
    • Four other failure-to-successor gaps: 11–33 ms each.

    Total main-turn absence in that bounded window was 15m 14.204s, including 4.082s after a separate interruption and 0.068s of normal transitions. These are main-turn gaps, not a measure of all background-worker idleness or all wasted time. The full running time of a turn that eventually failed is not counted as downtime. Main-turn presence also does not prove productive inference during every second.

    Recovery did produce actual saved work: independent saved-file hash/receipt checks verified new authoring batches at approximately 15:31–15:35, 16:32, 16:43, 17:25 and 18:11:19 Zurich. For example, the 16:41:49 continuation produced a saved numeric-reference update at 16:43:38 before the next failure. Three new private document outputs and a completed authoring receipt preceded the 18:15:32 failure; the successor was already active by 18:16:03. The larger task remains unfinished.

    Impact and requested investigation

    Please investigate recurrent terminal stream disconnections and why transient retries do not complete the turn reliably. Recovery should preserve already-completed tool results and saved work without forcing the user to guess whether the task is stopped or still running. Separate stale UI/active-turn observations and a browser-permission denial are being reported in their existing matching issues; a shared cause is not established.

    No project names, private paths, account identifiers, full turn/session IDs, source documents, raw transcripts, credentials or billing claims are included. Timestamp precision is limited to what the retained records support.

    Report reference: macos-desktop-20261021-terminal-failure-ledger-v1.

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

    appbugconnectivity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions