Skip to content

fix(cli): pass custom Chrome args to local launches#2236

Open
luochen211 wants to merge 1 commit into
browserbase:mainfrom
luochen211:fix-browse-chrome-args
Open

fix(cli): pass custom Chrome args to local launches#2236
luochen211 wants to merge 1 commit into
browserbase:mainfrom
luochen211:fix-browse-chrome-args

Conversation

@luochen211

@luochen211 luochen211 commented Jun 11, 2026

Copy link
Copy Markdown

Summary

  • pass custom Chromium args through local isolated browse launches
  • read optional args from BROWSE_CHROME_ARGS in the browse daemon
  • cover isolated and auto-fallback launch strategies with regression tests

Fixes #2148

Tests

  • pnpm --dir packages/cli test tests/local-strategy.test.ts
  • pnpm exec prettier --check packages/cli/src/local-strategy.ts packages/cli/tests/local-strategy.test.ts packages/cli/src/index.ts
  • pnpm --dir packages/cli run eslint
  • pnpm --dir packages/cli run typecheck
  • git diff --check

Summary by cubic

Allow passing custom Chrome/Chromium flags to managed local browse sessions. The CLI reads BROWSE_CHROME_ARGS and forwards them to localBrowserLaunchOptions for managed-local launches; tests verify the args are passed through.

  • New Features
    • Parse BROWSE_CHROME_ARGS as JSON array or space-separated string.
    • Forward parsed args via DriverSessionManager using localBrowserLaunchOptions.args for managed-local only.
    • No args are sent if the env var is unset or empty.

Written for commit a3aef27. Summary will update on new commits.

Review in cubic

@changeset-bot

changeset-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a3aef27

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

This PR is from an external contributor and must be approved by a stagehand team member with write access before CI can run.
Approving the latest commit mirrors it into an internal PR owned by the approver.
If new commits are pushed later, the internal PR stays open but is marked stale until someone approves the latest external commit and refreshes it.

@github-actions github-actions Bot added external-contributor Tracks PRs mirrored from external contributor forks. external-contributor:awaiting-approval Waiting for a stagehand team member to approve the latest external commit. labels Jun 11, 2026
@luochen211 luochen211 force-pushed the fix-browse-chrome-args branch 2 times, most recently from 5d163d6 to 10d4f19 Compare June 11, 2026 10:00
@luochen211 luochen211 force-pushed the fix-browse-chrome-args branch from 10d4f19 to a3aef27 Compare June 11, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contributor:awaiting-approval Waiting for a stagehand team member to approve the latest external commit. external-contributor Tracks PRs mirrored from external contributor forks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

browse CLI: headed mode steals window focus on every command

1 participant