Skip to content

Stream disconnects before completion with repeated 5/5 reconnect failures #26696

Open

Description

@GGBondBlueWhale

Codex app version

Desktop Codex: 26.602.30954 — released Jun 4, 2026

Platform

  • macOS Tahoe 26.5.1
  • Apple Silicon MacBook Pro
  • Pro plan

Related feedback ID

019e967f-24e8-72c2-ac43-0fad22cbcce8

Summary

Codex Desktop is still experiencing serious connection instability during active tasks. The session repeatedly tries to reconnect and can reach the final reconnect attempt, then reports that the stream disconnected before completion.

The visible error is:

stream disconnected before completion: websocket closed by server before response.completed

Observed behavior

During a running Codex task:

  • The task starts normally.
  • Codex begins reconnecting repeatedly.
  • The reconnect counter can reach Reconnecting 5/5.
  • The session then reports:
stream disconnected before completion: websocket closed by server before response.completed

This interrupts the task and makes the session unreliable.

Expected behavior

Codex should maintain a stable stream during active tasks. If the websocket disconnects temporarily, Codex should recover cleanly without losing task continuity.

At minimum, Codex should:

  • reconnect more reliably,
  • preserve task state across reconnects,
  • avoid ending the task with an incomplete stream error,
  • provide a clear retry/resume path when recovery fails,
  • avoid forcing the user to manually restart or reconstruct the task after a connection failure.

Actual behavior

The task can fail after repeated reconnect attempts with websocket closed by server before response.completed. This makes Codex unreliable for longer tasks and causes wasted time/tokens.

Why this matters

This is a serious reliability problem. Codex tasks often run for a long time and depend on continuous task state. If the stream disconnects before completion and automatic reconnect does not recover, the user may lose task progress or need to manually restart work.

The issue is especially disruptive because it can happen during normal usage, not only during an explicit app restart or intentional pause.

Request

Please investigate the websocket/stream stability and reconnect recovery path for Codex Desktop. A temporary stream disconnect should not leave the task in a broken state after Reconnecting 5/5. Codex should either recover automatically or provide a reliable one-click resume/retry mechanism that continues the same task state.

Activity

  1. added
    bugSomething isn't working
    appIssues related to the Codex desktop app
    connectivityIssues involving networking or endpoint connectivity problems (disconnections)
    on Jun 5, 2026
  2. github-actions commented on Jun 5, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

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)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions