Summary
Configure the OpenCode browser-harness skill to strictly connect to the user's existing running ULAA browser (CDP at http://localhost:9222) and by default attach to/activate the currently active visible tab — matching BrowserCode's default behavior.
Current Behavior
- browser-harness requires explicit
BU_CDP_URL=http://localhost:9222 env var
new_tab() creates background tabs that aren't visually activated
switch_tab() attaches CDP but doesn't call Target.activateTarget by default
- User must manually call
activate_tab() to see actions
Desired Behavior (matching bcode)
- Default to existing ULAA browser on port 9222 (no env var needed)
- Automatically attach to
current_tab() (the active visible tab)
- Automatically call
Target.activateTarget so actions are visible
new_tab() should activate the new tab by default
- Zero-config: works out of the box with running ULAA
Technical Approach
- Modify
~/.config/opencode/skills/browser-harness/tool.py to inject BU_CDP_URL=http://localhost:9222 by default
- Update skill to auto-attach to active tab on first command
- Make
activate_tab() the default for navigation actions
- Test end-to-end on running ULAA instance
Acceptance Criteria
Summary
Configure the OpenCode browser-harness skill to strictly connect to the user's existing running ULAA browser (CDP at
http://localhost:9222) and by default attach to/activate the currently active visible tab — matching BrowserCode's default behavior.Current Behavior
BU_CDP_URL=http://localhost:9222env varnew_tab()creates background tabs that aren't visually activatedswitch_tab()attaches CDP but doesn't callTarget.activateTargetby defaultactivate_tab()to see actionsDesired Behavior (matching bcode)
current_tab()(the active visible tab)Target.activateTargetso actions are visiblenew_tab()should activate the new tab by defaultTechnical Approach
~/.config/opencode/skills/browser-harness/tool.pyto injectBU_CDP_URL=http://localhost:9222by defaultactivate_tab()the default for navigation actionsAcceptance Criteria
export BU_CDP_URLneeded - works automaticallygoto_url) happens in the visible tabnew_tab()creates and activates a new visible tab