# Browser panes and agent browser steps

> Preview local apps at phone, tablet, or desktop sizes, let agents drive localhost with cmdbrief_browser_steps, and replay their runs for 7 days.

- **Category:** Setup and safety
- **Updated:** 2026-12-04
- **Reading time:** 6 min
- **Canonical page:** https://cmdbrief.com/guides/browser-panes-and-chrome-extension

## Quick verdict

- Every Browser pane has device size presets (`360×640` through `1440×900`, Fill, Custom, and Rotate) and its own isolated cookie store so you or your agents can test multiple logins side by side.
- Agents drive **localhost / `127.0.0.1` / `[::1]` pages only** through 11 MCP tools including 25-step `cmdbrief_browser_steps` flows, with **Take over** / **Give back** and 7-day replayable recordings that **never record typed text**.
- Use **Mark up** in the Browser pane to annotate a snapshot of the local page and send it to your workspace lead.

## What you get

- **Browser pane:** Isolated cookie store per pane; Phone, Tablet, Laptop, Desktop, Fill & Custom viewports; Take over, Give back, and Mark up a snapshot
- **Workspace lead & crew:** Drives localhost pages via `cmdbrief_browser_steps` (up to 25 steps); Receives marked screenshots and CSS coordinates; Recorded for 7 days in Analytics › Browser runs (no typed text)
- **Browser pane → Workspace lead & crew:** marked snapshots and feedback
- **Workspace lead & crew → Browser pane:** localhost clicks, screenshots, and verified flows
- **Connection:** Agent browser controls work on localhost

Use the built-in **Browser pane** to preview and test local web apps inside [Stage and your workspaces](https://cmdbrief.com/guides/workspaces-and-views). Agents can drive the page, and you can take over, give control back, or mark up a snapshot for the lead.

- Agents can only screenshot, click, type into, scroll, and read console logs on **local addresses** (`localhost`, `127.0.0.1`, `[::1]`, including published artifact pages). Opening an external URL via `cmdbrief_browser_open_external` prompts through the agent’s CLI first.
- Each published HTML artifact opens on its own isolated origin (`http://p….localhost:…`) so one published page cannot read another page’s cookies or storage, and links to outside sites prompt before opening.
- Browser panes opened by agents clean themselves up automatically once their agent closes or sits idle for 30 minutes (unless you are viewing, driving, or marking the pane). Panes you open yourself are never auto-closed.
- On macOS, CmdBrief stays behind the app you are using when an agent opens a Browser pane rather than stealing focus.

## Device presets and how panes run on Mac, Linux, and Windows

| Preset | CSS size | User agent |
| --- | --- | --- |
| Small phone | `360×640` | Mobile user agent |
| Phone | `390×844` | Mobile user agent |
| Large phone | `430×932` | Mobile user agent |
| Tablet | `820×1180` | Mobile user agent |
| Laptop | `1280×800` | Desktop user agent |
| Desktop | `1440×900` | Desktop user agent |
| Fill / Custom / Rotate | Pane bounds or `"WxH"` (plus landscape toggle) | Matches preset or `mobile_ua` flag |

*Built-in viewport sizes available in the Browser pane toolbar and in cmdbrief_browser_view.*

| Platform | Browser engine | Cookie isolation & notes |
| --- | --- | --- |
| macOS | Embedded native WebView | Dedicated persistent cookie store per pane; logins survive app restarts. Audio/video stops automatically when a page leaves the screen. |
| Windows | Embedded WebView2 (Edge runtime) | Dedicated WebView2 data folder per pane (`runtime\browser-panes`); logins survive restarts. Requires `WebView2Loader.dll` beside `cmdbrief-app.exe` and draws with Direct3D 12 (GL fallback). |
| Linux | Headless Chrome or Chromium over `--remote-debugging-pipe` | Interactive inside the window (up to ~30 fps, clicks, wheel, typing, Back/Forward, `file://`) with **no open listening port** so other programs cannot drive it. Each pane gets its own browser context; cookies last until the headless browser closes or restarts. |

*Browser pane architecture by operating system. On Linux, CmdBrief finds Chrome, Chromium, or Playwright’s Chromium automatically (or uses CMDBRIEF_BROWSER_BIN).*

If you have a paired [Linux build machine](https://cmdbrief.com/guides/linux-build-machine), you can also set Workspace settings › **Agents’ browsers run on** to offload agent-opened Browser panes to that Linux box headlessly. Each workspace keeps a persistent browser profile on the builder so test sign-ins survive between runs without copying cookies back to your Mac.

## Let agents drive localhost with cmdbrief_browser_steps

**Step 1 of 3 · An agent can do this** (Stage Browser tab & Settings › Coordination › Browser pane)

**Let agents use a Browser pane** is on by default in **Settings › Coordination › Browser pane**. Every [lead and crew member](https://cmdbrief.com/guides/lead-and-crew-workflow) receives 11 browser MCP tools (`cmdbrief_browser_list`, `_open`, `_view`, `_screenshot`, `_click`, `_scroll`, `_type`, `_steps`, `_console`, `_close`, and `_open_external`).

- **Batch flows in one call:** `cmdbrief_browser_steps` runs up to **25** `click`, `type`, `expect`, `scroll`, and `wait` steps sequentially in one round-trip, stopping at the first failed step and returning a screenshot at the end.
- **Text-first targeting:** steps find controls by visible text, field label, or CSS selector (retrying up to 3 seconds for dialogs to appear).
- **Multi-login testing:** an agent can open up to 4 Browser panes of its own (`new: true`), each with separate cookies, and crew members sharing a tab never collide on each other’s panes.
- **Take over / Give back:** in the Stage Browser tab, click **Take over** to interact with the page yourself. While you are the driver, CmdBrief refuses agent `click`, `type`, and `scroll` calls until you click **Give back**. You can also freeze and **Mark up** any localhost pane (Element, Pin, Arrow, Rectangle, Note) and send the marked snapshot with CSS pixel coordinates straight to the lead.

> **Tip:** Pair Browser panes with [managed dev servers](https://cmdbrief.com/guides/worktrees-heavy-jobs-and-dev-servers) so each agent spins up its app on a free `localhost` port and tests it immediately.

## Replay 7-day browser run recordings

**Step 2 of 3 · You do this** (Analytics › Browser runs or Stage Browser clock icon)

**Record agents’ browser runs** is on by default under **Settings › Coordination › Browser pane**. Each session captures every browser call and `cmdbrief_browser_steps` step made by one agent on one pane until that pane sits idle for 10 minutes.

- **Typed text is never recorded:** recordings keep action targets, how each target was resolved (visible text, label, selector, or click point), timing, click-ring coordinates, and JPEG snapshots (up to 1024 px), never what was typed into fields.
- **Replay from two places:** click the **clock icon** in the Stage Browser panel header to jump into that pane’s newest runs, or open **Analytics › Browser runs** to inspect every run across workspaces.
- **Automatic local pruning:** recordings live locally under `<app support>/browser-runs/` and are automatically pruned after **7 days** (or oldest first past 400 MB).

**Check it worked**

| Where | Run or do | Pass |
| --- | --- | --- |
| Analytics › Browser runs | Open a completed agent browser run and step through with `←` / `→` | Each step shows a click ring on the page snapshot, target resolution method, and step duration. |

## Send feedback from the Browser pane

**Step 3 of 3 · You do this** (Stage › Browser)

1. Open a local page in the **Browser** tab on Stage and choose the viewport you want to review.
2. Click **Mark up** to freeze a snapshot. Use a pin or an element mark to show the lead where to look.
3. Send the annotated snapshot to the workspace lead. If you took control of the live page, choose **Give back** when the agent can continue.

## If it fails

| What it says | Fix |
| --- | --- |
| Agent browser call fails with “nothing is listening there (is the dev server running?)” | Start the workspace dev server first (or let the agent start one via `cmdbrief_devserver_start`) and confirm the `localhost` port matches. |
| Agent cannot click or screenshot a staging or production URL in a Browser pane | Agents drive local pages on `localhost`, `127.0.0.1`, or `[::1]`. For an agent-driven check, run the app on a local dev server and open its local URL in the pane. |
| Linux Browser pane log shows “No usable sandbox” | Install packaged Google Chrome (`/opt/google/chrome/chrome`) or Debian Chromium (`/usr/lib/chromium/`) whose AppArmor profile permits sandboxing. Otherwise CmdBrief falls back to `--no-sandbox` and notes it in Settings › Coordination › Browser pane (or set `CMDBRIEF_BROWSER_NO_SANDBOX=1`). |
| Windows Browser pane fails to start | Keep `WebView2Loader.dll` in the same folder as `cmdbrief-app.exe` and ensure Microsoft Edge WebView2 Runtime is installed. |

## Questions

### Does CmdBrief record passwords or form input in browser run recordings?

No. Browser run recordings explicitly never record typed text. They capture screenshots, click coordinates, target resolution metadata, and step durations, and are deleted automatically after 7 days.

### Can I replay browser runs recorded before upgrading to 0.5.105?

Yes. Older Browser runs still play in Analytics › Browser runs while they are retained. The usual 7-day and 400 MB limits still apply.

### Do Browser panes work on Linux without X11 or an embedded web view?

Yes. On Linux, CmdBrief runs a local headless Chrome or Chromium instance over `--remote-debugging-pipe` (no TCP port) and draws interactive frames inside the Wayland or X11 window at up to ~30 fps, with isolated per-pane contexts.

### How do I clear old Browser panes that agents left open?

CmdBrief closes unused agent panes after 30 minutes automatically. To clear idle panes immediately, open Settings › Coordination › Browser pane and use **Unused Browser panes** (click twice to confirm).

## Primary sources

Provider terms and product behavior can change. Confirm plan, pricing, model, and permission details in the current official documentation.

- [CmdBrief 0.5.105 release notes](https://cmdbrief.com/changelog#v0-5-105)
- [Chrome DevTools Protocol documentation](https://chromedevtools.github.io/devtools-protocol/)

## Keep reading

- Setup and safety: [Device Hub: leased iOS simulators and Android emulators](https://cmdbrief.com/guides/device-hub-simulators)
- Setup and safety: [Worktrees, heavy-job slots, and managed dev servers](https://cmdbrief.com/guides/worktrees-heavy-jobs-and-dev-servers)
- Workflows: [Workspaces and views: Overview, Stage, Products, Advanced](https://cmdbrief.com/guides/workspaces-and-views)
- Workflows: [Run a lead agent and crew in CmdBrief](https://cmdbrief.com/guides/lead-and-crew-workflow)
- Setup and safety: [Add a Linux build machine for your Mac’s agents](https://cmdbrief.com/guides/linux-build-machine)

---

Markdown mirror of https://cmdbrief.com/guides/browser-panes-and-chrome-extension, generated at build time from the same data the HTML page renders. Machine-readable index: https://cmdbrief.com/llms.txt
