Show automatic unsandbox retries in the chat terminal UI#308655
Merged
dileepyavan merged 11 commits intomicrosoft:mainfrom Apr 12, 2026
Merged
Show automatic unsandbox retries in the chat terminal UI#308655dileepyavan merged 11 commits intomicrosoft:mainfrom
dileepyavan merged 11 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds client-side detection of “sandbox blocked” failures for runInTerminal and, after user consent, surfaces the unsandboxed retry as a separate terminal tool invocation in chat so the retry is visible in the transcript.
Changes:
- Detect sandbox-blocked failures from command output and offer an Allow Once unsandboxed retry without a model roundtrip.
- Emit an additional chat tool invocation part representing the unsandboxed retry, and prepend a note to the final tool result.
- Refactor command rewriting into a reusable helper and add predicate-level retry detection tests.
Show a summary per file
| File | Description |
|---|---|
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts |
Adds auto unsandbox retry detection/confirmation + external tool invocation update emission; refactors command rewriting. |
src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/electron-browser/runInTerminalTool.test.ts |
Adds unit tests for shouldAutomaticallyRetryUnsandboxed. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 3
…r/tools/runInTerminalTool.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
benvillalobos
previously approved these changes
Apr 10, 2026
# Conflicts: # src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts
TylerLeonhardt
approved these changes
Apr 11, 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.
Summary
Details
When a sandboxed
runInTerminalexecution fails with output that looks blocked by the sandbox, the tool now:This keeps the retry visible in chat in the same style as normal terminal tool executions instead of only switching execution behavior behind the scenes.
Testing
node ./node_modules/eslint/bin/eslint.js src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts./scripts/test.sh --run src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/electron-browser/runInTerminalTool.test.tsFixes #308506