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
installer: /install silently downgrades existing v2 CLI to v1 #54084
The legacy https://opencode.ai/install script silently replaces an existing OpenCode v2 CLI with v1 in the same ~/.opencode/bin/opencode path. On Linux x64, it printed Installed version: opencode v2.0.26. followed by Installing opencode version: 1.18.35. After installation, opencode --version returned 1.18.35.
The v2 installation guide correctly uses https://opencode.ai/v2/install, but a user following the older install command can unintentionally downgrade a working v2 installation. The legacy script resolves GitHub's v1 releases/latest and overwrites the binary without a major-version check. Please prevent the silent replacement, or require explicit confirmation and point v2 users to /v2/install.
Plugins
A local v2 plugin was installed; plugin choice does not affect the installer.
OpenCode version
2.0.26 before running the legacy installer; 1.18.35 afterward.
Steps to reproduce
Install OpenCode v2.0.26 with curl -fsSL https://opencode.ai/v2/install | bash.
curl -fsSL https://opencode.ai/install | bash → prints Installed version: opencode v2.0.26. then Installing opencode version: 1.18.35, with no prompt or warning
opencode --version now reports 1.18.35 at the same ~/.opencode/bin/opencode path
The legacy script only checks whether the installed version is exactly the one it's about to install. It takes that version from the latest GitHub release, which is currently v1, so it overwrites a newer v2 install. The script below reproduces it in a throwaway $HOME.
The latest v2 branch (ee0e614) also has a related problem: README.md and the docs pages (index.mdx, windows-wsl.mdx) still show https://opencode.ai/install instead of /v2/install, so following them leads to the same downgrade. Related: #52609 (point the v2 readme to the v2 installs).
Until this is addressed, re-running curl -fsSL https://opencode.ai/v2/install | bash restores v2.
Reproduction script (repro.sh)
#!/usr/bin/env bash# Reproduces anomalyco/opencode#54084: the legacy https://opencode.ai/install# script replaces an existing v2 CLI with v1 without any warning.# Runs in a throwaway HOME so the real installation is untouched.set -euo pipefail
export HOME=$(mktemp -d)export SHELL=/bin/bash
export PATH="$HOME/.opencode/bin:/usr/bin:/bin"cd"$HOME"echo"== 1. install v2 via /v2/install"
curl -fsSL https://opencode.ai/v2/install | bash -s -- --no-modify-path
echo"which: $(command -v opencode)"echo"version: $(opencode --version)"echoecho"== 2. run legacy /install"
curl -fsSL https://opencode.ai/install | bash -s -- --no-modify-path
echoecho"== 3. after legacy installer"echo"which: $(command -v opencode)"echo"version: $(opencode --version)"
I interrupted it at approximately 6%, before it could replace v2. Subsequent opencode --version checks still reported v2.0.32.
Expected: Detect that the installed binary belongs to a newer major release and refuse the downgrade (or request explicit confirmation and link to https://opencode.ai/v2/install).
Actual: The legacy installer identifies the installed v2 version but starts installing v1.19.3 without a major-version warning.
This provides an ARM64 reproduction of the cross-major installer issue already documented above on Linux x64. It is particularly disruptive for integrations that now require v2, such as T3 Code. Thanks for looking into it!
The READMEs now point at the V2 installer and V2 package-manager installs (#56839).
https://opencode.ai/install is the legacy OpenCode 1 installer, so running it installs V1 and replaces an existing V2 binary. That's expected. The V1 docs at opencode.ai/docs document V1, so their install instructions use that V1 installer. If you want to stay on V2, follow the V2 docs instead, or use the V2 installer:
curl -fsSL https://opencode.ai/v2/install | bash
Once installed, opencode upgrade keeps you on V2. Other V2 install methods are listed in the V2 docs.
Activity
opencode-agent commentedon Oct 9, 2026
Thanks for the clear report, I could reproduce this on Linux x64 in a clean home directory:
curl -fsSL https://opencode.ai/v2/install | bash→opencode --versionreportsopencode v2.0.26curl -fsSL https://opencode.ai/install | bash→ printsInstalled version: opencode v2.0.26.thenInstalling opencode version: 1.18.35, with no prompt or warningopencode --versionnow reports1.18.35at the same~/.opencode/bin/opencodepathThe legacy script only checks whether the installed version is exactly the one it's about to install. It takes that version from the latest GitHub release, which is currently v1, so it overwrites a newer v2 install. The script below reproduces it in a throwaway
$HOME.The latest
v2branch (ee0e614) also has a related problem:README.mdand the docs pages (index.mdx,windows-wsl.mdx) still showhttps://opencode.ai/installinstead of/v2/install, so following them leads to the same downgrade. Related: #52609 (point the v2 readme to the v2 installs).Until this is addressed, re-running
curl -fsSL https://opencode.ai/v2/install | bashrestores v2.Reproduction script (repro.sh)
Run it:
bash repro.shfeat(runtime): installPlan() and install() run the vendor's own insta…
intrepid37 commentedon Oct 18, 2026
Confirming this also affects Ubuntu 24.04 LTS on ARM64 (aarch64), observed on October 18, 2026.
I had OpenCode v2.0.32 installed and working with T3 Code (which requires OpenCode >=2.0.18). Running the legacy installer:
curl -fsSL https://opencode.ai/install | bashproduced:
I interrupted it at approximately 6%, before it could replace v2. Subsequent
opencode --versionchecks still reportedv2.0.32.Expected: Detect that the installed binary belongs to a newer major release and refuse the downgrade (or request explicit confirmation and link to
https://opencode.ai/v2/install).Actual: The legacy installer identifies the installed v2 version but starts installing v1.19.3 without a major-version warning.
This provides an ARM64 reproduction of the cross-major installer issue already documented above on Linux x64. It is particularly disruptive for integrations that now require v2, such as T3 Code. Thanks for looking into it!
rekram1-node commentedon Oct 18, 2026
The READMEs now point at the V2 installer and V2 package-manager installs (#56839).
https://opencode.ai/installis the legacy OpenCode 1 installer, so running it installs V1 and replaces an existing V2 binary. That's expected. The V1 docs at opencode.ai/docs document V1, so their install instructions use that V1 installer. If you want to stay on V2, follow the V2 docs instead, or use the V2 installer:curl -fsSL https://opencode.ai/v2/install | bashOnce installed,
opencode upgradekeeps you on V2. Other V2 install methods are listed in the V2 docs.