{
  "slug": "agent-browser-persists-named-cdp-session-to-tab-bindings-332de9d8de1c",
  "title": "agent-browser persists named CDP session-to-tab bindings",
  "tools": [
    "agent-browser"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-08-11T00:10:40.000Z",
  "announced_at": "2026-08-11T00:10:40.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "For named sessions sharing Chrome through `--cdp` or `--auto-connect`, start with `--pin-tab` to persist the session’s CDP target binding and fail with `tab_gone` if that tab closes. Use the target ID as a tab reference; recover with `tab new <url>` or select a tab from `tab list`.",
    "examples": [
      "agent-browser --session <name> --cdp <port|url> --pin-tab open <url>",
      "agent-browser --session <name> --json tab list",
      "agent-browser --session <name> tab new <url>"
    ],
    "gotchas": [
      "Version: v0.34.0",
      "--session <name> (required): Names the session whose tab binding is persisted.",
      "--cdp <port|url> (required): Connects to Chrome through CDP.",
      "--auto-connect: Alternative connection mode named in the v0.34.0 release note; its exact CLI syntax is not documented in the pages found.",
      "--pin-tab (required): Enables strict binding: commands fail with `tab_gone` if the bound tab closes. The flag is sticky per session.",
      "--json: Enables JSON output; `tab_gone` output includes `data.targetId` and optional sanitized `data.lastUrl`.",
      "tab <targetId>: Uses a CDP target ID directly as a tab reference; target IDs remain stable across daemon restarts.",
      "batch recovery `result`: Batch JSON places the same recovery object under `result` instead of `data`.",
      "Prerequisite: Connect the named session to a shared Chrome instance using `--cdp` or `--auto-connect`; use `--pin-tab` for strict binding.",
      "The persistent binding applies to named sessions connected through `--cdp` or `--auto-connect`.",
      "Strict binding requires starting the session with `--pin-tab`.",
      "`data.lastUrl` is optional and sanitized."
    ]
  },
  "why_it_matters": "When using a named session connected through `--cdp` or `--auto-connect`, keep commands and daemon restarts bound to the same Chrome tab, and detect when that tab is closed externally.",
  "before": "Without `--pin-tab`, `open` preserves legacy behavior and can navigate the shared active tab.",
  "sources": [
    "https://github.com/vercel-labs/agent-browser/releases/tag/v0.34.0",
    "https://github.com/vercel-labs/agent-browser/blob/main/docs/src/app/sessions/page.mdx",
    "https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/session-management.md",
    "https://github.com/vercel-labs/agent-browser/blob/main/skill-data/core/references/commands.md",
    "https://github.com/vercel-labs/agent-browser/blob/main/CHANGELOG.md",
    "https://github.com/vercel-labs/agent-browser"
  ],
  "rank": 0.93033,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-72fadec3a352a5bd-0:gate",
    "evidence_hash": "cf4098a5d190529cf742aaf9796e998dcb791e3da0bd7eac7e99f24c406127bd"
  },
  "review": {
    "draft_hash": "8b57f46f684457efcb708b65555cd7e4a94c8cba8403b4b62c8c76734c16b399",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:gate",
    "reason": "2 of 3 judge runs approved with p_yes >= 0.9 (mean 0.93 >= 0.9; 2 needed) and Jev gave 0.60 (>= 0.6 needed)."
  }
}
