Skip to content

docs(browser): browse env local auto-discovery#54

Open
shrey150 wants to merge 1 commit intomainfrom
shrey/cli-local-auto-discover
Open

docs(browser): browse env local auto-discovery#54
shrey150 wants to merge 1 commit intomainfrom
shrey/cli-local-auto-discover

Conversation

@shrey150
Copy link
Copy Markdown
Contributor

@shrey150 shrey150 commented Mar 25, 2026

Summary

  • Document new browse env local auto-discovery behavior (attaches to existing debuggable Chrome, falls back to isolated)
  • Document --isolated flag to force clean browser
  • Document explicit CDP target: browse env local <port|url>
  • Document new browse status fields: localStrategy, localSource, resolvedCdpUrl, fallbackReason

Sister PR to browserbase/stagehand#1886.

🤖 Generated with Claude Code


Note

Low Risk
Documentation-only updates describing new browse env local behaviors and additional browse status fields; no runtime code changes.

Overview
Updates REFERENCE.md and SKILL.md to document enhanced local mode behavior for browse env local, including auto-discovery of an existing debuggable Chrome, fallback to launching an isolated browser, and a new --isolated flag to force a clean instance.

Adds guidance/examples for attaching to an explicit CDP target via port or WebSocket URL, and notes additional browse status fields reported in local mode (localStrategy, localSource, resolvedCdpUrl, fallbackReason).

Written by Cursor Bugbot for commit e1cd472. This will update automatically on new commits. Configure here.

Update SKILL.md and REFERENCE.md to reflect new browse env local
behavior: auto-discovers existing Chrome with remote debugging,
--isolated flag, and explicit CDP target (port or URL).

Sister PR to browserbase/stagehand#1886.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
shrey150 added a commit to browserbase/stagehand that referenced this pull request Mar 27, 2026
)

## Summary

- `browse env local` now auto-discovers an already-running Chrome with
remote debugging enabled (via `DevToolsActivePort` files and common port
probing), attaching to it instead of always launching an isolated
browser
- Falls back to isolated launch when no debuggable Chrome is found —
keeps the command reliable
- Added `--isolated` flag to force clean isolated browser (old behavior)
- Added positional CDP target argument: `browse env local 9222` or
`browse env local ws://...`
- `browse status` now reports `localStrategy`, `localSource`,
`resolvedCdpUrl`, and `fallbackReason`

**Sister PR:** browserbase/skills#54

## Test plan

<img width="698" height="373" alt="image"
src="https://github.com/user-attachments/assets/1612cf7e-61f4-46b8-9cc6-e739c7363a5a"
/>

- [x] All 44 existing tests pass
- [x] `browse env local` with Chrome running +
`--remote-debugging-port=9222` → attaches to existing Chrome
- [x] `browse env local` without debuggable Chrome → falls back to
isolated launch
- [x] `browse env local --isolated` → always launches clean browser
- [x] `browse env local 9222` → persists CDP strategy targeting
127.0.0.1:9222
- [x] `browse status` shows local strategy details
- [x] `browse env remote` → unchanged

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@Kylejeong2 Kylejeong2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks solid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants