fix(vscode): preserve activity during routine reconnects - #13553
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (5 files)
Reviewed by grok-4.6 · Input: 162.4K · Output: 15.2K · Cached: 540.5K Review guidance: REVIEW.md from base branch |
marius-kilocode
enabled auto-merge
August 28, 2026 13:23
WebReflection
approved these changes
Aug 28, 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.
What Problem This Solves
Agent Manager shares one backend connection across worktrees. A routine event-stream reconnect changed every active or blocked session to an error indicator, making a brief connection retry look like all agents had failed. The directory-level activity cache was also cleared during
connecting.Why This Change Was Made
Treat
connectingas a transition, not a new failure. Preserve the last confirmed connection-failure state until the connection succeeds: an ordinary reconnect keeps activity visible, but reconnecting after an explicit error or disconnection does not hide that failure.Keep the worktree activity cache during this transition while invalidating pending snapshots from the previous stream. A successful reconnection refreshes the cache, and late responses from the old stream cannot overwrite the recovered state.
This changes status presentation and refresh handling only. It does not change transport retry behavior, prevent backend crashes, or establish the cause of the original reconnect.
User Impact
Evidence
connected → connectingturned all ten cards red. After the fix, all ten kept their running indicator. Mixed failed/waiting/completed states and explicit connection failure followed by recovery were also verified. These were controlled UI-message scenarios, not a reproduction of the unknown transport trigger. The isolated instance was cleaned up.Before: routine reconnect displays ten errors
After: routine reconnect keeps the running indicators