Clarify sandbox-first guidance for terminal tool unsandboxing#307783
Merged
dileepyavan merged 2 commits intomainfrom Apr 4, 2026
Merged
Clarify sandbox-first guidance for terminal tool unsandboxing#307783dileepyavan merged 2 commits intomainfrom
dileepyavan merged 2 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the runInTerminal tool’s model-facing guidance and input schema wording to encourage sandbox-first execution and to tighten when requestUnsandboxedExecution should be used, with accompanying unit test assertions to lock the prompt/schema text.
Changes:
- Added/updated sandboxing guidance in the tool model description to discourage unsandboxing before a sandbox attempt.
- Refined the JSON schema descriptions for
requestUnsandboxedExecutionandrequestUnsandboxedExecutionReasonto require concrete justification (sandbox failure or blocked-domain need). - Updated
RunInTerminalToolunit tests to assert the new guidance and schema text.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts | Updates sandbox guidance text and schema descriptions to drive sandbox-first behavior and require explicit unsandbox justification. |
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/electron-browser/runInTerminalTool.test.ts | Adds assertions verifying the updated model description and schema descriptions for sandbox/unsandbox guidance. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 1
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts
Show resolved
Hide resolved
justschen
approved these changes
Apr 4, 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 #304596
This updates the run-in-terminal tool guidance so models are told to execute commands in sandbox mode first and only set
requestUnsandboxedExecution=truewhen retrying after a sandboxed failure or when blocked domains are explicitly required.It also updates the related unit tests to lock in the new prompt and schema wording.
Validation:
RunInTerminalToolsandbox invocation messaging tests