Skip to content

Clarify sandbox-first guidance for terminal tool unsandboxing#307783

Merged
dileepyavan merged 2 commits intomainfrom
DileepY/304596
Apr 4, 2026
Merged

Clarify sandbox-first guidance for terminal tool unsandboxing#307783
dileepyavan merged 2 commits intomainfrom
DileepY/304596

Conversation

@dileepyavan
Copy link
Copy Markdown
Member

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=true when 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:

  • Focused RunInTerminalTool sandbox invocation messaging tests
  • Hygiene on the touched files

Copilot AI review requested due to automatic review settings April 4, 2026 04:35
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

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 requestUnsandboxedExecution and requestUnsandboxedExecutionReason to require concrete justification (sandbox failure or blocked-domain need).
  • Updated RunInTerminalTool unit 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

@dileepyavan dileepyavan merged commit ddd3343 into main Apr 4, 2026
19 checks passed
@dileepyavan dileepyavan deleted the DileepY/304596 branch April 4, 2026 09:45
@vs-code-engineering vs-code-engineering bot added this to the 1.115.0 milestone Apr 4, 2026
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.

Agent proactively runs commands outside of sandbox

3 participants