fix(remote): bound outgoing queues and recover after overflow - #813
Open
Juliusolsson05 wants to merge 2 commits into
Open
fix(remote): bound outgoing queues and recover after overflow#813Juliusolsson05 wants to merge 2 commits into
Juliusolsson05 wants to merge 2 commits into
Conversation
This was referenced Sep 5, 2026
Terminate slow sockets before the shared output budget is exceeded and rebuild remote transcript windows after reconnect. Pace large bootstraps, preserve contiguous history cursors, and never replay requests whose outcome is unknown. Refs #804
Juliusolsson05
force-pushed
the
fix/remote-output-backpressure
branch
from
September 6, 2026 00:21
6182392 to
205eb9d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A paired client that stops reading currently retains unbounded queued output in main (#804). Every server writer now shares a 4 MiB per-socket budget; overflow terminates that socket, while healthy clients continue receiving ordered frames. A reconnect resets the phone's disconnected transcript window and backfills durable history so gaps larger than a page cannot silently disappear.
Fixes #804
Acceptance criteria and decisions
Validation and evidence
Tradeoffs and scope
Disconnect/reset is the recovery contract rather than silently dropping ordered deltas or maintaining a second queue. An interrupted uncommitted semantic turn can temporarily disappear until durable completion; an individual history record above 3 MiB must be viewed on desktop. Existing remote bundle size/mixed import warnings remain. No provider, worktree, desktop rendering or toolkit changes. The #805 retention PR (#814) depends on this branch because it shares transcript lifecycle code. No merge is authorized.
Current validation: rebased onto main
f7507980(toolkit #812 and MCP repair #818), head205eb9dd. Source changes from the earlier implementation are preserved; both required CI gates pass on this head (CI run). No merge is authorized.