Skip to content

Avoid Agent Host session listing starvation - #333579

Merged
Benjamin Christopher Simmonds (benibenj) merged 3 commits into
release/1.136from
benibenj/agent-host-session-listing
Aug 31, 2026
Merged

Avoid Agent Host session listing starvation#333579
Benjamin Christopher Simmonds (benibenj) merged 3 commits into
release/1.136from
benibenj/agent-host-session-listing

Conversation

@benibenj

Copy link
Copy Markdown
Contributor

Summary

  • avoid repeated Agent Host session-list recomputation under catalog invalidation
  • persist the Recent-mode local-session cutoff without immediately reconciling active external sessions
  • defer external-session SDK discovery until startup settles while preserving legacy migration discovery
  • prevent Codex activation from starting unrequested external discovery

Addresses #333284.

Validation

  • AgentService aggregation suite: 93 passing
  • Codex model refresh suite: 50 passing
  • targeted Claude, Copilot, Codex, and external-session discovery tests

@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

TylerLeonhardt

Matched files:

  • src/vs/platform/agentHost/node/claude/claudeAgent.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

Review tier: Balanced
Findings: 2 Medium severity · 1 Low severity

New issues introduced by this change (3)
Severity Finding
Medium severity src/​vs/​platform/​agentHost/​node/​agentService.ts — This still permits the expensive scans to overlap: _invalidateSessionList() clears the map, so…
Medium severity .eslint-plugin-local/​code-no-bracket-notation-for-identifiers.ts — The numeric special case misses signed numbers because -1 and +1 are UnaryExpression nodes,…
Low severity package.json — This release-version bump is outside the stated Agent Host starvation fix, as are the formatter…
What changed in this PR

Updates Agent Host session discovery and Recent-mode persistence to reduce listing starvation. The PR also includes several unrelated UI, formatting, lint, and release changes.

Changes:

  • Defers provider discovery and persists the Recent-mode cutoff.
  • Adjusts Sessions UI, action widgets, formatting, tunnels, and Markdown preview behavior.
  • Advances VS Code and Copilot versions and adds an ESLint rule.
File Description
src/​vs/​workbench/​contrib/​update/​test/​browser/​updateTitleBarEntry.test.ts Tests configurable hover alignment.
src/​vs/​workbench/​contrib/​update/​browser/​updateTitleBarEntry.ts Supports placement-specific hover alignment.
src/​vs/​workbench/​contrib/​format/​test/​browser/​formatActionsMultiple.test.ts Tests formatter-ID arguments.
src/​vs/​workbench/​contrib/​format/​browser/​formatActionsMultiple.ts Allows direct formatter selection.
src/​vs/​workbench/​contrib/​chat/​browser/​chat.shared.contribution.ts Updates Recent-mode description.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​browser/​remoteAgentHostActions.ts Sorts tunnels by name.
src/​vs/​sessions/​contrib/​providers/​agentHost/​test/​browser/​agentHost/​agentHostSessionConfigPicker.test.ts Tests branch Changes action.
src/​vs/​sessions/​contrib/​providers/​agentHost/​browser/​agentHostSessionConfigPicker.ts Adds branch Changes shortcut.
src/​vs/​sessions/​contrib/​accountMenu/​browser/​account.contribution.ts Moves update indicator left.
src/​vs/​sessions/​browser/​parts/​titlebarPart.ts Removes dedicated update toolbar.
src/​vs/​sessions/​browser/​parts/​media/​titlebarpart.css Removes obsolete update spacing.
src/​vs/​sessions/​browser/​menus.ts Removes update menu ID.
src/​vs/​platform/​agentHost/​test/​node/​copilotAgent.test.ts Explicitly starts discovery.
src/​vs/​platform/​agentHost/​test/​node/​codex/​codexModelRefresh.test.ts Tests requested Codex discovery.
src/​vs/​platform/​agentHost/​test/​node/​claudeAgent.test.ts Explicitly starts discovery.
src/​vs/​platform/​agentHost/​test/​node/​agentService.test.ts Covers discovery and cutoff persistence.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotAgent.ts Exposes explicit discovery start.
src/​vs/​platform/​agentHost/​node/​codex/​codexAgent.ts Tracks requested discovery.
src/​vs/​platform/​agentHost/​node/​claude/​claudeAgent.ts Exposes explicit discovery start.
src/​vs/​platform/​agentHost/​node/​agentService.ts Revises listing, discovery, and Recent cutoff handling.
src/​vs/​platform/​agentHost/​common/​agentHostSchema.ts Updates Recent-mode description.
src/​vs/​platform/​agentHost/​common/​agent.ts Adds discovery-start provider API.
src/​vs/​platform/​agentHost/​AGENTS.md Documents discovery lifecycle.
src/​vs/​platform/​actionWidget/​test/​browser/​actionList.test.ts Tests detail-toolbar layout.
src/​vs/​platform/​actionWidget/​browser/​actionWidget.css Stabilizes detail toolbar geometry.
src/​vs/​platform/​actionWidget/​browser/​actionList.ts Tracks details and adjusts width measurement.
package.json Advances VS Code version.
package-lock.json Synchronizes root lockfile version.
extensions/​markdown-language-features/​preview-src/​index.ts Resets cross-resource scrolling.
extensions/​copilot/​package.json Advances Copilot and engine versions.
extensions/​copilot/​package-lock.json Synchronizes Copilot lockfile metadata.
.vscode/​notebooks/​my-endgame.github-issues Advances milestone query.
.vscode/​notebooks/​endgame.github-issues Advances milestone query.
.eslint-plugin-local/​code-no-bracket-notation-for-identifiers.ts Adds bracket-notation lint rule.
Files not reviewed (1)
  • extensions/copilot/package-lock.json: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/vs/platform/agentHost/node/agentService.ts
Comment thread .eslint-plugin-local/code-no-bracket-notation-for-identifiers.ts Outdated
Comment thread package.json Outdated
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Base: 917e4420 Current: fbc90d7c

No screenshot changes.

Defer external session discovery, persist recent local-session cutoffs, and prevent stale catalog epochs from repeatedly restarting expensive listings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep expensive session-list computations coalesced when invisible provisional composers are created or disposed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@benibenj
Benjamin Christopher Simmonds (benibenj) merged commit 6e1c256 into release/1.136 Aug 31, 2026
54 of 61 checks passed
@benibenj
Benjamin Christopher Simmonds (benibenj) deleted the benibenj/agent-host-session-listing branch August 31, 2026 21:20
@vs-code-engineering vs-code-engineering Bot added this to the 1.136.0 milestone Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants