Conversation
The retry count behind the live screen's backoff was never reset, so drops a viewer had already recovered from used up the five retries for good. A frame on a reconnected socket now starts the count over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
kevin9327
requested review from
MikeRyanDev,
davidmckayv,
guidovizoso,
mxmzb and
tylerslaton
as code owners
September 28, 2026 09:55
davidmckayv
previously approved these changes
Sep 28, 2026
Move the unchanged changelog entry to its own existing anchor.
davidmckayv
approved these changes
Sep 28, 2026
This branch has not been deployed
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.
What this changes
A live screen that loses its socket reconnects on its own: five tries, half a second apart at first and eight seconds apart at the end, then it stops and asks for Retry. The count of tries was never reset after a reconnect worked. So a screen left open for an afternoon, through five short drops that each healed within a second (a laptop's Wi-Fi hopping access points, a proxy recycling idle sockets), gave up for good on the sixth drop and showed "The live screen is disconnected. Retry to reconnect." while the computer was fine.
The count now starts over when a reconnected socket delivers a frame, the one message that proves the stream is back. A socket that opens and closes again at once never shows a frame, so it still uses up the tries and a computer that is really gone still ends in Retry after five failures in a row. A reconnect still checks who holds the computer before input is ready, since that check keys off the tries taken so far, which a drop increments before it reconnects.
Where it runs
OpenBot is deployed as several server processes behind a load balancer, serving a whole company.
Consecutive requests from the same person reach different processes, and the process that answered a
WebSocket upgrade is rarely the one that answers the next call on that conversation.
State that outlives a single request therefore has to be shared, or the change works on one machine
and stops working the moment there are two, without saying so. That failure is worse than not
shipping the feature: it passes review, passes CI, passes a local demo, and only surfaces as a Bot
that forgets, a question nobody can answer, or a boundary that never fires.
Answer these even when the answer is "none":
Boundary and audit
Changelog
CHANGELOG.mdunderUnreleased.Proof
New test in
app/tests/screen-connection.test.ts: six drops, each after the screen was showing frames again. On unmodifiedmain:The waits were
500, 1000, 2000, 4000, 8000and the sixth drop asked for Retry. After the fix:bun test tests/screen-connection.test.tsinapp→ 5 pass, 0 fail, including the existing test that five failures in a row still end in Retry.tsc --noEmitinappexits 0. Biome check clean on the changed files.🤖 Generated with Claude Code