You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Desktop v1.17.2 prompts to 'update' to older v1.17.1 (downgrade offered as upgrade) #31735
OpenCode Desktop v1.17.2 displays an update notification offering to install an older version, v1.17.1, as if it were a new release. Accepting the prompt would downgrade the application.
The update toast on the bottom-right reads:
↓ Update available
OpenCode has a new version (1.17.1) available to install.
[Install and Restart] [Later]
Meanwhile, the Settings panel (bottom-left) confirms the currently installed version is v1.17.2.
Since 1.17.1 < 1.17.2, the desktop updater is incorrectly treating an older release as newer. This suggests the version-comparison logic on the update channel is wrong (e.g. string compare instead of semver, or the update feed is pointing at a stale/rolled-back release).
Impact: Clicking "Install and Restart" silently downgrades users from 1.17.2 → 1.17.1, potentially reintroducing bugs that 1.17.2 fixed.
Launch the app and let the auto-updater run its check (or open Settings).
Observe the bottom-right update toast: "OpenCode has a new version (1.17.1) available to install."
Compare with the installed version shown in Settings (bottom-left): v1.17.2.
Expected: no update prompt, because 1.17.1 is older than 1.17.2.
Actual: a downgrade is offered as if it were an upgrade.
Screenshot
(Screenshot attached — shows Settings panel with v1.17.2 and update toast offering 1.17.1 side by side.)
Operating System
Windows (Simplified Chinese locale)
Terminal
N/A — issue is in the Desktop GUI updater, not the TUI.
Notes
Language: Simplified Chinese (简体中文)
Mode/Model at time of capture: Orchestrator + glm-5.1 (not related to the bug, but visible in the screenshot)
Likely root cause to investigate: semver comparison in the desktop auto-update path, and/or the release channel/manifest returning a stale "latest" pointer.
Pulled the desktop updater logs from %APPDATA%\ai.opencode.desktop\logs\ and %LOCALAPPDATA%\@opencode-aidesktop-updater\. The behaviour is reproducible and the root cause is unambiguous: the updater is configured with allowDowngrade: true, and at some point the release feed advertised 1.17.1 as latest even though 1.17.2 was already published. electron-updater then happily "updated" me from 1.17.2 → 1.17.1.
A full opencode-desktop-win-x64.exe (~115 MB) for v1.17.1 is already staged in ...\pending\, ready for "Install and Restart".
Smoking-gun log (main.log, filtered)
From logs\20260610T172356\main.log — the timestamps tell the whole story:
[2026-06-11 01:23:56.866] [info] app starting { version: '1.17.2', packaged: true, onboardingTest: false }
[2026-06-11 01:23:56.929] [info] auto updater configured { currentVersion: '1.17.2' ... }
[2026-06-11 01:23:56.944] [info] updater state changed { from: 'idle', to: 'checking' }
[2026-06-11 01:23:56.945] [info] Checking for update
[2026-06-11 01:23:59.049] [info] Update for version 1.17.2 is not available (latest version: 1.17.2, downgrade is allowed).
[2026-06-11 01:23:59.054] [info] updater state changed { from: 'checking', to: 'up-to-date' }
... 10 minutes later, on the scheduled re-check ...
[2026-06-11 01:33:56.933] [info] updater state changed { from: 'up-to-date', to: 'checking' }
[2026-06-11 01:33:56.933] [info] Checking for update
[2026-06-11 01:33:58.493] [info] Found version 1.17.1 (url: opencode-desktop-win-arm64.exe, opencode-desktop-win-x64.exe)
[2026-06-11 01:33:58.493] [info] updater state changed { from: 'checking', to: 'downloading' }
[2026-06-11 01:33:58.494] [info] Downloading update from opencode-desktop-win-arm64.exe, opencode-desktop-win-x64.exe
[2026-06-11 01:33:58.497] [info] Cached update sha512 checksum doesn't match the latest available update.
Cached: 0+YT9gYYYRSs+CoEWCK1Wu9rx5pTY+9BP3i37ba5eb6mvRV/vSlR4XB32Q5xE/i+0CZzp3iJOvhmW8GwoO0thA==
expected: 0wM8jbTc8qEapPeiySnosrptGEdx1eJBZSNkSnWJI1/PGkXOWBdHKQaBwOtR/rkFE181+uBrMk3VRlCNYHLr3A==
[2026-06-11 01:33:58.506] [warn] disableWebInstaller is set to false, you should set it to true if you do not plan on
using a web installer. This will default to true in a future version.
[2026-06-11 01:33:58.507] [info] Download block maps (old: ".../v1.17.2/opencode-desktop-win-x64.exe.blockmap",
new: ".../v1.17.1/opencode-desktop-win-x64.exe.blockmap")
[2026-06-11 01:34:00.088] [info] Differential download: https://github.com/anomalyco/opencode/releases/download/v1.17.1/opencode-desktop-win-x64.exe
... ~6 min of differential download ...
[2026-06-11 01:40:33.460] [info] New version 1.17.1 has been downloaded to
C:\Users\33993\AppData\Local\@opencode-aidesktop-updater\pending\opencode-desktop-win-x64.exe
[2026-06-11 01:40:33.467] [info] updater state changed { from: 'downloading', to: 'ready' }
What this shows
The first check at 01:23:59 returned 1.17.2 as latest — and even then electron-updater logged downgrade is allowed, confirming the updater is built with autoUpdater.allowDowngrade = true.
Ten minutes later, the same endpoint returned 1.17.1 as latest. Combined with allowDowngrade: true, electron-updater treated 1.17.1 < 1.17.2 as a valid update target instead of ignoring it.
The differential download URL points at github.com/anomalyco/opencode/releases/download/v1.17.1/..., so the release-channel manifest (latest.yml on the v1.17.1 release, or whatever feed the updater is pointed at) is currently advertising 1.17.1.
Suggested fix
Two layers, either of which would have prevented this:
Don't ship allowDowngrade: true in production. A downgrade should never silently masquerade as an "Update available" toast. At a minimum, gate downgrades behind explicit user opt-in and a different UI string ("Roll back to v1.17.1?") instead of "OpenCode has a new version (1.17.1) available to install."
Fix the release feed so latest.yml / the GitHub Releases "Latest" pointer never regresses below the highest published version. If 1.17.2 was intentionally pulled, also remove or unpublish its assets so old clients don't keep reporting currentVersion: 1.17.2 against a latest: 1.17.1 feed.
Activity
thdxr commentedon Jun 10, 2026
1.17.2 had bugs so we rolled it back. puhsing 1.17.13 now
Po1nt9 commentedon Jun 10, 2026
Logs — root cause confirmed
Pulled the desktop updater logs from
%APPDATA%\ai.opencode.desktop\logs\and%LOCALAPPDATA%\@opencode-aidesktop-updater\. The behaviour is reproducible and the root cause is unambiguous: the updater is configured withallowDowngrade: true, and at some point the release feed advertised 1.17.1 aslatesteven though 1.17.2 was already published. electron-updater then happily "updated" me from 1.17.2 → 1.17.1.Updater state file
%APPDATA%\ai.opencode.desktop\opencode.updater:{ "ready": { "version": "1.17.1" } }Pending download
%LOCALAPPDATA%\@opencode-aidesktop-updater\pending\update-info.json:{ "fileName": "opencode-desktop-win-x64.exe", "sha512": "0wM8jbTc8qEapPeiySnosrptGEdx1eJBZSNkSnWJI1/PGkXOWBdHKQaBwOtR/rkFE181+uBrMk3VRlCNYHLr3A==", "isAdminRightsRequired": false }A full
opencode-desktop-win-x64.exe(~115 MB) for v1.17.1 is already staged in...\pending\, ready for "Install and Restart".Smoking-gun log (main.log, filtered)
From
logs\20260610T172356\main.log— the timestamps tell the whole story:What this shows
01:23:59returned 1.17.2 as latest — and even then electron-updater loggeddowngrade is allowed, confirming the updater is built withautoUpdater.allowDowngrade = true.allowDowngrade: true, electron-updater treated1.17.1 < 1.17.2as a valid update target instead of ignoring it.github.com/anomalyco/opencode/releases/download/v1.17.1/..., so the release-channel manifest (latest.ymlon the v1.17.1 release, or whatever feed the updater is pointed at) is currently advertising 1.17.1.Suggested fix
Two layers, either of which would have prevented this:
allowDowngrade: truein production. A downgrade should never silently masquerade as an "Update available" toast. At a minimum, gate downgrades behind explicit user opt-in and a different UI string ("Roll back to v1.17.1?") instead of "OpenCode has a new version (1.17.1) available to install."latest.yml/ the GitHub Releases "Latest" pointer never regresses below the highest published version. If 1.17.2 was intentionally pulled, also remove or unpublish its assets so old clients don't keep reportingcurrentVersion: 1.17.2against alatest: 1.17.1feed.Environment
%LOCALAPPDATA%\@opencode-aidesktop-updater\logs\20260610T172356\(main.log~16 KB)Happy to attach the full
main.log/renderer.logif it helps — just say the word.