docs(skills): polish BROWSER.md Way 1 and Way 2 from harness install.md#44
Merged
Alezander9 merged 1 commit intomainfrom May 9, 2026
Merged
docs(skills): polish BROWSER.md Way 1 and Way 2 from harness install.md#44Alezander9 merged 1 commit intomainfrom
Alezander9 merged 1 commit intomainfrom
Conversation
Bring the canonical Way 1/Way 2 facts from
browser-use/browser-harness:install.md into BROWSER.md, translated to
the session.connect() API. Surfaced during v0.1.0 testing where the
agent was failing to connect locally.
Way 1
- Explicit per-profile + sticky framing for the chrome://inspect
checkbox.
- Chrome 144+ popup-may-reappear caveat with concrete causes (daemon
restart, browser restart, time elapsed, "Allow for N hours"). Tells
the agent to expect this rather than treating a 403 on a previously
working connection as a hard failure.
- Failure-mode list mapping the two distinct error strings to the
right user instruction.
Way 2
- Per-platform launch command (Linux, macOS, Windows cmd, Windows
PowerShell) so the agent can pick the right shell without guessing.
- Default profileDir-based connect (reads DevToolsActivePort) instead
of the ws:// URL form, which is more reliable.
- Two precisions verbatim from harness install.md:
1. --user-data-dir must not be the platform default; Chrome 136+
silently no-ops the port flag in that case. Platform default
paths listed for all three OSes.
2. Cookie encryption is bound to the original profile dir; copying
a profile to a custom dir transfers bookmarks and extensions but
not logins. Tells the agent to fall back to Way 1 if logins are
needed instead of attempting the copy.
- Fix old example: bare ws://host:port/devtools/browser without a UUID
suffix does not work — Chrome's browser-level endpoint includes a
per-process UUID. The wsUrl form is now scoped as an escape hatch
with a working example.
Top-of-Connecting decision rule (Way 1 for real-browser tasks, Way 2
for unattended automation, cloud opt-in only) now appears before the
three Way blocks.
Source: https://github.com/browser-use/browser-harness/blob/main/install.md
+32 lines net (162 -> 194). No code touched; tests still 8 pass + 5
chrome-gated skip; resolveSkillsDir still substitutes {{SKILLS_DIR}}
to zero literal matches in materialized BROWSER.md.
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
Bring canonical Way 1 / Way 2 connection facts from
browser-use/browser-harness:install.mdinto BROWSER.md, translated to thesession.connect()API. Surfaced during v0.1.0 Windows testing where the agent was failing to connect locally with both Way 1 and Way 2.Why
The previous BROWSER.md condensed the harness's connection reference down to a few sentences each, dropping facts that the harness team treats as the source of truth — including at least one instruction that was wrong (
ws://127.0.0.1:9222/devtools/browserwithout the UUID suffix does not work on Chrome's browser-level endpoint). The harness install.md is the canonical reference and is held to a verifiable-against-Chrome-source standard; the agent should be reading from that quality of doc, not a lossy paraphrase.Way 1 changes
chrome://inspect/#remote-debuggingcheckbox. Tick once, persists across every future Chrome launch of that profile.Way 2 changes
profileDir-based connect (which readsDevToolsActivePort) instead of thewsUrlform, sinceprofileDirworks on every Chrome version including 144+ which doesn't serve/json/version.--user-data-dirmust not be Chrome's platform default; Chrome 136+ silently no-ops the port flag in that case. Platform-default paths listed for all three OSes.wsUrlexample: barews://host:port/devtools/browser(no UUID suffix) does not work — Chrome's browser-level endpoint includes a per-process UUID. ThewsUrlform is now scoped as an escape hatch with a working example.Top of Connecting
The decision rule now appears before the three Way blocks: Way 1 for real-browser tasks, Way 2 for unattended automation, cloud opt-in only.
Verification
bun run typecheckclean (no code touched).bun testfrompackages/bcode-browser/: 8 pass + 5 chrome-gated skip.resolveSkillsDiragainst tmpdir: zero literal{{SKILLS_DIR}}matches; new content survives substitution and lands intact (verified "cookie encrypted", "Chrome 144+ popup", "per-process UUID" markers in materialized output).+32 lines net (BROWSER.md 162 -> 194). Single-file change, skills documentation only.
Source
https://github.com/browser-use/browser-harness/blob/main/install.md (Browser connection reference section).