Show allow-list actions for unsandboxed terminal confirmations#303660
Merged
dileepyavan merged 4 commits intomainfrom Mar 21, 2026
Merged
Show allow-list actions for unsandboxed terminal confirmations#303660dileepyavan merged 4 commits intomainfrom
dileepyavan merged 4 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the run_in_terminal confirmation flow so that, when an LLM explicitly requests unsandboxed execution, the confirmation UI still exposes the Allow dropdown actions (so users can allow-list commands from that dialog) while also updating analyzer plumbing and tests.
Changes:
- Thread
requiresUnsandboxConfirmationthrough terminal command-line analyzer options and use it to avoid sandbox analyzer “force auto-approve” in that case. - Keep terminal confirmation custom actions available for unsandboxed confirmations.
- Update
RunInTerminalTooltests to expect custom actions during unsandboxed confirmations.
Reviewed changes
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts | Passes requiresUnsandboxConfirmation into analyzers and changes when custom actions/confirmation messages are produced. |
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.ts | Extends analyzer options with requiresUnsandboxConfirmation?: boolean. |
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.ts | Disables sandbox “force auto-approve” when unsandboxed confirmation is required. |
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/electron-browser/runInTerminalTool.test.ts | Updates expectations for unsandboxed confirmation to include dropdown actions. |
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts
Show resolved
Hide resolved
jruales
approved these changes
Mar 21, 2026
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 #303426
Summary
requiresUnsandboxConfirmationthrough terminal command-line analyzer optionsBug Fixed
When the run-in-terminal tool asked to execute a command outside the sandbox, the confirmation UI did not expose the Allow dropdown actions. That meant users could not allow-list the command from the same confirmation dialog, even though that is the expected workflow for
chat.tools.terminal.autoApprove.Testing
VSCODE_SKIP_PRELAUNCH=1 ./scripts/test.sh --grep RunInTerminalTool