Skip to content

fix: do not kill external Chrome on CDP disconnect (#539)#540

Open
RussellZager wants to merge 2 commits intovercel-labs:mainfrom
RussellZager:main
Open

fix: do not kill external Chrome on CDP disconnect (#539)#540
RussellZager wants to merge 2 commits intovercel-labs:mainfrom
RussellZager:main

Conversation

@RussellZager
Copy link

Replaced browser.close() with browser.disconnect() for CDP/remote sessions so the external browser is not terminated.

google-labs-jules bot and others added 2 commits February 25, 2026 00:42
- Introduce `safelyDisconnectCdp` helper in `BrowserManager` to close the underlying WebSocket connection instead of sending `Browser.close` command.
- Use `safelyDisconnectCdp` in `connectViaCDP` error handler and `BrowserManager.close` when connected via CDP.
- This prevents the external Chrome process from being killed when `agent-browser` disconnects or encounters an error during connection.

Fixes vercel-labs#539

Co-authored-by: Zman771 <605281+Zman771@users.noreply.github.com>
…80412380299

fix(cdp): prevent browser termination on CDP disconnect
@vercel
Copy link
Contributor

vercel bot commented Feb 25, 2026

@RussellZager is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

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