fix: stop injecting --site-per-process into local Chromium launches
Closed
OP
4mo ago+15+15+01234567890123456789-2-2-0123456789
why
Stagehand unconditionally injected --site-per-process when launching local Chromium. That explicit switch overrides --disable-features=site-per-process and defeats --renderer-process-limit on multi-origin workloads, causing renderer pools to grow unbounded and leading to memory pressure/OOM kills under container limits.
The duplicate injection in v3.ts was already removed in #2127; this removes the remaining copy in launch/local.ts.
what changed
- Dropped
--site-per-processfromSTAGEHAND_DEFAULT_FLAGSinpackages/core/lib/v3/launch/local.ts - Dropped the same flag from
packages/evals/core/targets/localChrome.ts - Added regression tests in
launch-local-ignore-default-args.test.ts - Added a patch changeset for
@browserbasehq/stagehand
test plan
-
pnpm --filter @browserbasehq/stagehand exec vitest run dist/esm/tests/unit/launch-local-ignore-default-args.test.js(13/13 passed) - Live Chrome launch: parent argv has no standalone
--site-per-process; user disable/cap flags present - Full multi-origin SPA repro: renderer count stays near configured
--renderer-process-limit
Summary by cubic
Stop injecting --site-per-process into local Chromium launches. This lets user flags like --disable-features=site-per-process and --renderer-process-limit work and prevents runaway renderer counts.
- Bug Fixes
- Removed the flag from
packages/core/lib/v3/launch/local.tsandpackages/evals/core/targets/localChrome.ts. - Added regression tests in
packages/core/tests/unit/launch-local-ignore-default-args.test.ts(includes opt-in via args). - Added a patch changeset for
@browserbasehq/stagehand.
- Removed the flag from
Fixes #2193