chore: CLI live-reconnect workstream completion (fix in kilocode#12393)#4629
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThis PR is a workstream-completion tracker whose net diff against current Files Reviewed (0 files)
Reviewed by claude-sonnet-5 · Input: 22 · Output: 4.2K · Cached: 492.4K Review guidance: REVIEW.md from base branch |
jeanduplessis
approved these changes
Jul 21, 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.
Workstream completion vehicle — CLI live-reconnect
This is the cloud-repo completion tracker for the CLI live-reconnect fix. The defect and its fix are entirely in the Kilo CLI connection layer, so this PR carries no cloud code changes.
.kilomobile-workflow docs branch; those docs have since merged intomainvia docs(mobile): reviewer loop, Opus 4.8 orchestrator, and pre-plan bug repro gate #4619, so the net file diff of this PR againstmainis empty.Summary of the delivered fix (see kilocode#12393 for the code)
A remote CLI session could silently lose its session-ingest connection and never reconnect until the CLI was restarted, leaving the mobile app showing a live CLI session as frozen/read-only. Root causes were all in the CLI client: unbounded token acquisition, an unbounded
CONNECTINGattempt, and a wedged heartbeat gather that permanently stopped heartbeats across reconnects. The fix bounds token acquisition, adds a single fenced retry owner with a connection-attempt deadline, bounds the heartbeat gather with a degraded last-known-good fallback, and fences attach announcements on fresh-gather session-id containment.Verification (performed against this worktree's local stack)
remote-ws.test.ts39 pass,attached-state.test.tsgreen,typecheckclean.Cross-link: Kilo-Org/kilocode#12393.