#2782·stagehand

[v4] Stagehand.create times out on Browserbase with official extension preloaded

Author: BooxAppCreated Aug 20, 2026Updated Aug 21, 2026

Environment

  • Stagehand: @browserbasehq/[email protected]
  • Language/SDK: TypeScript
  • Node.js: v22.21.0
  • OS: macOS 26.5 (25F71)
  • Browserbase region: ap-southeast-1
  • AI provider/model: none (deterministic page/locator benchmark only)

Description

Stagehand.create({ browser }) consistently times out while initializing the v4 Browserbase extension worker. The browser session itself is created successfully, but Stagehand never becomes ready and navigation is never reached.

This reproduced on five fresh Browserbase sessions across three setup paths:

  1. the documented browserbase.launch({ apiKey }) path;
  2. a separately created Browserbase session followed by browserbase.connect({ apiKey, sessionId });
  3. uploading the official stagehand-extension.zip through the Browserbase Extensions API, creating the session with that extensionId, and passing the same ID to browserbase.connect.

All five attempts ended with the same initialization timeout. The Browserbase sessions later reached COMPLETED; no active session was left behind.

Minimal reproduction

Using the documented launch path:

typescript
import { browserbase, Stagehand } from "@browserbasehq/stagehand";

const browser = await browserbase.launch({
  apiKey: process.env.BROWSERBASE_API_KEY!,
  region: "ap-southeast-1",
  timeout: 120,
  keepAlive: false,
});

try {
  const stagehand = await Stagehand.create({ browser });
  // Never reached.
  const [page] = await browser.context.pages();
  await page.goto("https://example.com/");
  await stagehand.close();
} finally {
  await browser.close();
}

The explicit-extension control used the same official package asset:

typescript
const browser = await browserbase.connect({
  apiKey: process.env.BROWSERBASE_API_KEY!,
  sessionId,
  extensionId, // uploaded official stagehand-extension.zip
});

try {
  await Stagehand.create({ browser });
} finally {
  await browser.close();
}

Error

Error: Stagehand initialization timed out after 60000ms

Expected behavior

Stagehand.create should detect the preloaded service worker, finish its initialization handshake, and return a usable deterministic browser/page client.

Additional observations

  • The failure occurs before navigation or any AI primitive, so it is independent of the target page and model provider.
  • A separate monorepo-wide Zod 3 override initially caused the known registry collision at import time. That was isolated by allowing Stagehand to resolve Zod 4.4.3. The 60-second initialization timeout occurs after the import problem is resolved.
  • A Playwright control using fresh sessions in the same Browserbase project and region completed 5/5 runs.
  • I searched open and closed issues for the exact timeout and extension-worker initialization symptoms and did not find a matching v4 report.
  • Session and extension IDs are intentionally omitted from this public issue, but can be provided privately to Browserbase support if useful.

Is there a Browserbase project/region capability flag required for the v4 extension runtime, or additional diagnostics we can enable for the service-worker handshake?