Skip to content

fix(agent-manager): persist sandbox default in worktree dialog - #11792

Merged
marius-kilocode merged 2 commits into
mainfrom
marred-postage
Jun 29, 2026
Merged

fix(agent-manager): persist sandbox default in worktree dialog#11792
marius-kilocode merged 2 commits into
mainfrom
marred-postage

Conversation

@marius-kilocode

@marius-kilocode marius-kilocode commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

This fixes a merge regression.

The Agent Manager new-worktree modal was deriving its sandbox toggle from the experimental sandbox config instead of the persisted new-session sandbox default. When sandboxing was disabled as the default, reopening the modal still showed sandboxing enabled and newly created Agent Manager sessions could be forced back into sandbox mode.

This changes the modal to load the persisted sandbox default, save modal toggle changes through the same default-setting path used by the prompt input, and correlate sandbox default responses with the modal request. The modal now only sends a create-session sandbox override while a local change is still pending, so new worktree sessions follow the saved preference instead of reverting to the config default.

This fixes unselecting sandboxing in the Agent Manager create modal, closing and reopening the modal, and seeing sandboxing selected again.

file-66bae27dfcf107d2a1d8b044938de184

Comment thread packages/kilo-vscode/webview-ui/agent-manager/NewWorktreeDialog.tsx
Comment thread packages/kilo-vscode/tests/unit/new-worktree-dialog-sandbox.test.ts
@kilo-code-bot

kilo-code-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • packages/kilo-vscode/tests/unit/sandbox-bootstrap.test.ts
Previous Review Summary (commit 401e0fd)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 401e0fd)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-vscode/webview-ui/agent-manager/NewWorktreeDialog.tsx 167 The modal ignores sandboxDefaultStatus refreshes without its fixed requestID, so changing the sandbox default in another view can leave the open dialog stale while new worktrees inherit the updated persisted default.

SUGGESTION

File Line Issue
packages/kilo-vscode/tests/unit/new-worktree-dialog-sandbox.test.ts 11 The new test is source-text based, so it does not exercise the dialog's request/revision state transitions and would miss regressions in the new sandbox-default flow.

Fix these issues in Kilo Cloud

Files Reviewed (6 files)
  • .changeset/agent-manager-sandbox-default.md - 0 issues
  • packages/kilo-vscode/src/KiloProvider.ts - 0 issues
  • packages/kilo-vscode/src/agent-manager/types.ts - 0 issues
  • packages/kilo-vscode/tests/unit/new-worktree-dialog-sandbox.test.ts - 1 issue
  • packages/kilo-vscode/webview-ui/agent-manager/NewWorktreeDialog.tsx - 1 issue
  • packages/kilo-vscode/webview-ui/src/types/messages/webview-messages.ts - 0 issues

Reviewed by gpt-5.4-20260305 · Input: 49.3K · Output: 7.3K · Cached: 209.7K

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit f26b706 into main Jun 29, 2026
21 checks passed
@marius-kilocode
marius-kilocode deleted the marred-postage branch June 29, 2026 12:51
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
fix(agent-manager): persist sandbox default in worktree dialog
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.

2 participants