Preserve active peer chats during idle eviction - #331112
Open
Ulugbek Abdullaev (ulugbekna) wants to merge 2 commits into
Open
Preserve active peer chats during idle eviction#331112Ulugbek Abdullaev (ulugbekna) wants to merge 2 commits into
Ulugbek Abdullaev (ulugbekna) wants to merge 2 commits into
Conversation
Use the session-wide active-turn tracker when deciding whether an unsubscribed session can be released, so peer chat turns keep their host state alive. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ea077bee-57a9-4f08-8c14-a8778fbcea83
Ulugbek Abdullaev (ulugbekna)
requested review from
roblourens
and
a balanced review from Copilot
August 16, 2026 19:38
Copilot started reviewing on behalf of
Ulugbek Abdullaev (ulugbekna)
August 16, 2026 19:39
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Preserves active peer-chat state during Agent Host idle eviction.
Changes:
- Uses session-wide active-turn tracking at eviction checkpoints.
- Adds peer-chat eviction regression coverage.
Show a summary per file
| File | Description |
|---|---|
agentService.ts |
Guards idle eviction against any active chat. |
agentService.test.ts |
Tests active peer-chat retention. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Balanced
Re-arm idle release when a peer chat becomes active while session data is draining, and cover eviction after that turn completes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ea077bee-57a9-4f08-8c14-a8778fbcea83
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.
Fixes #331111
Agent Host idle eviction currently checks only the default chat's denormalized
activeTurn. An active peer chat can therefore lose its host-side state when the parent session has no subscribers, even though the provider continues running.This change:
Tests:
./scripts/test.sh --run src/vs/platform/agentHost/test/node/agentService.test.ts --grep "subscriber refcount eviction"