fix(vscode): apply the selected agent instead of the stale session agent - #13142
Merged
marius-kilocode merged 1 commit intoAug 17, 2026
Conversation
hdcodedev
force-pushed
the
fix/resolve-prompt-agent-draft-pending-fallback
branch
from
August 15, 2026 18:36
07a98fe to
6602229
Compare
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Incremental review at Files Reviewed (2 files)
Previous Review Summary (commit 6602229)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 6602229)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (3 files)
Reviewed by kimi-k3 · Input: 139.6K · Output: 5.1K · Cached: 459.3K Review guidance: REVIEW.md from base branch |
hdcodedev
marked this pull request as draft
August 15, 2026 19:16
hdcodedev
force-pushed
the
fix/resolve-prompt-agent-draft-pending-fallback
branch
from
August 15, 2026 19:18
6602229 to
f8dce5b
Compare
hdcodedev
marked this pull request as ready for review
August 15, 2026 19:24
marius-kilocode
approved these changes
Aug 17, 2026
Collaborator
|
@hdcodedev thanks, looks like the right regression fix. |
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.
Issue
After switching Ask→Code, new draft/cloud-import sessions could get stuck in the old mode (#13102, partially fixed by #13121). Now the explicit mode selection is honored for them too.
Implementation
resolvePromptAgentnow falls back to the pending selection only for draft/cloud-import scopes (IDs that are not real server sessions). For a real server session with no stored selection it returns undefined, so the backend keeps that session's own agent instead of flipping it to the stale/default pending agent. Covered by unit tests for both the draft-scope-with-no-entry case and the server-session-must-not-flip case.Screenshots / Video
Bug
bug.mp4
Fix
fix.mp4
How to Test
Manual/local verification
Checklist