Skip to content

browser: in-app browser tools are never registered for desktop sessions (opencode.browser active, /api/mcp empty) #60519

Closed as duplicate

Description

@caowenlong3011-lab

Summary

On the Windows desktop app (v2.2.2), the built-in browser skill loads successfully but none of its tools exist. The server-side plugin opencode.browser reports active, yet no client MCP server is registered (/api/mcp returns []), so the in-app Chromium can never be driven. Every browser call fails as if the desktop app were not attached.

Environment

  • opencode version: 2.2.2 (opencode-cli --version, channel latest, desktop bundle)
  • OS: Windows 11 (10.0.26300, x64)
  • Terminal: Unavailable — desktop app GUI
  • Shell: C:\Windows\system32\cmd.exe
  • Install/channel: release, desktop NSIS installer (%LOCALAPPDATA%\Programs\ai.opencode.desktop)
  • Background service: bundled CLI at 127.0.0.1:28894
  • Active plugins: builtin only, no user plugins; opencode.browser → active

Reproduction

  1. Open the OpenCode desktop app on Windows and start a session inside the app window.
  2. Ask the agent to use the browser skill (@browser) or explicitly load it — the skill body loads fine.
  3. Observe that no browser tool is available.

Expected Behavior

The desktop client registers its browser capability as a client MCP server, so /api/mcp lists it and the agent gets tools.browser.* (tabs.open, snapshot, click, screenshot, …), exactly as the browser skill documents.

Actual Behavior

$ opencode api get /api/mcp
{"location":{"directory":"C:\\Users\\29586"},"data":[]}

# code mode
search({ namespace: "browser" })  ->  { "items": [], "remaining": 0 }
tools.browser.tabs.list({})       ->  Error: Unknown tool 'browser.tabs.list'.

The skill itself loads (so the skill permission is fine), but it is unusable because the tool namespace is empty. This matches the documented [browser.disconnected] state — except the session is open in the desktop app window, and the app has been running the whole time.

Additional Context

  • /api/plugin shows the server side is healthy:
{ "id": "opencode.browser", "source": { "type": "builtin" },
  "features": { "server": true }, "state": { "status": "active" } }
  • No client MCP registration appears anywhere in the server log (opencode.log) — no entry for /api/experimental/client-mcp or a browser client server at startup or when the session was opened.
  • The desktop renderer log has no browser/client-mcp errors; only unrelated ResizeObserver loop messages.
  • App data (opencode.settings) contains only firstLaunchOnComplete / window id / background color — nothing that would disable the browser.
  • The app was cleanly restarted (service started at 2026-10-30T14:34:40Z), so this is not a stale-service situation.
  • Workaround: install a Playwright MCP server instead (opencode mcp add playwright --global -- npx -y @playwright/mcp@latest); that provides browser automation, but not the in-app tabs shown in the Review pane.
  • Related: built-in skill previews also fail on Windows with Location not found: /builtin (separate report, skills: built-in skill preview fails with 'Location not found: /builtin' on Windows #60517). Both look like Windows/desktop-client integration gaps around built-in skills.

Activity

  1. opencodejr commented on Oct 30, 2026

    @opencodejr
    Contributor

    Thanks for the detailed report.

    I think this is a duplicate of #60369. In 2.2.2, the in-app browser's tools don't come through client MCP. The built-in opencode.browser plugin provides them once the desktop browser pane connects to the server. So an empty /api/mcp and no client-mcp entries in the log are normal for this version. Moving the browser tools to client MCP is only a draft so far (#59477). In the 2.2.2 desktop build, the browser pane's code fails to load (SyntaxError: Identifier 'n' has already been declared). When that happens the pane never connects, and the browser.* tools are never added.

    To check, search the desktop app's main.log (under %APPDATA%\ai.opencode.desktop\logs\<timestamp>\main.log) for a scope finalizer failed error for scope browser with that SyntaxError. It only shows up there, not in opencode.log or the renderer log. It may only be logged the first time the pane tries to connect after launch, so check the logs from a few launches.

    Possible duplicates and related issues, ordered by likelihood:

    The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different, for example if main.log doesn't show that SyntaxError.

  2. Hona commented on Oct 30, 2026

    @Hona
    Member

    Fixed in 2.2.3 by #60430.

    The desktop main-process bundle declared require twice, which broke the in-app browser and its browser.* tools.

    Please update to 2.2.3. In the desktop app, use Check for Updates, or install it from the release page. If the browser pane still doesn't appear afterwards, please reopen this issue with your main.log from the logs folder.

  3. opencodejr commented on Oct 31, 2026

    @opencodejr
    Contributor

    Closing this as a duplicate of #60369, since there hasn't been a reply in the last day. That issue covers the 2.2.2 desktop build where the in-app browser pane fails to load (SyntaxError: Identifier 'n' has already been declared in main.log), so the browser.* tools never appear. Please follow #60369 for updates.

    If your main.log doesn't show that SyntaxError and you think this is a different problem, reply here with the relevant main.log lines and we can look again. Thanks for the detailed report!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions