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
Desktop 1.18.4 + WSL2 Ubuntu: shows 'OpenCode not installed' after install; version check fails #38309
OpenCode Desktop 1.18.4 detects the Ubuntu WSL distro but shows "OpenCode not installed" even though OpenCode 1.18.4 is installed and working via the CLI in WSL.
Clicking "Install OpenCode" in the Desktop app appears to succeed, but immediately fails with:
OpenCode update finished but Ubuntu still reports no version; expected 1.18.4
This means the Desktop app cannot detect or verify the OpenCode installation inside the WSL distro, rendering the Desktop launcher unusable for WSL users.
Direct invocation via wsl (mimicking how the Desktop app calls into the distro) also works:
$ wsl -d Ubuntu -- opencode --version
1.18.4
The binary is callable without any shell initialization. The Desktop app's version check is failing despite the installation being correct and reachable through the same WSL invocation path the Desktop app uses.
Screenshot and/or share link
The Desktop dialog shows:
Ubuntu detected as the distro
"OpenCode not installed" status
After clicking "Install OpenCode": OpenCode update finished but Ubuntu still reports no version; expected 1.18.4
I encountered the same issue and found that the root cause is the installation path.
The OpenCode Desktop app expects the binary to be located at:
text
~/.local/bin/opencode
When installed via npm install --global opencode-ai, the binary is placed in a different location (e.g., /usr/local/bin/opencode), which the Desktop app does not recognize — even though it works fine from the CLI.
Solution: Manually install OpenCode to the expected path.
bash
Download the Linux binary for your architecture from:
mkdir -p ~/.local/bin
tar -xzf opencode-linux-x64.tar.gz
mv opencode ~/.local/bin/
chmod +x ~/.local/bin/opencode
After placing the binary at ~/.local/bin/opencode, restart WSL (wsl --shutdown) and reopen the Desktop app. The version check should now pass.
I also tested the exact WSL command mentioned in the Desktop error:
wsl.exe--list --online
It succeeds with exit code 0 and completes in approximately 0.65 seconds.
Unfortunately, this did not resolve the issue. OpenCode Desktop still shows Ubuntu as OpenCode not installed, and refreshing produces:
Error invoking remote method "wsl-servers-refresh-distros":
Error: wsl --list --online timed out after 20000ms
Since the same command completes almost instantly when run manually, this appears to be related to how OpenCode Desktop invokes WSL, rather than the WSL or OpenCode installation itself.
Is there any additional logging I can enable, or a way to inspect the environment and command used by the Desktop process? I would appreciate further help debugging this.
The Desktop check does not resolve opencode from the distro PATH. resolveWslOpencode() currently only accepts this fixed location:
$HOME/.opencode/bin/opencode
See packages/desktop/src/main/wsl/runtime.ts around resolveWslOpencode. The later sidecar PATH filtering retains /etc/profiles/per-user/..., and the PATH-installed executable still runs after that filtering, so PATH resolution should also support Nix/Home Manager and global npm installations without relying on shell startup files.
This is separate from #44508, which only fixes the earlier distro execution probe.
Activity
qinyinglun commentedon Jul 22, 2026
@joshua-lehmann
Manual OpenCode Installation on WSL
https://github.com/anomalyco/opencode/releases/download/v1.18.4/opencode-linux-x64.tar.gz
I encountered the same issue and found that the root cause is the installation path.
The OpenCode Desktop app expects the binary to be located at:
text
~/.local/bin/opencode
When installed via npm install --global opencode-ai, the binary is placed in a different location (e.g., /usr/local/bin/opencode), which the Desktop app does not recognize — even though it works fine from the CLI.
Solution: Manually install OpenCode to the expected path.
bash
Download the Linux binary for your architecture from:
https://github.com/anomalyco/opencode/releases
cd /tmp
curl -LO https://github.com/anomalyco/opencode/releases/download/v1.18.4/opencode-linux-x64.tar.gz
Extract and install to ~/.local/bin/
mkdir -p ~/.local/bin
tar -xzf opencode-linux-x64.tar.gz
mv opencode ~/.local/bin/
chmod +x ~/.local/bin/opencode
After placing the binary at ~/.local/bin/opencode, restart WSL (wsl --shutdown) and reopen the Desktop app. The version check should now pass.
This worked for me — hope it helps!
joshua-lehmann commentedon Jul 23, 2026
@qinyinglun @Hona
Thanks for the suggestion. I followed the steps and verified the setup directly from PowerShell.
Ubuntu is installed as WSL 2:
OpenCode is installed inside Ubuntu and works correctly from a login shell:
I also tested the exact WSL command mentioned in the Desktop error:
It succeeds with exit code
0and completes in approximately0.65 seconds.Unfortunately, this did not resolve the issue. OpenCode Desktop still shows Ubuntu as OpenCode not installed, and refreshing produces:
Since the same command completes almost instantly when run manually, this appears to be related to how OpenCode Desktop invokes WSL, rather than the WSL or OpenCode installation itself.
Is there any additional logging I can enable, or a way to inspect the environment and command used by the Desktop process? I would appreciate further help debugging this.
zjm54321 commentedon Aug 23, 2026
I reproduced the same detection failure on NixOS WSL with Desktop 1.18.21.
opencodeis installed declaratively through Home Manager and is directly available to WSL commands:The Desktop check does not resolve
opencodefrom the distro PATH.resolveWslOpencode()currently only accepts this fixed location:See
packages/desktop/src/main/wsl/runtime.tsaroundresolveWslOpencode. The later sidecar PATH filtering retains/etc/profiles/per-user/..., and the PATH-installed executable still runs after that filtering, so PATH resolution should also support Nix/Home Manager and global npm installations without relying on shell startup files.This is separate from #44508, which only fixes the earlier distro execution probe.
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊