Filter Loading Sorry, something went wrong.
There was an error while loading. Please reload this page.
In a blind benchmark on our own 30-test page — five runs each, Claude Code 2.1.281, driver Claude Opus 5, Chrome 153 — Public Browser 3.0 passed 30/30 in every run with a median of 3.02M session tokens against 4.53M for agent-browser 0.38.1 (driven through its CLI): −33% tokens, −33% cost, −24% tool calls, −32% time. agent-browser passed 29/30 in every run; the one difference is T5.2, a navigator.webdriver check. Method, raw run JSONs and where Public Browser loses: README → Benchmarks.
Update the server and the Python client together. publicbrowser 2.0.0 (PyPI) needs Public Browser 3.0.0 or newer; publicbrowser 1.0.0 does not work with 3.0.0.
Real Chrome profiles: on macOS, site logins do not carry over through --profile (current Chrome does not load the profile's cookies through the link Public Browser uses). The README no longer promises a logged-in profile.
Install in Claude Code — the command in earlier READMEs failed with unknown option '-y':
claude mcp add --scope user public-browser -- npx -y public-browser@latest Changelog
The Python client publicbrowser 2.0.0 is released together with this version; publicbrowser 1.0.0 does not work with 3.0.0 (see Breaking).
Node.js 20 or newer. engines now requires node >=20; Node 18 is end-of-life and was not tested in CI.
A real profile runs without a debugging port. With --profile Chrome is driven over --remote-debugging-pipe; nothing listens on a TCP port. --attach and the Python escape hatch page.cdp do not work with a real profile (/session/create returns cdp_ws_url: null, page.cdp raises RuntimeError), session.cdpPort of the Node library is undefined, and a second Public Browser on the same profile stops with an error naming the PID of the Chrome that holds it (also when the temp directory path contains spaces). Should Chrome refuse the pipe, it gets a random debugging port (never 9222) and a warning.
CSS selectors are strict. A selector that matches more than one element no longer acts on the first match: click, type, fill_form, press_key, scroll, drag, file_upload and observe do nothing and return up to five candidates (ref, role, name). Invalid CSS such as Playwright's :has-text() names a ref or valid CSS as the way out. Flows that relied on the first match need a ref or a narrower selector.
Refs are kept per tab and never reused. Ref numbers keep counting across navigation and reload instead of starting again at e1, so a ref from a page you left reports stale ref instead of hitting whatever node now has that number. switch_tab switches the ref table instead of discarding it — refs of an unchanged tab stay valid when you come back, a ref of another tab names its tab, and a node a re-render removed reports stale ref instead of typing into nothing. Stored plans with hard-coded refs need fresh refs from view_page.
run_plan saveAs stores the raw result. Hint paragraphs appended to a result (Tip:, Note:, Warning:, Notice:) and blocks the server adds next to it (click diff, dialog, download and relaunch notices) no longer end up in the variable.
Python API. page.click() reads "text=Sign in" as visible text and "e12" / "ref:12" as a ref; any other string is a CSS selector (plain text and ref: were sent as CSS before and did not work). page.wait_for("text=…") waits for page text, a ref waits for the element to be visible. page.download() returns the download report (JSON with filename, path, size and url, or a notice) instead of a directory. page.evaluate() no longer returns appended hints as part of the value. Chrome.connect() takes token=, raises ConnectionError when another program answers on the port and PermissionError when a Public Browser server rejects the key.
run_plan has no parallel and no use_operator any more. Both were in the schema but always returned an error; they are gone from schema and description.
The Cortex no longer uploads anything. The opt-in telemetry upload and its variables PUBLIC_BROWSER_TELEMETRY and PUBLIC_BROWSER_TELEMETRY_ENDPOINT are gone; the default endpoint https://cortex.public-browser.dev/v1/patterns never existed. Cortex patterns stay in ~/.public-browser/cortex/.
The Script API answers only requests that carry its key (Authorization: Bearer , else 401). A server started with --script generates the key and writes it to ~/.public-browser/script-api- .token (mode 0600); Chrome.connect() reads it from there, hands a fresh key to a server it starts itself, or takes PUBLIC_BROWSER_SCRIPT_TOKEN / token=. Requests with an Origin header or a Host other than 127.0.0.1: / localhost: get 403, which blocks web pages and DNS rebinding. GET /health identifies the server ({server: "public-browser", version}), so a client never takes another program on the port for it.
A real profile no longer opens a debugging port that every local program could use to take over the browser running your profile (see Breaking).
A click that opens a new tab names the tab's ID and title in its answer, also in the one-line step summary of run_plan, so switch_tab can use it.
switch_tab works as a run_plan step without action instead of failing with Cannot read properties of undefined (reading 'isError'); a step whose handler returns nothing (wait_for without condition, handle_dialog without action) is reported as an error.
A click inside a cross-origin iframe that sits in another cross-origin iframe now reaches its target: nested frames are auto-attached through their parent frame, and view_page no longer lists iframes of other tabs, whose refs sent clicks into those tabs while reporting success. A Script API tab no longer sees or acts in the cross-origin iframes of the MCP tab.
drag scrolls the source into view before it reads coordinates — elements below the fold were dragged at off-screen coordinates and nothing happened (benchmark T3.3). HTML5 drag-and-drop (draggable lists, SortableJS, React DnD) runs through Input.setInterceptDrags and Input.dispatchDragEvent. When no reaction is detected — no drop, no DOM change around source and target, no input event — drag answers Drag not confirmed: … instead of Dragged … (the finding opens the line, so it survives the one-line step summary of run_plan), without an error: only the source's document is observed, for about 250 ms after release, so iframes, shadow DOM and later updates are not seen and the answer asks to verify with view_page rather than repeat the drag. Scrolling, a mere text selection and changes elsewhere on the page do not count as a reaction; Public Browser's own session overlay is ignored, other aria-hidden elements are not. A drag on a canvas says its result can only be checked with capture_image.
press_key sends every character once: the extra char event made Chrome insert each character twice (HHeelllloo) and each Enter as two line breaks, in inputs, textareas and editors.
On macOS a Control+ that changes nothing in the focused editor answers with a hint to use Meta instead of Control; nothing is remapped silently. Meta+A, Meta+Z and Meta+Shift+Z carry the editing commands (selectAll, undo, redo) Chrome needs on macOS, where these shortcuts did nothing.
type accepts contenteditable editors by ref (generic (editable) in view_page, also their text children) instead of rejecting role generic. Text goes to the end of the editor — before, it landed in front of the existing text — or to the caret when the caret already sits there, so a Meta+B before type still applies; clear: true empties the editor.
The Cortex no longer leaves patterns.jsonl.*.tmp and tree-head.json.*.tmp files behind: a failed atomic write removes its temp file, and leftovers older than 60 seconds are deleted on first access.
The shipped starter table of the Cortex (community-markov.json) survives every refresh; before, the first locally recorded pattern wiped it, although the server instructions had announced it as loaded.
evaluate no longer recommends inspect_element, a tool this server does not register.
Script API tabs get page lifecycle events: navigate waits for the page instead of always running into the 15-second settle limit (about 1.5 s instead of 15 s). A session with a call still running is no longer closed as idle, so a call longer than 30 seconds (such as a long wait_for) ends with its own result or timeout instead of error -32001 and a closed tab.
Python client: a call with a tool timeout waits for it plus 10 seconds on the HTTP side, so the server's timeout message arrives instead of a socket timed out.
The diff shows only what changed since the last observation (no stale REMOVED lines, no iframe nodes), at most 15 change lines with live regions first, then controls, the rest counted as +N more changes. A deferred click diff that is ready when the next call starts is attached only if that call is a page action (click, type, fill_form, press_key, scroll, drag, view_page, wait_for, run_plan); any other tool, including switch_tab, consumes it without showing it. A diff still being computed when the next call starts is dropped, whatever the tool.
Compact view_page: a parent's StaticText lines are dropped only when their texts, joined in order and compared without whitespace, form exactly the name on the parent's line (no substring rule), StaticText and LabelText carry no refs, and a text field's inner editor is dropped when the field's value shows its text. With filter: "all" a multi-line container name is cut to its first line, unless the container holds aria-hidden or inert text; the TRUNCATED line is shorter. With filter: "all" it appears only for such a container, counts the characters past the 80-character name and names no call; with other filters it still recommends view_page(ref, filter: "all").
Each tip appears at most once per MCP session (reset when a client initializes); state notes (counts, truncation) and the STOP/REFUSED warnings of the evaluate streak stay in every response.
No [~N tokens | N refs] footer in view_page and no Server: line in virtual_desk (both values stay in _meta), navigate and view_page print the Cortex line only when the most likely next tool reaches P ≥ 0.9 (whenever a hint matches the page type, _meta.cortex carries it in full), and unambiguous evaluate strings come back raw in the MCP tool; strings that read as numbers, booleans, null or JSON, empty strings, run_plan, the Script API and the Node library keep the JSON form.
Tool definitions cost 4,837 tokens on the wire (2.10.6: 4,990; npm run token-count).
The session overlay bar shows a small link for the person watching the browser (GitHub star, or a Jev hint): first after the fifth tool call, then every 10 minutes for 20 seconds; never in headless sessions, and never again once clicked or closed (remembered in ~/.public-browser/nudge.json). The overlay is aria-hidden, so agents do not see it.
Docs: the Claude Code install command was wrong — claude mcp add --scope user public-browser npx -y public-browser@latest fails with error: unknown option '-y'. The correct command is claude mcp add --scope user public-browser -- npx -y public-browser@latest (README, llms-install.md, python/README.md).
On macOS, current Chrome does not load site cookies through the profile link Public Browser uses for --profile, so sites start logged out; bookmarks, history, extensions and Chrome's own Google sign-in do carry over. The README no longer promises a logged-in profile. Verified with Chrome 153.
Benchmark harness (test-hardest/): CLI participants (agent-browser, Playwright CLI) in the blind runs, token counts deduplicated per model message, a real-site probe and an acceptance check script. Not part of the npm package.
Full Changelog: v2.10.6...v3.0.0




