Skip to content

Improve terminal unsandbox retry confirmation#309671

Merged
dileepyavan merged 14 commits intomainfrom
DileepY/readOnly
Apr 14, 2026
Merged

Improve terminal unsandbox retry confirmation#309671
dileepyavan merged 14 commits intomainfrom
DileepY/readOnly

Conversation

@dileepyavan
Copy link
Copy Markdown
Member

Summary

Fixes #308506

This improves the automatic unsandbox retry confirmation shown after a sandboxed terminal command fails due to sandbox restrictions.

Changes:

  • Removes the markdown link from the retry confirmation title so it reads plainly, for example:
    • Run \bash` command outside the sandbox?`
    • Run \bash` command outside the sandbox to access `example.com`?`
  • Keeps the existing sandbox documentation link behavior for the normal/pre-run unsandbox confirmation UI; this change only affects the retry confirmation UI.
  • Separates the retry-confirmation decision from sandbox analyzer force-approval:
    • sandbox force-approval can still suppress the initial sandboxed command confirmation
    • commands that would otherwise require confirmation still require confirmation before automatic unsandbox retry

Testing

  • npm run transpile-client
  • ./scripts/test.sh --run src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/electron-browser/runInTerminalTool.test.ts

Result:

  • 157 passing
  • 105 pending

Note: the focused test command was run unsandboxed because sandboxed execution repeatedly failed during Electron bootstrap while resolving/downloading from github.com, before tests executed.

Copilot AI review requested due to automatic review settings April 13, 2026 23:34
@dileepyavan dileepyavan enabled auto-merge (squash) April 13, 2026 23:35
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 13, 2026

Screenshot Changes

Base: 9374b64c Current: 9e0771e7

Changed (17)

chat/aiCustomizations/aiCustomizationManagementEditor/McpBrowseMode/Light
Before After
before after
agentSessionsViewer/CompletedRead/Dark
Before After
before after
agentSessionsViewer/CompletedRead/Light
Before After
before after
agentSessionsViewer/FailedWithoutDuration/Dark
Before After
before after
agentSessionsViewer/FailedWithoutDuration/Light
Before After
before after
agentSessionsViewer/WithFileChangesList/Dark
Before After
before after
agentSessionsViewer/WithFileChangesList/Light
Before After
before after
agentSessionsViewer/WithBadge/Dark
Before After
before after
agentSessionsViewer/WithBadge/Light
Before After
before after
agentSessionsViewer/WithMarkdownBadge/Dark
Before After
before after
agentSessionsViewer/WithMarkdownBadge/Light
Before After
before after
agentSessionsViewer/WithBadgeAndDiff/Dark
Before After
before after
agentSessionsViewer/WithBadgeAndDiff/Light
Before After
before after
agentSessionsViewer/BackgroundProvider/Dark
Before After
before after
agentSessionsViewer/BackgroundProvider/Light
Before After
before after
agentSessionsViewer/ClaudeProvider/Dark
Before After
before after
agentSessionsViewer/ClaudeProvider/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

Improves the UX and logic around the “automatic unsandbox retry” confirmation shown after a sandboxed terminal command fails due to sandbox restrictions, keeping the pre-run unsandbox confirmation behavior unchanged.

Changes:

  • Removes the sandbox documentation markdown link from the retry confirmation title by introducing a dedicated title builder.
  • Separates “force auto-approval” from the retry-confirmation decision so forced approvals can still suppress the initial confirmation but not suppress the retry elicitation.
  • Adds tests covering the new retry title text and the force-approval vs retry-confirmation behavior.
Show a summary per file
File Description
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts Refactors auto-approval logic to preserve retry confirmations and adds a helper to generate a plain retry title (no doc link).
src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/electron-browser/runInTerminalTool.test.ts Adds unit tests validating the retry title text and ensuring forced auto-approval still requires retry elicitation when appropriate.

Copilot's findings

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

roblourens
roblourens previously approved these changes Apr 13, 2026
@dileepyavan dileepyavan merged commit de858c0 into main Apr 14, 2026
26 checks passed
@dileepyavan dileepyavan deleted the DileepY/readOnly branch April 14, 2026 02:41
@vs-code-engineering vs-code-engineering bot added this to the 1.117.0 milestone Apr 14, 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.

Failed sandbox commands that try to write to read-only mapped files should retry automatically if the reason is clearly the sandbox

4 participants