Skip to content

dispose terminal bg event listeners if session is cancelled#309611

Open
meganrogge wants to merge 4 commits intomainfrom
merogge/cancel-listener
Open

dispose terminal bg event listeners if session is cancelled#309611
meganrogge wants to merge 4 commits intomainfrom
merogge/cancel-listener

Conversation

@meganrogge
Copy link
Copy Markdown
Collaborator

fixes #309607

Copilot AI review requested due to automatic review settings April 13, 2026 20:31
@meganrogge meganrogge self-assigned this Apr 13, 2026
@meganrogge meganrogge added this to the 1.117.0 milestone Apr 13, 2026
@meganrogge meganrogge enabled auto-merge (squash) April 13, 2026 20:31
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 13, 2026

Screenshot Changes

Base: 8a73ca23 Current: 480ecf26

Changed (3)

chat/aiCustomizations/aiCustomizationManagementEditor/McpBrowseMode/Light
Before After
before after
editor/inlineCompletions/other/JumpToHint/Dark
Before After
before after
agentSessionsViewer/ApprovalRowLongLabel/Light
Before After
before after

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Ensures terminal background notifications are torn down when a run-in-terminal session gets canceled (fixes #309607), to prevent continued “background steering” prompts after the user stops the agent.

Changes:

  • Add a cancellation check that disposes background notification state when the session is canceled.
  • Gate output-monitor and command-finished handlers to early-exit when cancellation is detected.
Show a summary per file
File Description
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts Adds cancellation-aware cleanup and early-return logic for terminal background notifications.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 4

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.

Background terminal tasks should not interject if agent cancelled

3 participants