Repository navigation
Start agent browsers on demand and close unused ones (GODM-30) - #28
Merged
Merged
Conversation
Runs no longer launch Chromium up front: browser-use gets a core discovery URL as its cdp_url and the browser starts on the first browser tool call. Browsers left running by an earlier core are closed at startup unless still in use, idle browsers close after 5 minutes by default, and a launch that fails or is too slow shows up as a warning in the run.
# Conflicts: # packages/core/src/runner/mcpConfig.ts # packages/core/src/runner/runner.ts
# Conflicts: # docs/ARCHITECTURE.md # packages/core/src/browser/manager.ts # packages/core/src/runner/runner.ts # packages/core/test/browser-mcp.e2e.test.ts
Merged
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.
What does this change?
GODM-30: Godmode started Chrome windows it didn't need and left them running.
Why it happened
browserMcpServer→launchBrowser), even runs that never open a website: a one-line "reply hi" chat, condition checks, delegations. A headed window then stayed open for 15 minutes. An orchestrator delegating to a workspace agent opened one window per profile, i.e. two windows for one request.What changes (built on the per-run endpoint from GODM-28)
browserMcpServerno longer launches the browser. The run's endpoint (proxy.ts) starts it when browser-use first asks for/json/version, on its first browser tool call. Runs that never browse never start a browser. A missing Chrome is still checked up front, so the "Browser tools are unavailable" notice still appears.keepAliveMinutesgoes from 15 to 5. Users who already saved browser settings keep their stored value.How was it tested?
pnpm typecheckpasses, andbun testinpackages/corepasses: 699 pass, 0 fail.GODMODE_E2E=1 bun test test/browser-mcp.e2e.test.tspasses with the real browser-use 0.13.10 server:tools/list; one runs afterbrowser_navigate;cdp-integration.test.ts, against a real Chrome:/json/versionkill -9of the core, the next start closed the leftover Chrome.Checklist
pnpm typecheckandpnpm testpasscargo clippy/cargo testpass (ifapps/desktop/src-taurichanged): not changedpackages/sharedandapps/desktop/src/lib/api.ts: no API changedocs/ARCHITECTURE.md→ Browser, "On demand")