Stream disconnects before completion with repeated 5/5 reconnect failures

Open 💬 1 comment Opened Jun 5, 2026 by 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.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗