Skip to content

Allow large remote app-server resume responses#19920

Merged
etraut-openai merged 1 commit intomainfrom
etraut/remote-tui-overflow
Apr 28, 2026
Merged

Allow large remote app-server resume responses#19920
etraut-openai merged 1 commit intomainfrom
etraut/remote-tui-overflow

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

@etraut-openai etraut-openai commented Apr 28, 2026

Why

Remote TUI resume uses the app-server websocket client. That client inherited tungstenite's default 16 MiB frame limit, so a large saved session could make thread/resume return a single JSON-RPC response frame that the client rejected before the TUI could deserialize or render it.

Fixes #19837

What Changed

  • Configure the remote app-server websocket client with a bounded 128 MiB max frame/message size.
  • Preserve the concrete remote worker exit reason when completing pending requests after a transport/read failure instead of replacing it with a generic channel-closed error.
  • Add a regression test that sends a single >16 MiB JSON-RPC response frame and verifies the typed request succeeds.

Note: This isn't a perfect fix. It really just moves the limit to a much larger value. I looked at a bunch of other potential fixes (both server-side and client-side), and they all involved significant complexity, had backward-compatibility impact, or impacted performance of common use cases. This simple fix should address the vast majority of remote use cases.

Verification

I reproed the problem locally using a long rollout. Verified that fix addresses connection drop.

@etraut-openai etraut-openai merged commit 92fb848 into main Apr 28, 2026
25 checks passed
@etraut-openai etraut-openai deleted the etraut/remote-tui-overflow branch April 28, 2026 05:44
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--remote resume fails on large saved sessions after large thread/resume response

2 participants