Skip to content

Fix Agents Window cancellation log noise - #334568

Draft
Paul (pwang347) wants to merge 3 commits into
mainfrom
fix/334441-agents-customization-disposal
Draft

Fix Agents Window cancellation log noise#334568
Paul (pwang347) wants to merge 3 commits into
mainfrom
fix/334441-agents-customization-disposal

Conversation

@pwang347

@pwang347 Paul (pwang347) commented Sep 4, 2026

Copy link
Copy Markdown
Member

Fixes #334441

Summary

  • stop accepting customization bundles after disposal, cancel queued filesystem work without executing it, and normalize late provider failures as cancellation
  • let already-started filesystem operations settle safely and serialize same-authority bundles so stale scopes cannot overwrite replacements
  • resolve optional plugin customization directories without logging expected missing-file stack traces
  • log canceled requests at trace level, propagate task-discovery cancellation, and prevent the Agents Window contribution from turning it back into a warning
  • add focused regression coverage across bundling, plugin expansion, request logging, and cloud task discovery

Validation

End to end

  • Reproduced before the fix in a launched Agents Window by rapidly switching between completed sessions with different working directories: 5 Object has been disposed bundler errors were written to the Window log.
  • Repeated the flow against the exact final build with trace logging using 25 cycles / 50 session switches. The final session finished loading, the Window log contained 863 trace entries, and there were 0 matches for disposal errors, failed skill-stat traces, optional plugin EntryNotFound traces, canceled /agents/tasks network errors, or Cloud Sandbox cancellation warnings.

Automated

  • ./scripts/test.sh over all five affected suites: 101 passing
  • npm run typecheck-client
  • targeted ESLint for all changed files
  • npm run valid-layers-check
  • npm run hygiene
  • npm run transpile-client

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 4, 2026 17:55

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

🟢 Approval recommended

The reviewed changes have regression coverage and no unresolved approval-blocking issues.

Review tier: Balanced
Findings: None

What changed in this PR

Fixes customization bundling races during scope disposal and replacement.

Changes:

  • Treats stale bundle work as cancellation.
  • Safely drains queued filesystem operations.
  • Serializes bundles sharing an authority.
  • Adds regression coverage.
File Description
src/​vs/​workbench/​contrib/​chat/​browser/​agentSessions/​agentHost/​syncedCustomizationBundler.ts Adds cancellation-aware disposal, queue draining, and authority sequencing.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​agentSessions/​syncedCustomizationBundler.test.ts Covers queued disposal and same-authority replacement races.

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

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pwang347 Paul (pwang347) changed the title Fix synced customization disposal races Fix Agents Window cancellation log noise Sep 4, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Agents Window logs noisy customization errors during disposal

2 participants