Repository navigation
fix(browser): carry agent_driven on OpenTab across cold start, retry, promote, and 3P plugins - #306
Merged
Merged
Conversation
… promote, reconnect, and 3P plugins
Hona
added a commit
that referenced
this pull request
Nov 20, 2026
- Fold security-confirmed merged PRs #292 (6d7a6ed, WS-1 mandatory RemoteServer proxy), #294 (ae3e910, BROWSER-UI file-link/click-to-run fix with known symlink/junction root limitation), and #274 (5da6474, WS-9 engine MV3 extension host, inert without --extension flags) - Update browser Reviewed column: #301 in rework (#287 eager-attach time_updated regression still live on dev), #296/#298/#302/#303/#305/#306 in rework, #307 open for pre-merge security review - Audit upstream anomalyco/opencode fe8def6854..4122af0206 (+2 commits: 1 skipped #65255 core/codemode, 1 added UP-135 #65215 -> WS-8)
|
PR test build retired — merged into |
… UI, controlled notice bar, and close ordering races
Hona
added a commit
that referenced
this pull request
Nov 20, 2026
Hona
added a commit
that referenced
this pull request
Nov 20, 2026
…ven across previews and unconditional file:// ban
Hona
added a commit
that referenced
this pull request
Nov 20, 2026
…P-143 (#318) - Fold confirmed merged PRs #307 (a1e7d0d, click-to-load reply videos), #306 (b5167f7, atomic agent_driven), #301 (6522f11, routed-session attach + recency closing #287 regression), #296 (95cb36a, legacy rune_mcp suppression + Half::is_builtin + check_cdp), #303 (6fb05ce, oc-preview:// app routing + raw file:// ban completing UP-095-PREVIEWS), and #316 (6e98fc2, Rune 7a707454 / #1307 strict local video opening) - Add missing browser follow-up rows UP-095-3P-CONTRACT (#296 narrow third-party plugin browser contract gap) and UP-095-PROMPT-GATE (new-session-start-only prompt gate split from #302) - Record #302 split (tunnel vs gate), #314 masking stream paused pending owner decision on agent-tab contexts, and updated browser Reviewed entries - Audit upstream anomalyco/opencode 4122af0206..b9a60d9d07 (+11 commits: 3 skipped, 8 added UP-136..UP-143)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes
notes/review-rd-engine.mdFinding 4 (agent_drivenLoss Across Cold Start, Crash+Retry,promote_open, Reconnect, and Third-Party Plugins) and all 3 Round-1 READER-9 findings (091d1cd9), reconciled withorigin/dev5da64743(#294+#274).Merge Reconciliation (
origin/dev5da64743,#294+#274)apps/browser-engine/src/wire.rs(HostMsg::OpenTab): kept#274's 4 extension fields (isolated,allow_extension_pages,is_popup,ext_open_request_id) alongsideagent_driven.apps/browser-engine/src/engine.rs(open_tab,HostMsg::OpenTab, LinuxReopenTabs,HostMsg::SetAgentDriven): enforcedlet allow_ext = allow_extension_pages && !isolated && !agent_driven;, delegatedHostMsg::SetAgentDriventohandle_set_agent_driven, passedwas_agentdirectly in LinuxReopenTabs, keptengine.rsat 1,489 / 1,500 lines.apps/browser-engine/src/engine/extensions.rs: updatedhandle_set_agent_driven(Ordering::Release+snap.agent_driven = agent_driven+allowed_ext_ids.clear()+ext.set_tab_agent_driven), updatednotify_ext_tab_openedto callext.set_tab_agent_driven(tab_id, true)atomically on cold-startagent_driventabs before running effects, updated unmanaged extensionopen_tabcall site andopen_seed_probeTabSnapshot(agent_driven: false).apps/desktop/src/surfaces/browser/mod.rs: kept#294'sis_safe_local_workspace_root.Round-1 READER-9 Findings Closed
apps/desktop/src/plugin_host/native/browser/{scope.rs, browser.rs, chrome.rs}):TabScope::driververifies bundledTier::Bundled"browser"identity so third-party plugins (and non-bundled overrides) getTabDriver::Plugin(display_name)while MCP tools getTabDriver::Agent.Browser:OpenAsync,BrowserTab:DevtoolsAsync,Navigate,Back,Forward,Reload,Stop,ReloadIgnoreCache,Find,StopFinding,Inspect,Highlight,SetZoom,SetViewport,Show,ClearSiteAsync,ClearCacheAsync.crates/browser-pane/src/prompts/{mod,host}.rs,apps/desktop/src/surfaces/browser/prompts/view.rs,crates/opencode-i18n/locales/rune/en.json):TabDriver::{Agent, Plugin(String)}(sanitized, capped at 64 chars) inherited across pop-ups and context-menu opens."The plugin {{name}} is controlling this tab. Your answer applies this one time."for plugin-driven tabs vs"The agent is working in this tab. Your answer applies this one time."for agents.AuthAgentRequired,FileChooserBlocked, and older-engine app-cancelledAuthRequestsetblocked_guard_notice = true(cleared on document navigation or dismiss), rendering a one-line notice bar naming the plugin or agent, explaining sign-in prompts and file pickers are off, and offering an"Open in new tab"button (opens a clean human tab at the same URL preserving isolation context/proxy).crates/opencode-i18n/locales/rune/en.json):rune.browser.prompt.controlled.agent,rune.browser.prompt.controlled.openNewTab,rune.browser.prompt.controlled.plugin,rune.browser.prompt.perm.plugin.start_previewtab reuse (apps/desktop/src/surfaces/browser/rpc/exec/nav.rs:353): callsset_agent_driven(hid, true)beforenavigate_browser_tab.AuthRequest(crates/browser-pane/src/prompts/host.rs:249): whent.prompts.agent_drivenis true, cancels immediately (HostMsg::AnswerAuth { username: None, password: None }), setsagent_auth_required+blocked_guard_notice, and never pops an HTTP auth modal.earlyflip (crates/browser-pane/src/client.rs:852-886) sendsHostMsg::SetAgentDrivenimmediately beforeNavigate; context-menu"open-link"/"open-image"(apps/desktop/src/surfaces/browser/context_menu.rs) merges livetab.prompts.agent_driven/driverat click time.(Zero tests added/edited; zero
.github/edits; zero new third-party crates.)Verification (All 5 Targets + Live Proofs)
091d1cd9) CI: 6/6 pass (build-macos,build-windows (arm64/x64),guardrails,plan,publish-pr-build).engine.rs1,489/1,500;client.rs1,469/1,500; 376 i18n keys).apps/browser-engine --bins,cargo check --workspace,cargo build -p opencode-desktop,cargo check -p browser-pane --no-default-features— clean (0 warnings).scripts/web.ps1 -Check): clean (0 warnings; 1,041 files, nostd::time).adais,x86_64-unknown-linux-gnu, type-checked only):--workspace --all-targetsclean (47 s) +apps/browser-engine --binsclean (engine-linux-exit=0).air,aarch64-apple-darwin, undermac-lock-as.py):--workspaceclean (8 s,air_free: 67.3 GiB).proof/ws1/fix4-agent-driven.md,proof/ws1/fix4-plugin-notice.png,OPENCODE_RUNE_OTEL=0, scratch profiles):prove-fix4-agent-driven.ts: cold-start HTTP 401 ->AuthAgentRequired(anyAuthPrompt: false), cold-start<input type="file">->FileChooserBlocked,#274invariant (agent_driven: true + allow_extension_pages: truechrome-extension://-> refused), human tab flipped beforeNavigate(/auth)->AuthAgentRequired, reconnectTabListpreservesagent_driven: trueon all 4 tabs.prove-fix4-desktop.ts: realopencode-desktop.exe+ scratch 3P plugin"Demo Helper"+ fake older-engine socket proved Finding 1 (set_agent_drivenbeforenavigateon human tab), Finding 2 (honest plugin notice bar +"Open in new tab"+ honest permission bar, zero false"The agent is working in this tab"), and Finding 3 (older-engineAuthRequestauto-cancelled, zero auth modal).#292regression proofs rerun on merged head (prove-fix1-v2.ts+prove-fix1-r4.ts): ALL PASS.Held non-draft awaiting READER-9 second read before merge (do not self-merge).