fix(vscode): preserve background agent dismissals across navigation - #13560
Merged
Conversation
marius-kilocode
enabled auto-merge (squash)
August 28, 2026 16:02
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (5 files)
Reviewed by grok-4.6 · Input: 185.3K · Output: 11.4K · Cached: 284.8K Review guidance: REVIEW.md from base branch |
kirillk
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
Dismissed background agents reappear after switching sessions or returning from History or an empty chat. Both Dismiss and Clear finished lose their state when the header changes session or remounts.
Fixes #13507.
Why This Change Was Made
The persistence work proposed in #13526 was not merged, and #13542 explicitly left it unfinished. A component-local map would still lose dismissals on remount. Store dismissed job IDs in the stable session provider, scoped to each parent session, and remove them when that session is deleted.
User Impact
Evidence
Reproduced the old failure in the baseline build. Verified the fixed build in isolated VS Code with deterministic session/job responses: tab switching, History remounts, empty chats, parent isolation, restarted jobs, and new finished jobs. No live model prompts were needed.
The full extension unit suite passed. Temporary lifecycle regression coverage also passed and was removed to keep the patch small. The final existing background-agent/session-provider tests passed (23 tests), along with typecheck, lint, compile, Knip, and the Kilo change-marker guard.
After dismissing the completed job and returning through History, the untouched cancelled and failed jobs remain visible:
After Clear finished, returning from an empty chat does not restore the background-agent strip: