[STG-1741] feat(cli): add global flags for Browserbase session parameters#1935
Merged
[STG-1741] feat(cli): add global flags for Browserbase session parameters#1935
Conversation
Add global CLI flags for commonly used Browserbase session parameters: --proxies, --advanced-stealth, --solve-captchas, --region, --keep-alive, --session-timeout, --block-ads. These flags configure the Browserbase session when using remote mode, eliminating the need to pass raw JSON. Session params are persisted to a config file and trigger daemon restart when changed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 064c0e4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
There was a problem hiding this comment.
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant User
participant CLI as "Browse CLI"
participant FS as "File System (Socket Dir)"
participant Daemon as "CLI Daemon Process"
participant BB as "Browserbase API"
Note over User,BB: CLI Command Execution Flow (e.g., browse [--proxies] open URL)
User->>CLI: Run command with session flags
CLI->>FS: getDesiredMode(session)
FS-->>CLI: Mode (local or browserbase)
alt Flags provided in local mode
CLI-->>User: Error: Session flags only supported in remote mode
else Flags provided in remote mode
CLI->>CLI: buildSessionParamsFromOpts()
CLI->>FS: Read existing session-params
FS-->>CLI: current parameters
CLI->>FS: Write browse-{session}.session-params
opt Params changed and Daemon is active
CLI->>Daemon: stopDaemonAndCleanup()
Daemon-->>CLI: Terminated
end
end
CLI->>Daemon: ensureDaemon(session)
Note over Daemon,BB: Daemon Initialization
Daemon->>FS: Read browse-{session}.session-params
FS-->>Daemon: JSON params (proxies, stealth, etc.)
Daemon->>BB: Create session with browserbaseSessionCreateParams
Note right of BB: Includes proxies, region, timeout and browserSettings (stealth, ads, captchas)
BB-->>Daemon: Session ID / CDP URL
Daemon-->>CLI: Daemon ready
CLI->>Daemon: sendCommand(args)
Daemon-->>CLI: Result
CLI-->>User: Output result
Note over User,FS: Status Check Flow
User->>CLI: browse status
CLI->>FS: isDaemonRunning()
CLI->>FS: Read browse-{session}.session-params
FS-->>CLI: session parameters
CLI-->>User: Output JSON (includes sessionParams)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pirate
approved these changes
Apr 1, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
browseCLIadvancedStealth,proxies,solveCaptchas, etc.New flags
--proxies--advanced-stealth--solve-captchas/--no-solve-captchas--region <region>--keep-alive--session-timeout <seconds>--block-adsExamples
Session flags are validated to only work in remote mode and will error with a helpful message if used in local mode.
Linear: https://linear.app/browserbase/issue/STG-1741/featcli-add-global-flags-for-browserbase-session-parameters
Test plan
browse --helpshows new flags with "(remote only)" descriptionsbrowse --proxies open https://example.com(in remote mode) creates session with proxy enabledbrowse --advanced-stealth --solve-captchas open https://example.comconfigures both settingsbrowse --proxies open https://example.com(in local mode) errors with helpful messagebrowse statusshows active session params🤖 Generated with Claude Code
Summary by cubic
Add global flags to
browseto configure Browserbase session settings in remote mode (proxies, stealth, CAPTCHA solving, region, keep-alive, timeouts) without JSON. Settings persist per session, trigger a daemon restart when changed, and appear assessionParamsinbrowse statusJSON; also fixes lint errors. Addresses Linear STG-1741.--proxies,--advanced-stealth,--solve-captchas/--no-solve-captchas,--block-ads,--region <region>,--keep-alive,--session-timeout <seconds>; remote-only with a clear error in local modeWritten for commit 064c0e4. Summary will update on new commits. Review in cubic