Bb project id optional#1071
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| REQUESTED_IMAGE="${requested_image}" prime images list --output json | node -e ' | ||
| const fs = require("fs"); | ||
|
|
||
| const requested = process.env.REQUESTED_IMAGE; |
There was a problem hiding this comment.
Pipeline env vars not visible to node process
Medium Severity
In resolve_from_list and get_status, the env var prefix (REQUESTED_IMAGE=... prime images list | node -e '...') only applies to the first command in the pipeline (prime images list), not to node. Since REQUESTED_IMAGE and IMAGE_REF are never exported, process.env.REQUESTED_IMAGE and process.env.IMAGE_REF are undefined inside the node scripts, causing both functions to always return empty output. This breaks the entire image resolution and status-polling flow, so ./build-and-push.sh will always fail at the "Could not resolve" error.
Additional Locations (1)
| if (typeof raw !== "string" || !raw) return 0; | ||
| const timestamp = Date.parse(raw); | ||
| return Number.isNaN(timestamp) ? 0 : timestamp; | ||
| } |
There was a problem hiding this comment.
Duplicated extractRef/extractTimestamp in inline node scripts
Low Severity
The extractRef and extractTimestamp JavaScript functions are duplicated verbatim between the resolve_from_list (lines 55–87) and get_status (lines 122–154) inline node scripts — about 30 lines each. If the JSON schema changes or a bug is found, both copies must be updated in sync, which is error-prone.


Description
This PR makes the Browserbase project ID optional across the browser integration.
BrowserEnvnow accepts Browserbase credentials as direct overrides and only forwards a project ID when one is explicitly provided. In DOM mode,Stagehand is initialized without
browserbase_project_idwhen it is omitted, allowing Browserbase to use the account default project. The DOMbrowser example and browser integration docs were updated to reflect the new behavior, and regression tests were added for the optional project-ID
flow.
Type of Change
Testing
uv run pytestlocally.Focused verification run locally:
uv run pytest tests/test_browser_env.pyuv run ruff check verifiers/envs/integrations/browser_env/modes/dom_mode.py verifiers/scripts/gepa.pyuv run ty check verifiersuv run pre-commit run --files verifiers/envs/integrations/browser_env/browser_env.py verifiers/envs/integrations/browser_env/modes/dom_mode.py verifiers/envs/integrations/browser_env/README.md verifiers/envs/integrations/README.md environments/browser_dom_example/browser_dom_example.py environments/browser_dom_example/README.md environments/browser_cua_example/browser_cua_example.py environments/browser_cua_example/README.md tests/test_browser_env.py tests/test_envs.pyChecklist
AGENTS.md)
Additional Notes
project_idwhile also supportingbrowserbase_project_id.tycleanup inverifiers/scripts/gepa.pyso the repo’s pre-push hook passes with the current local toolchain.Note
Medium Risk
Medium risk because it changes how Browserbase/Stagehand sessions are initialized (conditionally omitting
project_id) and updates the CUA sandbox runtime image/build pipeline; failures would surface as runtime session creation or sandbox startup issues.Overview
Browserbase project ID is now optional across the browser integration:
BrowserEnv/examples no longer requireBROWSERBASE_PROJECT_ID, and DOM mode session creation is validated to passbrowserbase_project_id=Nonewhen unset.CUA prebuilt image workflow is updated: defaults move to
browserbase/cua-server:latest, the CUA runtimeDockerfile.runtimenow builds the SEA binary in a multi-stage image build, andbuild-and-push.shswitches from Docker Hub toprime images pushwith readiness polling.Docs and tests are updated to reflect the new defaults, required keys (notably
OPENAI_API_KEYfor CUA server session creation), and the Prime Image publishing flow.Reviewed by Cursor Bugbot for commit e075ac6. Bugbot is set up for automated code reviews on this repo. Configure here.