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
[v2] cli: update prompt recommends older version #47714
Launching opencode2 version v0.0.0-beta-19215 shows an update prompt recommending v0.0.0-beta-19213, which is older than the currently installed version.
$realPwsh='%LOCALAPPDATA%\Local\Microsoft\WindowsApps\pwsh.exe'$filteredArgs=foreach ($argin$args) {
if ($arg-ine'-NoProfile') {
$arg
}
}
&$realPwsh@filteredArgsexit$LASTEXITCODE
Install/channel: Beta
Active plugins: None configured; no local plugin files found
Reproduction
Install or run opencode2 v0.0.0-beta-19215.
Launch opencode2.
Observe the update notification recommending v0.0.0-beta-19213.
Expected Behavior
The update check should recognize that v0.0.0-beta-19215 is newer than v0.0.0-beta-19213 and should only recommend an update when a newer version is available.
Actual Behavior
The update prompt recommends updating from v0.0.0-beta-19215 to the older version v0.0.0-beta-19213.
Additional Context
This was observed immediately after launching opencode2.
The exact update prompt text has not yet been captured, and it is currently unclear whether the prompt appears on every launch.
Another instance of this, with a different shape: a 2.0.9 install was downgraded to 2.0.8 because the update service's answer for current=2.0.9 moved backwards.
Earlier the same day the same check reported current=2.0.9 latest=2.0.9 (action=up-to-date, 08:54:53 UTC), so the service's "latest" for latest/cli/npm changed from 2.0.9 to 2.0.8 between 08:54 and 09:21 UTC.
The update API still answers this way (checked 2026-09-19 ~09:35 UTC):
Meanwhile @opencode/cli@2.0.9 is published on npm (dist-tag latest, published 2026-09-19T05:11:15Z) and v2.0.9 is tagged in the repo. So any client on 2.0.9 is currently told that 2.0.8 is "available".
Expected
The update prompt/install should only fire when latest > current (semver-greater), so a client that is ahead of the update service can never be downgraded.
Actual
2.0.9 was downgraded to 2.0.8; OpenCode even logged it as updated OpenCode from=2.0.9 to=2.0.8. (Same missing semver-gt guard noted in #49660.)
Activity
github-actions commentedon Sep 7, 2026
This issue might be a duplicate of existing issues. Please check:
ZaraByte commentedon Sep 19, 2026
Another instance of this, with a different shape: a 2.0.9 install was downgraded to 2.0.8 because the update service's answer for
current=2.0.9moved backwards.Environment
~/.bun/bin), channellatest,local=falseEvidence
CLI log (
~/.local/share/opencode/log/opencode.log, UTC):Earlier the same day the same check reported
current=2.0.9 latest=2.0.9(action=up-to-date, 08:54:53 UTC), so the service's "latest" forlatest/cli/npmchanged from 2.0.9 to 2.0.8 between 08:54 and 09:21 UTC.The update API still answers this way (checked 2026-09-19 ~09:35 UTC):
Meanwhile
@opencode/cli@2.0.9is published on npm (dist-taglatest, published 2026-09-19T05:11:15Z) andv2.0.9is tagged in the repo. So any client on 2.0.9 is currently told that 2.0.8 is "available".Expected
The update prompt/install should only fire when
latest > current(semver-greater), so a client that is ahead of the update service can never be downgraded.Actual
2.0.9 was downgraded to 2.0.8; OpenCode even logged it as
updated OpenCode from=2.0.9 to=2.0.8. (Same missing semver-gt guard noted in #49660.)