fix(vscode): prevent completed sessions from staying busy - #13450
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
Reviewed by grok-4.6 · Input: 128.8K · Output: 29.6K · Cached: 2.5M Review guidance: REVIEW.md from base branch |
marius-kilocode
enabled auto-merge
August 26, 2026 08:16
WebReflection
approved these changes
Aug 26, 2026
This was referenced Aug 26, 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
Completed Agent Manager and sidebar sessions can remain stuck on "Considering next steps" even after the backend has finished and the final assistant response is persisted. Pressing Stop can make a normally completed session appear interrupted.
Why This Change Was Made
Live SSE events and directory-wide HTTP status snapshots update the same session state independently. A delayed snapshot can overwrite a newer idle event, overlapping snapshots can arrive out of order, and reconnects previously avoided reconciling already-known busy sessions.
Track session event freshness and directory request ordering, reconcile sessions omitted from authoritative status responses, and recheck status after terminal assistant or turn-close events. Preserve worktree directory boundaries and the explicit-abort handling already present on main.
User Impact
Completed sessions return to the idle state, the working indicator disappears, and the Send control becomes available again. Active sessions and sessions in other worktrees are not incorrectly marked idle.
Evidence
bun run build:checkpasses, including extension typecheck, webview typecheck, lint, and bundling.bun run test:unit: 4,194 tests passed.bun run knipandbun run check-kilocode-changepass.