You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OpenAI websocket disconnects before completion should retry safely #29646
OpenAI Responses websocket requests can fail when the websocket closes or idles before response.completed, for example with code 1006.
If no response output has been committed yet, this transient websocket failure should retry over HTTP instead of surfacing to the user. Once output has been emitted, it should not replay because that can duplicate partial responses.
this model for correct behaviour is the SSE workaround, which retries and gives feedback to the user via a transitory message in the terminal.
Observed error:
WebSocket closed before response.completed (code 1006: Connection ended)
and this terminates the response.
Plugins
Not specified in the original report.
OpenCode version
1.15.10
Steps to reproduce
Start an OpenCode request that uses the OpenAI Responses websocket path.
Have the websocket close or idle before a response.completed event is received, for example with close code 1006. This is an intermittent bug and can't be reliably reproduced. In Australia if might be once ever 15 minutes or so.
Response stops.
exepected behaviour:
OpenCode retries and the response continues. User is informed of a timeout and retry.
Activity
github-actions commentedon May 28, 2026
Thanks for updating the issue! It now meets the contributing guidelines and has been marked as compliant.
github-actions commentedon Jul 28, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.