Rebuild a resumed session that keeps failing - #213
Merged
Merged
Conversation
Gemini Live can close a socket with 1011 and then close every socket resumed from its checkpoint 10 to 25 seconds later, so the interview spent all eight restarts resuming the same failing conversation and ended. A resumed socket that dies before it is healthy and debt-free now makes the next replacement rebuild from local state, and resuming stays off until a reply beyond the recovery briefing or a healthy socket proves recovery. The briefing's own answer no longer resets the restart budget, since every replacement asks for one. While no socket transcribes the candidate, a candidate who kept talking was counted silent and nudged, so until a socket has transcribed them their microphone level also counts as speech for the idle timers. The log now says when a cold rebuild fails too, and the size of what each replacement was handed, which tells a failing checkpoint from input that fails on any socket. Close #198
ColtenOuO
reviewed
Oct 2, 2026
Resumption was suppressed by the debt-adjusted age the restart budget uses, so a resumed socket that ran for minutes and was replaced while owing a reply lost its handle, and the log blamed the checkpoint. The resume decision now uses how long the socket stayed up. A recovery briefing held through a pause or a thinking hold was answered after the unpause or the hold's end, and that answer reset the budget, so a held briefing now marks its reply the way an immediate one does.
ColtenOuO
approved these changes
Oct 2, 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.
Gemini Live can close a socket with 1011 and then close every socket resumed from its checkpoint 10 to 25 seconds later, so the interview spent all eight restarts resuming the same failing conversation and ended. A resumed socket that dies before it is healthy and debt-free now makes the next replacement rebuild from local state, and resuming stays off until a reply beyond the recovery briefing, or a socket that lives past a minute owing nothing, proves recovery. The reply to a recovery briefing no longer resets the restart budget, since every replacement asks for one, including when that reply goes through a tool call.
During the same loop the candidate's speech was not transcribed, so the idle timers, stamped only from transcripts, counted a talking candidate as silent and nudged them. Until the open socket has transcribed the candidate, their microphone level above room noise now counts as speech for those timers; once it has, transcripts alone count again, so room noise cannot hold nudges back.
A cold rebuild replays the owed prompt and the editor, so if the 1011 is triggered by that input rather than by the resumed conversation, rebuilding will not help. The log now separates the two cases:
Gemini cold rebuild also failed before recoveryappears when a cold socket fails too, and eachreplacement:line carriesowed_chars=andeditor_chars=. No prompt changes, so the interview contract bundle stays at 26.Verified with
./scripts/test.sh(green; browser lanes, cargo-audit and shellcheck skipped locally for missing tools) andcargo mutants --in-diffover the Rust changes.Close #198
Summary by cubic
Fixes resumed Gemini sessions that keep failing after a 1011 close, and stops nudging candidates who are talking but not being transcribed.
replacement:line now carriesowed_chars=andeditor_chars=; a checkpoint is named only when resumption is actually used.Migration
Closes #198.
Written for commit 7742a47. Summary will update on new commits.