anomalyco / anomalyco/opencode

[BUG] /update offers 2.0.7 on pacman-managed install, but upgrade cannot work (method undetected; GitHub release v2.0.7 missing)

Open
#49,660 1 comment 0 reactions 1 assignee View on GitHub

@kommander is already working on this.

Since Sep 18, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

Environment

  • OS: CachyOS (Arch Linux derivative), x86_64
  • Install: distro package via pacman (pacman -S opencode, repo cachyos-extra-v3), binary at /usr/bin/opencode
  • OpenCode version: 2.0.5, channel=latest

What happens

  1. The TUI home screen shows /update to install v2.0.7; running /update opens an "Update available" dialog (Skip / Update). The update server does return 2.0.7:
    $ curl -s "https://opencode.ai/update/api/latest/cli/npm?current=2.0.5"
    {"version":"2.0.7","metadata":{"package":"@opencode/cli","github":{"ref":"refs/heads/v2",...}}}
    
  2. Pressing Update cannot succeed: Updater.method() (packages/cli/src/services/updater.ts @ v2.0.5) only detects ~/.opencode/bin (curl installs) and npm/pnpm/bun/yarn globals. A distro-package install at /usr/bin returns undefined → the upgrade aborts with "Could not detect the installation method".
  3. The prompt is not suppressed for such unmanaged installs, even though the upgrade path is guaranteed to fail.

Second inconsistency — the advertised version isn't downloadable

  • The tag v2.0.7 exists, but there is no GitHub Release object for it: GET /repos/anomalyco/opencode/releases/tags/v2.0.7 → 404. The tag web page (/releases/tag/v2.0.7) returns 200, but shows only GitHub's auto-generated source archives — no binary assets.
  • The binary URL the install script downloads → 404: releases/download/v2.0.7/opencode-linux-x64.tar.gz (the same URL for v1.18.31 → 302, exists).
  • The install script's own existence check is fooled as well: it HEADs the tag web page (200), so --method curl proceeds and then dies on the asset download with HTTP 404.
  • Only @opencode/cli@2.0.7 on npm is actually published (dist-tag latest: 2.0.7); the legacy opencode-ai package remains on 1.18.31, and GitHub Releases currently carry only the 1.x line.

Root cause: the v2 branch's publish.yml has no gh release create/upload step at all — it deploys the update service, creates the git tag, and publishes to npm only. The dev branch (1.x line) still has them (packages/opencode/script/build.ts runs gh release upload v${version} ./dist/*.zip ./dist/*.tar.gz; workflow steps at lines ~205/~505). So the update API and git tags moved to the v2 world, while the GitHub Releases delivery channel that the install script (--method curl) relies on was left behind in 1.x.

Related defect in the same path

  • updater-action.ts action() only checks sameRelease(current, latest) — there is no semver-gt guard — so any differing version (including an older one, cf. #47714) triggers an "update" notification.

Expected behavior

  • Suppress update prompts (or show "update via your package manager") when the install method is undetectable.
  • Only advertise versions whose artifacts are published to all supported upgrade channels (npm and GitHub Releases).

Not duplicates (checked): #47714, #5618, #11411, #5375, #46493, #36572.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.