Skip to content

fix(cli): keep sandbox disabled by default - #11898

Merged
marius-kilocode merged 2 commits into
mainfrom
alluring-flyingfish
Jul 3, 2026
Merged

fix(cli): keep sandbox disabled by default#11898
marius-kilocode merged 2 commits into
mainfrom
alluring-flyingfish

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

Authless CLI/TUI sessions were being forced into sandbox mode when no KILO_SERVER_PASSWORD was configured, even when experimental.sandbox was absent. That made network-sensitive tools fail by default and diverged from extension-controlled sessions, where sandbox activation is explicit.

This keeps the sandbox default behind the experimental config or per-session toggle while preserving the existing sandbox policy once it is enabled. Network restriction behavior still defaults to deny for enabled sandbox sessions unless experimental.sandbox_restrict_network disables it.

Fixes #11895

@kilo-code-bot

kilo-code-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The core change removes the secure() wrapper in policy.ts that previously forced sandboxing on for authless sessions regardless of experimental.sandbox config. The new behavior correctly preserves the safe default network mode (deny) once sandboxing is enabled, matching the PR description. All touched test files consistently add explicit experimental.sandbox: true config where the old forced-default behavior was previously relied upon, and the new/renamed tests accurately reflect the updated semantics. The changeset is user-facing and appropriately worded. All changed files live under kilocode-named paths, so no kilocode_change markers or upstream merge-hygiene concerns apply, and no new config fields were introduced (both sandbox and sandbox_restrict_network already existed in the schema).

Files Reviewed (7 files)
  • .changeset/sandbox-default-flag.md
  • packages/opencode/src/kilocode/sandbox/policy.ts
  • packages/opencode/test/kilocode/sandbox/config-network.test.ts
  • packages/opencode/test/kilocode/sandbox/session.test.ts
  • packages/opencode/test/kilocode/sandbox/shell-network.test.ts
  • packages/opencode/test/kilocode/sandbox/state.test.ts
  • packages/opencode/test/kilocode/task-nesting.test.ts

Reviewed by claude-sonnet-5-20260630 · Input: 26 · Output: 10.2K · Cached: 741.9K

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode enabled auto-merge July 3, 2026 10:16
@marius-kilocode
marius-kilocode merged commit c993b64 into main Jul 3, 2026
26 checks passed
@marius-kilocode
marius-kilocode deleted the alluring-flyingfish branch July 3, 2026 13:38
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
fix(cli): keep sandbox disabled by default
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.

[Bug] Sandbox breaks codebase search, web fetch, web search

2 participants