[BUG] OpenCode installs to WSL on Windows #8014

Open
opened 2026-02-16 18:08:55 -05:00 by yindo · 1 comment
Owner

Originally created by @judahx67 on GitHub (Jan 30, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

OpenCode would install to WSL on Windows if WSL is enabled.

Installation methods tried:
- curl -fsSL https://opencode.ai/install | bash
- npm install -g opencode-ai
I have yet to try using chocolatey due to permission on this machine.

Workaround:

I was able to install it correctly by using a terminal with a native Unix emulation layer (MinGW64/Git Bash) to run the curl command, then manually adding the binary to my system PATH.

Environment
OS: Windows 10/11
WSL Status: Enabled
Shell: PowerShell / CMD

Plugins

No response

OpenCode version

1.1.43

Steps to reproduce

  1. Enable WSL feature on Windows and install one of the distros.
  2. Run curl -fsSL https://opencode.ai/install | bash
  3. Installation script should notify that the command is added to a Unix path and using opencode in the terminall will not work (both powershell and cmd)
  4. Verify by going into wsl and do opencode

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal

Originally created by @judahx67 on GitHub (Jan 30, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description **OpenCode would install to WSL on Windows if WSL is enabled.** Installation methods tried: - curl -fsSL https://opencode.ai/install | bash - npm install -g opencode-ai I have yet to try using chocolatey due to permission on this machine. ### Workaround: I was able to install it correctly by using a terminal with a native Unix emulation layer (MinGW64/Git Bash) to run the curl command, then manually adding the binary to my system PATH. Environment OS: Windows 10/11 WSL Status: Enabled Shell: PowerShell / CMD ### Plugins _No response_ ### OpenCode version 1.1.43 ### Steps to reproduce 1. Enable WSL feature on Windows and install one of the distros. 2. Run ` curl -fsSL https://opencode.ai/install | bash ` 3. Installation script should notify that the command is added to a Unix path and using `opencode` in the terminall will not work (both powershell and cmd) 4. Verify by going into wsl and do `opencode` ### Screenshot and/or share link _No response_ ### Operating System Windows 11 ### Terminal Windows Terminal
yindo added the windowsbug labels 2026-02-16 18:08:55 -05:00
Author
Owner

@AaronFeledy commented on GitHub (Feb 4, 2026):

It is recommended that you run opencode in WSL. You are running the WSL install command which is why it is installing in WSL. Try installing it with npm or one of the other installation methods if you REALLY want to run it in windows. https://opencode.ai/docs/#windows

@AaronFeledy commented on GitHub (Feb 4, 2026): It is recommended that you run opencode in WSL. You are running the WSL install command which is why it is installing in WSL. Try installing it with `npm` or one of the other installation methods if you REALLY want to run it in windows. https://opencode.ai/docs/#windows
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8014