Background terminal notifications: preserve agent and run on conversation model (1.124)#320642
Open
meganrogge wants to merge 2 commits into
Open
Background terminal notifications: preserve agent and run on conversation model (1.124)#320642meganrogge wants to merge 2 commits into
meganrogge wants to merge 2 commits into
Conversation
added 2 commits
June 9, 2026 14:09
Background terminal completion / input-needed / exited notifications start a full agent turn. They were forced onto the copilot-utility-small (gpt-4o-mini) model, which cannot reliably assess the command output or drive the agentic tool loop, so the agent went silent after a backgrounded command finished (e.g. it never reported that 'npm i' failed). Run these notifications on the conversation's own model instead, while keeping the agentIdSilent routing from #320608.
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @anthonykim1Matched files:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR backports a combined fix to release/1.124 to ensure background terminal completion/input-needed notifications start an agent turn that (1) resumes the same agent participant that initiated the terminal command and (2) runs on the conversation’s chosen model, avoiding the “silent agent” failure mode when the utility model can’t reliably process output.
Changes:
- Preserve agent routing for background terminal steering requests by forwarding
agentIdSilentfrom the conversation’s last request. - Run background terminal notification turns on the conversation model (
lastRequest.modelId) instead of forcingcopilot/copilot-utility-small. - Update the unit test to assert both the conversation model and
agentIdSilentare preserved.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts | Captures model/mode/tools plus agentIdSilent from the last request; removes utility-model override path and related service dependency. |
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/electron-browser/runInTerminalTool.test.ts | Extends steering request capture to include send options and adds a regression test for model + agent preservation. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
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.
Backports #320639 (and the
agentIdSilentrouting from #320608) to release/1.124. Addresses #320611.When a
run_in_terminalcommand runs in the background, VS Code sends a steering notification to the chat session when it finishes / needs input / exits. That notification message starts a full agent turn.To save cost, these turns were forced onto the free
copilot/copilot-utility-small(gpt-4o-mini) model. But that model can't drive the agentic tool-calling loop, so the agent went silent after a backgrounded command finished — e.g. whennpm ifailed, the notification arrived but the agent never reported it or continued.A notification turn runs over the full conversation context, so it was never going to be free. This removes the utility-model override and runs the notification on the conversation's own model (
lastRequest.modelId) instead. TheagentIdSilentrouting from #320608 is kept so the correct agent still resumes.Updated the unit test accordingly; focused test passes.