Skip to content
AI Primer
release

OpenCode Browse 0.1.0 rewrites its browser tool in Rust

OpenCode Browse 0.1.0 removes Playwright and claims 25 times lower memory use. Its browser actions compose with MCP tools in codemode and control the user's existing browser.

5 min read
OpenCode Browse 0.1.0 rewrites its browser tool in Rust
OpenCode Browse 0.1.0 rewrites its browser tool in Rust

TL;DR

  • Browse 0.1.0 replaces its Node/Playwright implementation with Rust, claiming 25x lower memory use and a 23x smaller footprint in OpenCode's announcement.
  • Browser actions compose with other MCP tools inside codemode, enabling cross-tool loops, as thdxr explained.
  • Agents control the user's existing browser rather than a separate instance, with a focus on stealth, according to thdxr's reply.
  • The rewrite cost about $60, thdxr reported, with instructions telling the agent to delegate its work to DeepSeek subagents.

The release notes quietly replace sessions with tab IDs and run one Browse instance per OpenCode project instead of per directory. Removing the Playwright dependency still leaves Playwright's injected script handling selectors and snapshots. The product page also describes lending an already-open tab to an agent.

Rust binary and memory

Published November 16, the 0.1.0 release puts the CLI, relay and MCP server in one native binary. The Chrome extension works with it unchanged.

The relay row compares Rust at idle with a Node process after six days. The merged rewrite's description separately reports a 5.6 MB binary, roughly 6–20 MB of idle relay memory and a roughly 5 MB MCP proxy.

Codemode and MCP tools

Browser actions can now share a codemode program with the agent's other MCP tools. Cross-tool loops earn equal billing with the Rust rewrite.

The example has four steps:

  1. Open a URL.
  2. Fetch a list of items.
  3. Iterate over the list, calling another MCP tool for each item.
  4. Continue the workflow.

Clients receive different interfaces, according to the release notes:

  • OpenCode: Plain browser tools such as navigate, snapshot, click, fill, screenshot, network and recording, available for composition in code mode.
  • Other MCP clients: execute, status and tabs. The JavaScript execution environment provides a Playwright-style page, plus helpers such as snapshot() and handoff().

The implementation documentation identifies QuickJS as the embedded JavaScript engine.

CDP and stealth

Commands travel through three components, according to the architecture documentation:

  1. MCP proxy: The agent starts browse mcp, which forwards calls to the local relay, normally on 127.0.0.1:19988.
  2. Rust relay: It manages agent tabs, handoffs and captures, and sends Chrome DevTools Protocol commands through the extension's WebSocket connection.
  3. Chromium extension: It executes commands through chrome.debugger in the user's browser.

Browse avoids CDP domains that pages can detect and runs its own code in isolated worlds. Chrome still displays its debugging bar while the debugger is attached, the documentation notes.

The rewrite PR specifically names avoiding Runtime.enable and retaining Playwright's injected script for selectors and snapshots.

Existing browser and tab IDs

Browse operates in the browser the user already uses, including its existing sign-ins and extensions. Supported browsers include Chrome, Edge, Brave, Arc, Helium, Vivaldi and Opera, according to the product page.

The release's tab interface has three rules:

  • navigate without a tab opens a background tab and returns its ID.
  • Subsequent calls address that tab ID; session tools are gone.
  • Each agent sees its own tabs and tabs the user lends it.

Agent tabs open in collapsed background groups. The toolbar button lends an existing tab to an agent and takes it back on another click, according to the usage documentation.

Site restrictions have a specific scope: allowedOrigins limits top-level navigation and popups, but does not filter page-initiated fetches, XHR or subresource requests, the security documentation says.

Credential handoffs

While soliciting examples that browser automation could not cover, thdxr said every escape hatch he had needed on Linux was credential-related. His workaround could take screenshots and move the mouse through the CLI; credentials were the next focus.

Browse already supports a human handoff for login, 2FA and payment steps. The user completes the sensitive step, then clicks Continue to resume the agent.

Installation and updates

Existing users receive the CLI update automatically; the Chrome extension does not need an update for this release.

The release notes give this installation command:

The installer configures supported agents through a searchable picker and preserves comments and formatting in their configuration files. Native installs update from the release service; global package installs update through the package manager that installed them.

The README adds a distribution detail: the npm package remains a small Node 22+ launcher for the platform's native binary. An already-running agent needs a restart or MCP reload to discover Browse after installation.

The $60 rewrite

The reported $60 covered reimplementing the parts of Playwright and Patchright the tool needed, according to thdxr's account. The orchestration instruction lived in agents.md: tell the agent to use DeepSeek subagents for all its work.

Further reading

Discussion across the web

Where this story is being discussed, in original context.

On X· 6 threads
TL;DR1 post
Rust binary and memory1 post
Codemode and MCP tools1 post
CDP and stealth1 post
Credential handoffs1 post
The $60 rewrite1 post
Share on X