Repository navigation
Description
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.jsononly contains aprovidersblock)
Reproduction
- Start the desktop app on 2.2.0 and open a session in a project.
- Use browser tools successfully in that session (open a tab, take a screenshot).
- Let the app auto-update to 2.2.2 and restart.
- Resume / re-open the same session (the conversation is still live).
- 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
499responses 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-corefrom 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
opencodejr commentedon Oct 30, 2026
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.%APPDATA%\ai.opencode.desktop\logs\<timestamp>\main.log, for the run after the update. Does it have ascope finalizer failedentry forscope: 'browser'withSyntaxError: Identifier 'n' has already been declared? If you see any otherbrowsererrors, please paste them too.browser.*tools come back there?+menu, and doesCtrl+Alt+Bopen 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:
SyntaxErrorabove, so the browser stops working and the Browser entry disappears from the+menuHona commentedon Oct 30, 2026
Fixed in 2.2.3 by #60430.
The desktop main-process bundle declared
requiretwice, which broke the in-app browser and itsbrowser.*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.logfrom the logs folder.opencodejr commentedon Nov 2, 2026
We haven't heard back, so I'm closing this for now. We needed the desktop
main.logdetails, and to know whether quitting and reopening the app brings thebrowser.*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.loglines from%APPDATA%\ai.opencode.desktop\logs\<timestamp>\main.logand the steps to reproduce. Thanks again for the detailed report!