Repository navigation
Description
Description
GPT-5.6 Sol intermittently fills OpenCode's inbound Responses WebSocket queue. The TUI shows:
Retry due · attempt 2 · WebSocket inbound queue overflow
The current turn recovered on retry. The same machine previously recorded the identical error as a terminal Failed to drain Session, so this can also fail the whole turn.
The background service and API were healthy. OpenCode v2.0.5 creates a bounded 128-frame queue, then raises queue-overflow when another frame arrives: https://github.com/anomalyco/opencode/blob/v2.0.5/packages/ai/src/route/transport/websocket.ts#L212-L254
The current v2 branch has the same file byte-for-byte. Existing tests correctly require poisoning rather than silently dropping frames, but an ordinary provider stream should not reach this internal guard. Temporary consumer lag should use safe backpressure, larger/batched buffering, or recovery that does not terminate the turn.
A repository search found no matching bug report. #42572 concerns oversized outbound requests/code 1009; #48690 concerns xAI close code 1006. Neither covers inbound queue exhaustion.
Relevant prior server log, with paths and session ID redacted:
timestamp=2026-09-11T10:23:38.384Z level=ERROR run=a062b3ef
message="Failed to drain Session"
cause="AI.Error: WebSocket inbound queue overflow"
[cause]: AI.Error.Transport: WebSocket inbound queue overflow
role=server sessionID=ses_…
Plugins
github:0x4nur4g/opencode-v2-model-discovery (no project-local plugins)
OpenCode version
2.0.5, latest channel
Steps to reproduce
- Use the TUI against the shared background service.
- Select
openai/gpt-5.6-sol, variantmax. - Send a prompt. The failure is intermittent.
- Observe
Retry due · attempt 2 · WebSocket inbound queue overflow.
Observed twice locally: the current retrying turn and a previous terminal drain failure on 2026-09-11.
Screenshot and/or share link
No public share link; session contains private workspace context. Exact error and redacted server log are above.
Operating System
Ubuntu 24.04.2, Linux 7.0.0-29-generic x86_64
Terminal
TERM=xterm-256color, COLORTERM=truecolor, shell /bin/zsh; terminal application unavailable.
Activity
maximilliangrand commentedon Sep 17, 2026
Reproduced on
v2at37ff501cc6a3with a local WebSocket server: pause the consumer, send 1,024 small frames, then resume. The current transport fails atframe:128instead of delivering the burst in order. No provider credentials are needed.There is also a second fail-on-full 128-frame queue in
SessionModelTransport, so changing only the socket adapter would leave the session path vulnerable to consumer lag. I’m checking bounded ingress buffering at the socket boundary and awaited queue offers at the async session boundary, including cancellation and connection reuse.@neriousy, please flag if you already have a fix underway; I’m preparing a focused patch and regression evidence for this issue. This work is AI-assisted.
rekram1-node commentedon Sep 22, 2026
Fixed by #50026 and released in v2.0.11. The two fail-on-full 128-frame WebSocket ingress queues were replaced with unbounded handoff queues, with a regression test covering a synchronous 1,500-frame burst. Closing as fixed.