Skip to content

fix(browser): make startup reattach opt-in - #2203

Merged
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:bob/browser-cdp-auto-connect-opt-in
Aug 11, 2026
Merged

fix(browser): make startup reattach opt-in#2203
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:bob/browser-cdp-auto-connect-opt-in

Conversation

@bobleer

@bobleer bobleer commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #2196, reported from use.

The problem

#2196 reattaches to a running browser on every BitFun start. That is free while the browser stays up, but the browser only keeps its approval grant for its own process lifetime. Whenever the browser had restarted since the last connection, the startup reattach raised an "Allow remote debugging?" dialog before the user had asked for the browser at all — which is what happened in practice.

Change

Gate it behind ai.browser_control_auto_connect_on_startup, off by default, as a switch under the Default CDP row it applies to.

The description states what the user is opting into rather than just naming the option:

BitFun 启动时,若浏览器正在运行且已启用上面的设置,就直接连上。注意:浏览器重启后会忘记之前的授权,这时会立刻弹出一次授权确认,即使你这次并不打算用浏览器。关闭时改为按需连接 —— Agent 第一次用到浏览器才连。

Attach as soon as BitFun starts, if the browser is already running with the setting above enabled. Note: the browser forgets its approval when it restarts, so after that you get an approval prompt right away — even if you weren't going to use the browser this session. When off, BitFun attaches the first time an agent needs the browser.

Off is not a regression from before #2196: the on-demand path still attaches the first time an agent needs the browser, and the "Ready, connects on use" status from #2196 already says so.

en-US / zh-CN / zh-TW all carry the full text.

Verified

cargo check -p bitfun-core -p bitfun-desktop, tsc --noEmit (0 errors), locale JSON validated, default confirmed false in both the struct and Default.

Reattaching on every start turned out to be too eager. The browser only
keeps its approval grant while it stays running, so whenever the browser
had restarted since the last connection, BitFun's startup reattach put
an approval dialog in front of the user before they had asked for the
browser at all.

Gate it behind ai.browser_control_auto_connect_on_startup, off by
default, alongside the default CDP row it applies to. The setting's
description says what turning it on does, including the dialog after a
browser restart, and what stays true when it is off: BitFun attaches the
first time an agent needs the browser.
@bobleer
bobleer merged commit 92a7aa8 into GCWing:main Aug 11, 2026
7 checks passed
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.

1 participant