fix(desktop): install matching V2 CLI in WSL - #41807
Open
opencode-agent[bot] wants to merge 1 commit into
Open
Conversation
opencode-agent
Bot
force-pushed
the
wsl-v2-cli
branch
from
August 11, 2026 17:36
bb00786 to
64578e8
Compare
opencode-agent
Bot
force-pushed
the
wsl-v2-cli
branch
from
August 11, 2026 17:40
64578e8 to
a77c71c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The V2 beta Desktop still used the production WSL bootstrap path: it passed the Electron beta release version to
https://opencode.ai/install, discovered$HOME/.opencode/bin/opencode, and launched that V1 binary as the WSL server. The beta Desktop version and bundled V2 CLI version differ, so the install could not find a matching release.This change scopes the V2 npm behavior to the beta channel:
opencode2from WSL's Linux PATH, and installs the exact package withnpm install --global @opencode-ai/cli@<version>opencode2when its version already matches and refuses to launch a mismatched CLI$HOME/.opencode/bin/opencodediscovery, and Desktop release version matchingopencode2 v<version>is parsed correctlyThe beta flow requires npm in the WSL distro. The production curl path remains unchanged for the official channel.
Checks
bun test src/main/wsl/servers.test.ts— 16 passedbun typecheck— passeddraft-store.test.tscould not loadnode:sqlitein the Host's runtimeRequested by: @neriousy (Filip Hejmowski via Slack)