Repository navigation
fix: explain sandbox escalation prompts accurately - #14226
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Incremental pass over Files Reviewed (4 files)
Previous Review Summaries (7 snapshots, latest commit 2439f50)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 2439f50)Status: No Issues Found | Recommendation: Merge Files Reviewed (1 file in this incremental pass)
The rest of this PR was reviewed in earlier passes; the delta since Previous review (commit 200859f)Status: No Issues Found | Recommendation: Merge Files Reviewed (1 file in this incremental pass)
The remainder of the delta between Previous review (commit 2069870)Status: No Issues Found | Recommendation: Merge Files Reviewed (1 file in this incremental pass)
No source code changed between Previous review (commit 7107621)Status: No Issues Found | Recommendation: Merge Files Reviewed (7 files)
Previous review (commit 97b786a)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (1 file in this incremental pass)
No source code changed between Fix these issues in Kilo Cloud Previous review (commit 27ceab7)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (23 files)
Fix these issues in Kilo Cloud Previous review (commit 9f45df5)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (30 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
Why
When the OS sandbox is on and the agent runs a mutating git command, Kilo shows a forced
sandbox_escalationprompt. The old title was "Allow Git operation outside the sandbox". Users read this as (a) only git metadata changes and (b) their Bash Allow rule or auto-approve toggle is broken.Approving the prompt actually runs the entire shell command and its child processes outside the sandbox: filesystem and network restrictions are removed, for that command only. Bash allow rules and auto-approve intentionally never cover this prompt. Git needs it because
.gitis read-only everywhere in the sandbox, and in a linked worktree the.gitfile points into the parent repository's.git/directory, which is outside the sandbox write boundary.What changed
kilo runfooter, ACP clients, VS Code permission dock, TUI permission prompt): the title is now "Run outside the sandbox", and the body states the scope, the git reason, and that Bash allow rules and auto-approve never approve it.kilo-code.new.autoApprove.enabledsetting description, and the enable toast: state that sandbox escalation prompts are excluded.sandboxing.mdwith the trigger, the one-shot unrestricted scope, the excluded approvals, and thegh/GitHub allowed-hosts path.Copy and docs only. No logic changes.
Final prompt copy
Title:
Run outside the sandbox?(VS Code) /Run outside the sandbox(CLI, ACP, TUI)Body:
Verification
bun run typecheckandbun run lintinpackages/kilo-vscode/bun run typecheckinpackages/opencode/bun test ./test/cli/run/permission.shared.test.tsinpackages/opencode/bun run test:unitinpackages/kilo-vscode/bun run script/check-opencode-annotations.ts --worktreebun run check-kilocode-changeinpackages/kilo-vscode/bun run script/check-md-table-padding.tsManual test
Isolated VS Code dev host on macOS, sandbox enabled in Settings,
Codeagent, promptRun this exact command and nothing else: git add -A. The normal shell permission was approved first, then the escalation prompt appeared.VS Code PermissionDock escalation prompt:
Observed title:
Run outside the sandbox?Observed body:
This runs the whole command with filesystem and network restrictions removed, for this command only. Git must write to .git, which is read-only in the sandbox and outside the worktree in a linked worktree. Bash allow rules and auto-approve never approve this prompt automatically.The command shown was
git add -A. The escalation was denied after capture.Sandbox toggle tooltip (enabled state):
Auto-approve toggle tooltip (disabled state):
The TUI prompt copy is in
packages/tui/src/routes/session/permission.tsxand passed typecheck and prettier. It was not exercised interactively in a terminal.