Skip to content

desktop: browser pane never attaches on Windows (attach returns 499 after CLI auto-update, command stays disabled) #60536

Closed as duplicate

Description

@Tafurety

Summary

On OpenCode Desktop (Windows), the built-in browser pane never becomes available: no "Browser" launcher appears in the session's + New tab menu, "Abrir navegador" is missing from the command palette, and its keybind does nothing. The server log shows a single experimental.browser/attach request that gets cancelled (499) during a CLI auto-update, and it is never retried, so the pane is never registered for the session.

A second, likely related bug: opening the built-in Browser entry under Settings > Extensions > Skills fails with Failed to load file / Location not found: /builtin, and the server logs GET /api/fs/read/browser.md 404.

Environment

  • opencode version: 2.2.2 (desktop app and bundled CLI)
  • OS: Windows 11 Home Single Language, NT 10.0.26300 (win32 x64)
  • Terminal: N/A (OpenCode Desktop 2.2.2, Electron window maximized 1280x800)
  • Shell: C:\WINDOWS\system32\cmd.exe
  • Install/channel: latest (packaged desktop app, packaged: true)
  • Active plugins: none configured (~/.config/opencode/opencode.jsonc only contains "$schema")

Reproduction

  1. Open OpenCode Desktop 2.2.2 on Windows and wait for the background service to start.
  2. Open a session and click + in the side panel (New tab).
  3. Observe that only Review, Terminal and Open file are listed; no browser.
  4. Open Settings > Keyboard Shortcuts: "Open browser" is listed with its default Ctrl+Alt+B.
  5. Press the shortcut, then rebind it (e.g. Ctrl+Alt+N) and press it: nothing happens.
  6. Open the command palette (Ctrl+K): "Open browser" is not listed at all.
  7. Open Settings > Extensions > Skills and select Browser: a toast appears with Failed to load file — Location not found: /builtin.

Expected Behavior

  • The browser pane should attach to the session on startup, and "Open browser" should appear in the + New tab launcher and the command palette, and respond to its keybind.
  • The built-in Browser skill should open its file instead of failing on the /builtin location.

Actual Behavior

The browser pane is never registered. Server log (~/.local/share/opencode/log/opencode.log):

timestamp=2026-10-30T06:29:00.787Z message="Sent HTTP response" http.method=POST http.url=/api/rpc/experimental.browser/attach http.status=499
timestamp=2026-10-30T06:29:08.651Z message="cli starting" version=2.2.2 channel=latest args="[\"serve\",\"--service\"]" role=cli

The attach request was issued against the previous service (2.2.1) and was aborted (499 = client closed request) 8 seconds before the service restarted as 2.2.2. It was never retried.

Earlier attach attempts also failed:

2026-10-29T08:39:47.300Z  POST /api/rpc/experimental.browser/attach  http.status=400
2026-10-29T16:09:36.514Z  POST /api/rpc/experimental.browser/attach  http.status=400
2026-10-29T22:24:37.077Z  POST /api/rpc/experimental.browser/attach  http.status=400
2026-10-30T00:47:37.450Z  POST /api/rpc/experimental.browser/attach  http.status=400
2026-10-30T02:27:37.718Z  POST /api/rpc/experimental.browser/attach  http.status=400
2026-10-30T05:56:38.108Z  POST /api/rpc/experimental.browser/attach  http.status=400

After the 2.2.2 service restart, the desktop app was restarted 4 more times (and fully uninstalled/reinstalled) and made zero further attach requests, so the pane stays permanently unavailable for that service. The agent-side browser tools are also empty in that state: any browser.* call returns Unknown tool.

Skill file load failure:

2026-10-30T07:16:23.214Z  GET /api/fs/read/browser.md  http.status=404
2026-10-30T07:19:37.936Z  GET /api/fs/read/browser.md  http.status=404

Additional Context

  • Desktop main log confirms the app reuses the already running service (probed: true, url: http://127.0.0.1:28894) instead of starting a fresh one, so restarting the app does not re-establish the pane.
  • The service restart was caused by an in-place auto-update: v2 CLI background service starting { reason: 'version-mismatch', previousVersion: '2.2.1' }.
  • Reinstalling the same version (2.2.2, currently latest) does not fix it.
  • Workarounds tried without success: pressing Ctrl+Alt+B; rebinding to Ctrl+Alt+N; switching sessions; fully restarting the app (4 times); uninstall + reinstall.
  • The window is maximized (1280x800) so layout.narrow() should be false; server.compatible reports 2.2.2.
  • Suspected areas: the renderer's browser model only attaches when the current session changes, so an aborted attach during the CLI version hand-off is never retried; and the aborted request may be classified as unsupported (rpc.unavailable / invalid_input) which disables the command for the whole window lifetime.

Activity

  1. opencodejr commented on Oct 30, 2026

    @opencodejr
    Contributor

    Thanks for the detailed report and logs!

    I think this is a duplicate of #60369. On Desktop 2.2.2, the built-in browser part of the desktop app fails to load. That error appears in the desktop log, not in opencode.log:

    scope finalizer failed { scope: 'browser', error: "SyntaxError: Identifier 'n' has already been declared ..." }
    

    When this happens, the pane never starts, so the Browser launcher and Open browser are missing and browser.* tools are unknown. Reinstalling 2.2.2 can't help, because the problem is in the 2.2.2 build itself. You can check for it in %APPDATA%\ai.opencode.desktop\logs\<date>\main.log.

    The second problem (Location not found: /builtin when opening the built-in Browser skill) is already tracked in #60439.

    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, reply if your main.log does not contain 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 past day. The Browser launcher is missing, Open browser is disabled and the browser.* tools are unknown on Desktop 2.2.2. That matches the 2.2.2 desktop build failing to load its browser part with SyntaxError: Identifier 'n' has already been declared, which is why reinstalling the same version didn't help. Please follow #60369 for updates. The Location not found: /builtin error when opening the built-in Browser skill is tracked in #60439.

    If your main.log (%APPDATA%\ai.opencode.desktop\logs\<date>\main.log) doesn't contain that SyntaxError, or the problem continues on a newer version, please comment here and we can reopen it. Thanks again 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