--pin-tab has no effect with a browser-provider plugin (provider launch path never applies the tab binding)

Author: tmdrtmdrCreated Sep 24, 2026Updated Sep 25, 2026

Summary

With a browser-provider plugin (--provider <plugin>, tested with the Panerelay plugin), --pin-tab doesn't take effect. The session's binding file says "pinned": true, but the live BrowserManager stays unpinned. So register_discovered_page activates every new tab in the browser, including tabs opened by other sessions or by the user, and the session's reads and actions move to that tab.

Environment: agent-browser 0.38.1, Windows 11, Microsoft Edge + Panerelay 0.11.0.

Repro

bash
AB="agent-browser --provider panerelay"
$AB --session s1 --pin-tab tab new https://example.com/        # s1 gets its own tab
$AB --session s1 get url                                       # https://example.com/  (ok)
$AB --session s2 --pin-tab tab new https://en.wikipedia.org/wiki/Lisbon
$AB --session s1 get url                                       # https://en.wikipedia.org/wiki/Lisbon  (wrong)
cat ~/.agent-browser/s1.target                                 # still names s1's own tab, pinned: true

After another tab is created, s1.target itself gets rewritten to the stolen tab.

Cause (read at tag v0.38.1)

  • The --cdp and --auto-connect launch paths call apply_tab_binding_on_attach_or_rollback (actions.rs#L3986, #L4019). That call is what runs mgr.set_pin_tab(pin).
  • The provider-plugin branch of handle_launch (actions.rs#L5028 onwards) sets state.browser = Some(mgr) but never makes that call.
  • The pinTab handler (actions.rs#L2663) only forwards to the manager when the flag changes and a browser already exists. On a session's first command it runs before the launch, so the manager is created unpinned, and later --pin-tab flags are no-ops.
  • Result: let activate = !self.pin_tab; in register_discovered_page (browser.rs#L2169) is true.

Suggested fix

In the provider branch, after state.browser = Some(mgr), call apply_tab_binding_on_attach_or_rollback(state).await? the same way the --cdp branch does. Optionally, also have the pinTab handler sync mgr.set_pin_tab(state.pin_tab) after any launch, not only on change.

Workaround

Once the session is connected, flip the flag so the handler sees a change: --no-pin-tab tab list, then --pin-tab tab <own tN>. With that, 4 sessions running in parallel through the provider were fully isolated: 80/80 get url reads returned each session's own tab while every session navigated.


This issue was investigated and written by Claude (Anthropic's AI assistant, via Claude Code) under my supervision.

Source: vercel-labs/agent-browser