Skip to content

feat: agents sharing a worktree each get a browser tab of their own - #87

Merged
sean-brydon merged 2 commits into
mainfrom
feat/browser-tabs
Oct 13, 2026
Merged

sean-brydon merged 2 commits into
mainfrom
feat/browser-tabs

Conversation

@sean-brydon

Copy link
Copy Markdown
Collaborator

Why

When several agents check pages in one worktree at once (a lead with a dozen teammates, say), they all drove the worktree's single agent-browser page. Each open took the page from the others: refs went stale, a shot could be of another agent's page, and the live view in the app jumped from one agent's page to the next.

What

Box

  • berthd browser … --tab NAME (or $BERTH_BROWSER_TAB) gives an agent a tab of its own in the worktree's Chromium. Each tab has its own page, refs, console, failed requests, size and cookies, in a browser context of its own. Without --tab, commands use the main tab, as before.
  • Every tab is a window of its own, so its page counts as visible and renders at full speed unwatched. Measured: two tabs side by side both ran about 60 animation frames and 50 timer ticks a second. Only watched tabs are cast.
  • Every per-worktree route takes ?tab=. status and the new tabs route list the tabs, with idle_ms by the box's clock and busy. close?tab= closes one tab. browser.tab.opened and browser.tab.closed are new events, and navigated and shot carry tab. The box advertises the browser.tabs capability.
  • A named tab closes after 5 idle minutes. A worktree has 2 to 8 tabs by the box's memory, counting Main only once used. At the cap, a tab idle for a minute makes room; otherwise open is refused, so no agent loses a page it's on. Each tab costs about 100 MB with a small page.

App

  • On boxes with browser.tabs, the agent's view shows a strip of tabs with a dot on the busy ones. It opens on the tab used last and then stays on the one you pick. The address, size, screencast and Console/Network drawer all follow the watched tab. If the watched tab closes, the view moves to the tab used last and says so.

Skills and docs: berth-browser tells agents working side by side to use a tab each, and berth-orchestrate tells leads to name one in each brief. Agent browser guide, berthd and events references, and a changelog line.

Checks

  • go vet ./... && go test -race ./..., including a real-Chromium test of two agents at once. It covers independent pages and refs, separate cookies, rendering unwatched, the proxy in new contexts, per-tab size and screencast, the cap, and events.
  • cargo check, the app's checks, pnpm test (398) and pnpm build, npx tsc -p e2e, and the docs build.
  • E2E: agent-browser-tabs (new), agent-browser-size, agent-browser-beside and devtools all pass.

Needs the box upgraded; older boxes behave as before.

🤖 Generated with Claude Code

sean-brydon and others added 2 commits October 13, 2026 22:56
… one you pick

On a box with browser.tabs, each agent can have a tab of its own in a
worktree's browser. The agent's view lists them in a strip with a dot on
the ones in use, opens on the tab used last, and then only moves when you
pick another, or when the watched tab closes (with a short note). The
address, size, screencast and Console drawer follow the watched tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
berthd browser --tab NAME (or $BERTH_BROWSER_TAB) gives an agent its own
page in the worktree's Chromium: its own refs, console, requests, size and
cookies, in a browser context and window of its own, so it renders at full
speed whether or not anyone watches. Without it, agents in one worktree
shared a page and took it from each other, and the live view jumped
between their pages.

Every per-worktree browser route takes ?tab=; status and the new tabs
route list the tabs (with idle_ms, by the box's clock); close --tab closes
one; browser.tab.opened/closed are events, and navigated/shot name the
tab. A worktree's browser has 2 to 8 tabs by the box's memory; at the cap
a tab idle for a minute makes room, else open is refused. The skills tell
agents working side by side to use a tab each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
berth Ready Ready Preview Oct 13, 2026 10:07pm UTC
berth-docs Ready Ready Preview Oct 13, 2026 10:07pm UTC

Request Review

@sean-brydon
sean-brydon merged commit e2d97b8 into main Oct 13, 2026
8 checks passed
@linear-code

linear-code Bot commented Oct 13, 2026

Copy link
Copy Markdown

ENG-6049

sean-brydon added a commit to Stener1/berthd that referenced this pull request Oct 14, 2026
v0.3.17 never went out (a draft: Apple was slow notarizing its dmg), and is
being tagged again on main, which now has cosscom#87. Its changelog entry moves
from Unreleased into v0.3.17.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

2 active deployments
Preview – berth-docs — c77c0305 Deployed Oct 13, 2026 by vercel[bot]
Preview – berth — c77c0305 Deployed Oct 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant