Skip to content

openai: gpt-5.6-sol WebSocket inbound queue overflows #49523

Closed

Description

@0x4nur4g

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

  1. Use the TUI against the shared background service.
  2. Select openai/gpt-5.6-sol, variant max.
  3. Send a prompt. The failure is intermittent.
  4. 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

  1. maximilliangrand commented on Sep 17, 2026

    @maximilliangrand

    Reproduced on v2 at 37ff501cc6a3 with a local WebSocket server: pause the consumer, send 1,024 small frames, then resume. The current transport fails at frame:128 instead 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.

  2. rekram1-node commented on Sep 22, 2026

    @rekram1-node
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions