Skip to content

fix(engine): always ask before browser tools on the built-in harness - #4422

Merged
LHagfoss merged 1 commit into
mainfrom
fix/engine-browser-always-ask
Nov 25, 2026
Merged

LHagfoss merged 1 commit into
mainfrom
fix/engine-browser-always-ask

Conversation

@LHagfoss

Copy link
Copy Markdown
Owner

What

The docs and the Settings footer promise that every browser action asks for approval. That held for external harnesses (the MCP path always shows a card), but not on the built-in harness:

  • Auto-approve skipped the card. authorize_tool_with_args returned Allow whenever auto_confirm was set, and the ACP, TUI and headless policies returned early under auto-approve.
  • Plan mode allowed page actions. Browser tools declare only Network, so allowed_in_plan_mode let the agent click and type into live sites.

Changes:

  • tools::always_asks (the browser tools) makes authorize_tool_with_args ignore auto_confirm for them. bypass_confirmation still means "this call was already approved": the executor passes it after the card was answered, so it keeps working.
  • AcpPolicy (desktop app), InteractivePolicy (TUI) and the per-call path ask for browser calls under auto-approve and skip the card for other calls as before. HeadlessPolicy refuses them, since nobody can answer.
  • Plan mode refuses browser_open, browser_click and browser_type; browser_read and browser_screenshot stay available and ask.
  • docs/computer-use.md says so.

Note on the issue's first criterion: it named bypass=true → RequireConfirmation. In the engine, bypass_confirmation is the flag for "already approved", so forcing a card there would ask twice or block execution. Auto-approve (auto_confirm) is what no longer skips it.

Changelog

Fixed: browser tools on the built-in harness ask before every action even with auto-approve on, and Plan mode no longer lets them click or type.

Testing

  • New tools/tests/browser_approval.rs: auto-approve still asks for every browser tool; an approval already given runs it; other tools are unchanged; Plan mode denies open/click/type and asks for read/screenshot. CI runs them.
  • cargo fmt --all -- --check, scripts/check-comments.py, scripts/check-rust-size.py.

Closes #4363

@github-actions github-actions Bot added the fix A bug fix label Nov 25, 2026
@LHagfoss
LHagfoss merged commit 92a733a into main Nov 25, 2026
7 checks passed
@LHagfoss
LHagfoss deleted the fix/engine-browser-always-ask branch November 25, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(engine): always ask before browser tools on the built-in harness

2 participants