feat(browser): attach to a running Chrome session via direct CDP#119
Open
dedene wants to merge 1 commit intosteipete:mainfrom
Open
feat(browser): attach to a running Chrome session via direct CDP#119dedene wants to merge 1 commit intosteipete:mainfrom
dedene wants to merge 1 commit intosteipete:mainfrom
Conversation
This was referenced Mar 26, 2026
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
Chrome’s new
chrome://inspect/#remote-debuggingflow is now available in stable Chrome 144. The Chrome team’s write-up is here:https://developer.chrome.com/blog/chrome-devtools-mcp-debug-your-browser-session#how_it_works
The important change for Oracle is that Chromium browsers can now grant a remote debugging session to an already-running browser after explicit user approval. That solves the stale-session-cookie problem in browser mode: instead of launching a separate automation profile and hoping ChatGPT login state is still valid, Oracle can attach to the browser session you are already using.
In practice, that means you can keep using your normal browser window, stay signed in to ChatGPT, keep other tabs open, and let Oracle do its work in a dedicated tab in that same session. This should also work for similar Chromium browsers that expose the same remote-debugging flow, not just stock Chrome.
This implementation was inspired by the recent direct-CDP attach work in
chrome-devtools-mcp, but adapted to Oracle’s existing browser automation flow.What
This PR adds a local attach-running path that:
--browser-attach-runningfor local browser attachDevToolsActivePortmetadata to find the selected browser websocketchrome-devtools-mcpWhy
Verification
pnpm vitest run tests/browser/attachRunning.test.ts tests/browser/chromeLifecycle.test.tspnpm buildpnpm vitest run --exclude 'tmp/**' tests/browser tests/cli/browserConfig.test.ts tests/cli/browserDefaults.test.ts tests/cli/sessionRunner.test.tsps. To fully live-test this reliably against current
chatgpt.com, we also need the model-selection fix from #118, or something equivalent. Recent ChatGPT UI changes made Oracle stop selecting models reliably, so attach-running can look broken unless that path is fixed too.