Repository navigation
fix(host): close a client socket at its backpressure limit instead of dropping frames - #446
Merged
Merged
Conversation
… dropping frames Why: apps/host/src/gateway.ts#function websocket | gateway sockets must never drop a frame silently; past the backpressure limit they close so the client reconnects and re-watches
This was referenced Oct 15, 2026
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.
Fixes #443.
The channel sends a run's end, but the app never gets it. Bun's
ServerWebSocket.sendsilently drops a frame once a socket has more than 16 MB queued (backpressureLimitdefaults to 16 MB andcloseOnBackpressureLimitto false). Desktop runs relay screenshot results to a renderer that reads slowly while it draws them, so the queue fills. Whatever arrives after that is lost: therunend (the Stop button stays) or a request's reply (the composer spinner stays). Switching channels re-watches and rebuilds the state, which is why that clears it.GatewayClientreconnects and re-watches. The limit goes up to 128 MB so ordinary replays heavy with screenshots don't hit it.0(dropped) past 16 MB. With the new options the socket closes with 1006.channeltool call): the channel delivered every run end, so the loss is in the gateway relay.changesrequests took 200–580 ms while the worker served them in 30–60 ms, which is the backlog.Built in Ace
No. Built in Claude Code (lane worktree, isolated loopback host) because the study lead asked that this Mac's Ace Canary stay untouched while a tester drives the desktop-tools study live.