Skip to content

fix(vscode): let browser_open permissions be allowed always - #15235

Merged
marius-kilocode merged 2 commits into
mainfrom
fix-browser-permission-persistence
Oct 19, 2026
Merged

marius-kilocode merged 2 commits into
mainfrom
fix-browser-permission-persistence

Conversation

@marius-kilocode

@marius-kilocode marius-kilocode commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

The Integrated Browser browser_open permission prompt only offered Allow once and Deny. The tool sent an empty always list, so no always-allow rule could be saved and every browser navigation asked again. The Auto-Approve settings page also had no browser_open entry.

Why This Change Was Made

  • browser_open now offers two persisted rules: the current origin (navigate:<origin>) and all origins (navigate:*). The permission card shows the Manage Auto-Approve Rules section so the choice can be saved.
  • The Auto-Approve settings page now lists Browser Open with a default of Ask. Setting it to Allow applies to all browser_open calls.
  • Labels and descriptions now say Integrated Browser, and the settings description explicitly notes that this is the in-app preview, not Playwright browser automation.

Feature Clarification

browser_open belongs to the Integrated Browser feature (experimental setting kilo-code.new.experimental.browserAutomation, the Agent Manager preview panel). It is separate from Browser Automation, which is the Playwright MCP server enabled by kilo-code.new.browserAutomation.enabled and exposes MCP tools with their own MCP permissions.

User Impact

Users can approve a browser origin or all browser navigation once, or pre-allow browser_open in Settings, instead of answering a permission prompt for every navigation.

Evidence

Before, the prompt had no auto-approve rules:

browser_open permission before: only Allow once and Deny

After, the prompt exposes the current origin and all origins as auto-approve rules:

browser_open permission after: Manage Auto-Approve Rules with origin and wildcard rules

Before, Auto-Approve went from Webfetch directly to Doom Loop:

Auto-Approve settings before: no Browser Open row

After, Browser Open is available and defaults to Ask:

Auto-Approve settings after: Browser Open row defaulting to Ask

Validation

  • bun test ./test/kilocode/sandbox/http-tools.test.ts ./test/kilocode/permission/next.always-rules.test.ts (packages/opencode)
  • bun test tests/unit/i18n-keys.test.ts tests/unit/i18n-unused-keys.test.ts tests/unit/permission-description.test.ts tests/unit/permission-editor.test.ts tests/unit/permission-dock-utils.test.ts tests/unit/permission-dock-rules.test.ts (packages/kilo-vscode)
  • bun run typecheck and bun run lint in both packages
  • Manual self-test in isolated VS Code: an agent called browser_open with http://127.0.0.1:8765, and the before and after permission cards and Auto-Approve settings were captured.

@github-actions github-actions Bot added area:cli CLI, TUI and core engine area:vscode VS Code extension labels Oct 19, 2026
@kilo-code-bot

kilo-code-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • packages/opencode/src/kilocode/tool/browser-open.ts
  • packages/kilo-vscode/webview-ui/src/components/settings/PermissionEditor.tsx
  • packages/opencode/test/kilocode/sandbox/http-tools.test.ts

The incremental commit resolves both prior findings: always now contains only the approved origin while the full rule choices travel via metadata.rules (which saveAlwaysRules already accepts), and the browser_open settings row now uses the wildcard patch helpers so per-origin rules survive level changes. No new issues found in the changed lines.

No memory-leak risks: the incremental change adds no subscriptions, timers, or object lifetimes.

Previous Review Summary (commit c61a974)

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

Previous review (commit c61a974)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

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

WARNING

File Line Issue
packages/opencode/src/kilocode/tool/browser-open.ts 106 navigate:* in always makes a plain "always" reply (ACP, kilo run) persist an allow rule for every origin, not just the approved one. The wildcard could travel via metadata.rules instead, which the VS Code card already reads.
packages/kilo-vscode/webview-ui/src/components/settings/PermissionEditor.tsx 119 Adding browser_open as a simple row means changing the level writes a scalar that replaces the granular navigate:<origin> object, discarding per-origin rules saved from the permission prompt. Granular rows use setWildcardPatch to preserve them.
Files Reviewed (28 files)
  • .changeset/browser-open-always-allow.md - no issues
  • packages/kilo-vscode/tests/unit/permission-description.test.ts - no issues
  • packages/kilo-vscode/webview-ui/src/components/chat/permission-dock-utils.ts - no issues
  • packages/kilo-vscode/webview-ui/src/components/settings/PermissionEditor.tsx - 1 issue
  • packages/kilo-vscode/webview-ui/src/components/settings/permission-utils.ts - no issues
  • packages/kilo-vscode/webview-ui/src/i18n/{ar,br,bs,da,de,en,es,fa,fr,it,ja,ko,nl,no,pl,ru,th,tr,uk,zh,zht}.ts - keys present in every locale, no issues
  • packages/opencode/src/kilocode/tool/browser-open.ts - 1 issue
  • packages/opencode/test/kilocode/sandbox/http-tools.test.ts - no issues

No memory-leak risks: the change adds no subscriptions, timers, or object lifetimes.

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash-1017 · Input: 152.6K · Output: 9.8K · Cached: 1.1M

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit aca3a5f into main Oct 19, 2026
34 checks passed
@marius-kilocode
marius-kilocode deleted the fix-browser-permission-persistence branch October 19, 2026 11:03
@github-actions

Copy link
Copy Markdown
Contributor

Tracked for the opencode v2 rewrite in #15241 (core-v1-changes-port).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:cli CLI, TUI and core engine area:vscode VS Code extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants