Environment
- Stagehand:
@browserbasehq/stagehand@4.0.1
- 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:
- the documented
browserbase.launch({ apiKey }) path;
- a separately created Browserbase session followed by
browserbase.connect({ apiKey, sessionId });
- 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:
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:
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?
Environment
@browserbasehq/stagehand@4.0.1v22.21.0ap-southeast-1Description
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:
browserbase.launch({ apiKey })path;browserbase.connect({ apiKey, sessionId });stagehand-extension.zipthrough the Browserbase Extensions API, creating the session with thatextensionId, and passing the same ID tobrowserbase.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:
The explicit-extension control used the same official package asset:
Error
Expected behavior
Stagehand.createshould detect the preloaded service worker, finish its initialization handshake, and return a usable deterministic browser/page client.Additional observations
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?