Skip to content

[Bug]: OpenCode update flow uses npm regardless of how OpenCode was installed #2714

@barweiss45

Description

@barweiss45

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Install OpenCode via Homebrew: brew install opencode (currently 1.14.50, lagging upstream 1.15.0).
  2. Launch T3 Code 0.0.24. The OpenCode provider shows authenticated and working.
  3. An "Update Available: OpenCode v1.15.0" toast appears. Settings → Providers shows an upgrade arrow next to OpenCode v1.14.50, with a popover offering "Update now" and the manual command npm install -g opencode-ai@latest.
  4. Click Update now from either location. A "Provider update failed — Update command exited with code 1" toast appears, plus a persistent red "OpenCode v1.15.0 update failed" indicator in the bottom-left of the window.
  5. The upgrade prompt returns on next launch and after dismissal.

Ultimately, if Opencode is installed with brew, T3 is unable to update Opencode, and will repeatedly inform you that you need to update Opencode. Since the Homebrew repo is not in parity.

Expected behavior

Two options, either would work:

  1. Detect install method, dispatch accordingly — if the resolved opencode binary is under a Homebrew prefix, suggest brew upgrade opencode; if under ~/.opencode/bin, point to the opencode.ai installer; otherwise npm. The manual-command box in the popover would also need to match.
  2. Move to a compatibility-floor model — only prompt when the installed version is below a minimum T3 supports, and treat "newer available" as informational. This sidesteps the dispatch problem entirely and respects users who pin versions intentionally.

Option 2 is simpler and more forgiving of channel lag (the brew formula at 1.14.50 vs npm/installer at 1.15.0 is a current example, but this kind of skew is normal). Option 1 is more user-friendly if you want to keep the actionable upgrade button.

Actual behavior

When OpenCode is installed via Homebrew and the homebrew/core formula version lags the OpenCode upstream "latest" version (currently 1.14.50 vs 1.15.0), T3 Code:

  1. Repeatedly prompts to upgrade OpenCode even though the installed version is functional.
  2. Attempts the upgrade and fails with "Update command exited with code 1", leaving a persistent red error indicator in the bottom-left of the window.
  3. Re-prompts on the next session, producing an unresolvable loop.
Image Image

Furthermore, in the Provider menu, T3 Code provides an icon to notify you of the upgrade. If the update is clicked, there is no feedback to notify that the upgrade was or wasn't successful. Furthermore, a popover appears offering "Update now" and the manual command npm install -g opencode-ai@latest, which is not correct if Opencode was installed with brew.

Image

As validation I did run brew upgrade and validated that brew is only providing v1.14.50 at this time.

OpenCode works normally. Reporting because the Update button presents as actionable but doesn't change anything for Homebrew installs, and the failure indicator persists.

Impact

Minor bug or occasional failure

Version or commit

main@ ea20e80

Environment

macOS 26.4.1, Homebrew 5.1.11, node v24.13.1, opencode 1.14.50 (installed via homebrew)

Logs or stack traces

Screenshots, recordings, or supporting files

No response

Workaround

Either, uninstalling brew's OpenCode and reinstalling via curl | bash gets the user to 1.15.0 and silences the nag, but is not a reasonable expectation or dismissing the in-app prompt doesn't suppress future prompts and doesn't clear the bottom-left red banner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions