{
  "slug": "agent-browser-react-introspection-commands-and-init-scripts-2801dd64650c",
  "title": "agent-browser React introspection commands and init scripts",
  "tools": [
    "agent-browser"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-05-07T15:29:58.000Z",
  "announced_at": "2026-05-07T15:29:58.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "For a React app, install the React DevTools hook at launch before inspecting it. Run `react tree`, `react inspect <fiberId>`, `react renders start` then `react renders stop`, or `react suspense` to inspect the tree, a fiber, renders, or Suspense boundaries.",
    "examples": [
      "agent-browser open --enable react-devtools <url>",
      "agent-browser react tree\nagent-browser react inspect <fiberId>\nagent-browser react renders start\nagent-browser react renders stop\nagent-browser react suspense",
      "agent-browser open --init-script <path> <url>"
    ],
    "gotchas": [
      "Version: v0.27.0",
      "<url> (required): URL to open; React commands require the hook enabled at launch.",
      "--enable <feature>: Enables a built-in init-script feature; `react-devtools` is the feature documented for React inspection. Repeatable.",
      "AGENT_BROWSER_ENABLE: Comma-separated built-in init-script features, such as `react-devtools`.",
      "<fiberId> (required): Fiber identifier to inspect; command reports props, hooks, state, and source.",
      "--init-script <path>: Registers a page init script before first navigation; repeatable.",
      "AGENT_BROWSER_INIT_SCRIPTS: Comma-separated init-script paths.",
      "Prerequisite: The React DevTools hook must be installed at launch with `--enable react-devtools`; without it, `react` commands error.",
      "Init scripts are registered before first navigation.",
      "The `--init-script` and `--enable` flags are repeatable.",
      "The React DevTools hook is vendored and embedded in the binary with zero runtime dependencies."
    ]
  },
  "why_it_matters": "Inspect a React application in a browser session by examining its component state, render behavior, and Suspense boundaries.",
  "sources": [
    "https://github.com/vercel-labs/agent-browser/releases/tag/v0.27.0",
    "https://github.com/vercel-labs/agent-browser/blob/v0.27.0/skill-data/core/references/commands.md",
    "https://github.com/vercel-labs/agent-browser/blob/v0.27.0/skill-data/core/SKILL.md"
  ],
  "rank": 0.98053,
  "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-c9cc261a634e313c-0:gate",
    "evidence_hash": "e5d3623fdc357372bdc6df2d75654b032412649ea061b6a597e344457f131971"
  },
  "review": {
    "draft_hash": "74359aab376a6aa4b343fcdd610b0fe89d6581ba7ea9b9de0f0f55c8deec07f0",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.79 (>= 0.6 needed)."
  }
}
