@@ -88,13 +88,16 @@ Restart `opencode2` after changing the package or its options.
8888
8989## Use
9090
91- Run ` /browser ` or choose ** Open browser tab** from the command palette. Run
92- ` /browser https://example.com ` to navigate and show the browser in one step.
91+ ` /browser ` reveals the currently selected browser tab when one exists; it does not create another tab. When the browser
92+ is empty, it creates the local ** New tab** page on demand. ` /browser https://example.com ` reuses the selected tab and
93+ starts navigation only after its terminal surface has the final viewport. Use
94+ ` /browser-new ` or ` /browser-new https://example.com ` when you explicitly want an additional tab. Both commands are
95+ available from the slash-command picker and command palette.
9396
9497| Action | Keyboard or UI |
9598| --------------------------- | -------------------------------------------------------- |
9699| Focus the address | ` Ctrl-L ` / ` Cmd-L ` |
97- | New browser tab | ` Ctrl-T ` / ` Cmd-T ` , or ` + ` |
100+ | New browser tab | ` /browser-new [url] ` , ` Ctrl-T ` / ` Cmd-T ` , or ` + ` |
98101| Close selected browser tab | ` Ctrl-W ` / ` Cmd-W ` , or the tab's ` × ` |
99102| Next / previous browser tab | ` Ctrl-Tab ` / ` Ctrl-Shift-Tab ` |
100103| Reload or stop loading | ` Ctrl-R ` / ` Cmd-R ` , or the toolbar button |
@@ -107,8 +110,10 @@ behavior there; `Cmd-W` still closes the page.
107110
108111Returning to OpenCode hides the browser without closing Electron or its pages, so reopening is fast. ** Remove browser
109112tabs from strip** also hides every browser page item while keeping the runtime ready; ` /browser ` restores them.
110- Closing the final tracked page closes the browser workspace. The session prepares an internal welcome page so reopening
111- stays fast; Host Chrome presents it as ** New tab** with an empty address instead of exposing its internal data URL.
113+ Closing the final tracked page closes the browser workspace and leaves no hidden replacement target. The Electron
114+ runtime stays ready; the next explicit ` /browser ` , ` open ` , or ` new_tab ` operation creates the next page. A plain
115+ ` /browser ` creates the local welcome page on demand and presents it as ** New tab** with an empty address instead of
116+ exposing its internal data URL.
112117
113118Popup windows are deliberately denied. Use ` + ` or the controller's ` new_tab ` tool when a new tracked page is
114119required.
@@ -132,16 +137,19 @@ The plugin automatically registers two local MCP servers:
132137
133138| MCP server | Responsibility |
134139| --------------------------- | ------------------------------------------------------------------------------------- |
135- | ` opencode-browser-control ` | Show, hide, navigate, create, list, select, and close tracked browser tabs. |
140+ | ` opencode-browser-control ` | Navigate, create, list, select, and close tracked browser tabs in the background. |
136141| ` opencode-browser-devtools ` | Inspect and operate the same live Electron pages through ` chrome-devtools-mcp@1.6.0 ` . |
137142
138- The control server exposes eight tools: ` show ` , ` open ` , ` new_tab ` , ` list_tabs ` , ` select_tab ` , ` close_tab ` ,
139- ` hide ` , and ` status ` .
143+ The control server exposes six tools: ` open ` , ` new_tab ` , ` list_tabs ` , ` select_tab ` , ` close_tab ` , and ` status ` . Agent
144+ operations never select the Browser workspace. They can add a browser item to the terminal tab strip and update its
145+ loading state, but OpenCode stays active until the user runs ` /browser ` or selects that browser tab.
140146
141147For reliable agent automation:
142148
143- 1 . Use ` open ` for an ordinary single-page request; it reuses the selected tab, including the initial welcome tab.
144- 2 . Use ` new_tab ` only when the user requests an additional tab or the task must keep multiple pages open concurrently.
149+ 1 . Use ` open ` for an ordinary single-page request; it reuses the selected tab in the background, including the initial
150+ welcome tab.
151+ 2 . Use ` new_tab ` only when the user requests an additional tab or the task must keep multiple pages open concurrently;
152+ the new page is also created and selected in the background.
1451533 . Read its stable logical ` tabId ` , current CDP ` targetId ` , URL, and title.
1461544 . Call Chrome DevTools MCP ` list_pages ` and match the live page by URL/title.
1471555 . Use Chrome DevTools MCP's numeric ` pageId ` for page-scoped DevTools operations.
@@ -159,6 +167,10 @@ retrying the same timed-out call.
159167The plugin launches the installed Chrome DevTools MCP entry with Node.js. It does not use ` npx ` , download an MCP
160168package during activation, discover system Chrome, or create a second browser runtime.
161169
170+ DevTools screenshots default to WebP at quality 80 and are bounded to 640×640 during capture. The bound keeps even an
171+ explicit PNG capture below Chrome DevTools MCP's inline-image threshold, so screenshot results remain typed image
172+ attachments that OpenCode can render in the session feed instead of opaque temporary-file messages.
173+
162174If the plugin becomes active during an existing agent turn, begin a new turn so OpenCode can refresh its MCP tool
163175catalog.
164176
@@ -177,7 +189,8 @@ OpenCode Host UI
177189
178190Background pages remain available to the user and agent, idle their offscreen paint rate at 1 fps, and do not send
179191frames to Kitty. Changing terminal geometry updates the selected page viewport and placement without stretching a stale
180- frame.
192+ frame. Explicit foreground URL commands wait for that viewport and Presentation to be ready before navigation; agent
193+ navigation remains immediate and offscreen.
181194
182195OpenCode V2 currently exposes session tabs rather than arbitrary native plugin tabs. The plugin therefore renders a
183196composite strip in the global app slot: OpenCode sessions and logical browser pages remain independently owned, while
0 commit comments