Skip to content

desktop: browser tools disappear from a running session after auto-update (2.2.0 -> 2.2.2) #60474

Closed as not planned

Description

@jichenyu

Summary

After the desktop app auto-updated from 2.2.0 to 2.2.2 and restarted, an already-running session lost the entire browser tool namespace (search("browser") returned 0). The browser attach RPCs returned HTTP 499 exactly at restart and were never retried for the resumed session. New sessions are not affected.

Environment

  • opencode version: 2.2.2 (upgraded from 2.2.0 during the session)
  • OS: Windows 10 (10.0.19045), x64
  • Terminal: desktop app (no terminal env vars set)
  • Shell: C:\Windows\system32\cmd.exe
  • Install/channel: desktop app, channel latest, generic auto-updater (https://opencode.ai/update/api/latest/desktop/opencode/)
  • Active plugins: none found (~/.config/opencode/opencode.json only contains a providers block)

Reproduction

  1. Start the desktop app on 2.2.0 and open a session in a project.
  2. Use browser tools successfully in that session (open a tab, take a screenshot).
  3. Let the app auto-update to 2.2.2 and restart.
  4. Resume / re-open the same session (the conversation is still live).
  5. Run search("browser") → 0 matching tools; browser.* calls are unknown.

Expected reproduction rate: consistent for the session that was running during the update; a brand new session gets the tools back.

Expected Behavior

The resumed session should keep the browser tools, or the desktop client should re-attach the browser bridge after restarting on the new version.

Actual Behavior

The tool catalog for the resumed session no longer contains browser.*, even though browser calls worked minutes earlier. The desktop UI still works and the session continues on the new server.

Server log excerpt (UTC; local time is UTC+8):

01:24:04 cli starting version=2.2.0 channel=latest
...
02:21:15 Sent HTTP response ... POST /api/rpc/experimental.browser/attach http.status=499
02:21:15 Sent HTTP response ... POST /api/rpc/experimental.browser/attach http.status=499
02:21:15 Sent HTTP response ... POST /api/rpc/experimental.browser/attach http.status=499
02:21:39 cli starting version=2.2.2 channel=latest args=["serve","--service"]

The running process list shows the desktop app restarted at 10:21:25 local time and the install directory was updated at 10:21:23.

Additional Context

  • The three 499 responses are the only browser-related errors around the update; there is no later re-attach attempt for the resumed session.
  • Tool registration appears to be negotiated when the session/agent starts; because the session was started under 2.2.0, the new client did not re-advertise the browser capability for it.
  • Workaround used: start a new session (tools return), or drive a local headless Chrome with puppeteer-core from the shell instead of the built-in browser.
  • Related symptom: the same restart also canceled a running background dev-server command with "server restarted", which is expected behavior for the restart itself.

If it helps, I can provide the full opencode.log slice around the update with paths redacted.

Activity

  1. opencodejr commented on Oct 30, 2026

    @opencodejr
    Contributor

    Thanks for the detailed report and the log excerpt!

    Before we try to reproduce this, could you check a few things? On Windows, Desktop 2.2.2 has a known bug where the built-in browser fails to load (#60369), and the browser.* tools then disappear. That error doesn't show up in the server log (opencode.log), only in the desktop log.

    1. Look in the desktop log, %APPDATA%\ai.opencode.desktop\logs\<timestamp>\main.log, for the run after the update. Does it have a scope finalizer failed entry for scope: 'browser' with SyntaxError: Identifier 'n' has already been declared? If you see any other browser errors, please paste them too.
    2. Quit the app completely and open it again, then open the old session. Do the browser.* tools come back there?
    3. In the old session, does the Browser (globe) entry still appear in the side panel's + menu, and does Ctrl+Alt+B open the browser?

    You can reply here, or edit the issue. If you edit it, please also leave a short comment saying you've updated it, so we know you're done.

    Possibly related issues, most likely first:

  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 Nov 2, 2026

    @opencodejr
    Contributor

    We haven't heard back, so I'm closing this for now. We needed the desktop main.log details, and to know whether quitting and reopening the app brings the browser.* tools back in the old session. Without them we can't tell whether this is the Windows 2.2.2 browser loading bug from #60369 or something separate. A fix for #60369 (#60430) was merged after the v2.2.2 release.

    If it still happens on a newer release, please open a new issue and link this one. Include the main.log lines from %APPDATA%\ai.opencode.desktop\logs\<timestamp>\main.log and the steps to reproduce. 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

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions