Skip to content

Bad experience installing OpenCode for Windows #5476

Closed

Description

@mmc41

Description

Lots of bugs:

  1. "curl -fsSL https://opencode.ai/install | bash" won't run in powershell (but do work in old windows command promot)
  2. "curl -fsSL https://opencode.ai/install | bash" installs opencode inside WSL - not in windows. Get "opencode" not found if run inside windows command prompt or poweshell (I had to install using npm instead to get it working in Windows)
  3. Exiting a running opencode with Ctrl-C does not work. The console app close and the user gets back ito the shell but opencode still runs and outputs strange characters into the shell.

OpenCode version

No response

Steps to reproduce

Install on windows 11 PC as outlined above.

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal

Activity

  1. github-actions commented on Dec 13, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. johnem-msft commented on Dec 13, 2025

    @johnem-msft

    EDIT DISREGARD, THE BELOW WASA FOR PS7 in WINDOWS NOT WSL

    For PowerShell, I was doing:
    winget install OpenJS.NodeJS.LTS
    npm install -g opencode-ai

    Working great on one machine - on another:
    panic(main thread): Segmentation fault at address 0x3
    oh no: Bun has crashed; This indicates a bug in Bun, not your code - after any commands

    Fixed:

    • winget remove OpenJS.NodeJS.LTS
    • install official nodejs from nodejs.org
    • npm version after that was: npm --version: 11.6.2
    • npm install -g opencode-ai

    Everything seems to be working fine on the 2nd install now.

  3. rekram1-node commented on Dec 13, 2025

    @rekram1-node
    Contributor

    I mean curl install wont work in powershell ever right? Maybe it works it you are using git bash but it isnt for powershell.

    edit: nvm

  4. rekram1-node commented on Dec 13, 2025

    @rekram1-node
    Contributor

    the windows character bug is unrelated to install and we have someone working on it

  5. self-assigned this
    on Dec 13, 2025
  6. jrgleason commented on Dec 17, 2025

    @jrgleason

    Similar experience it is especially annoying coming from Claude code where I used ctrl+c to navigate all the time. I really appreciate your work though most of it is great.

  7. rekram1-node commented on Dec 17, 2025

    @rekram1-node
    Contributor

    @jrgleason wdym by ctrl+c to navigate?

  8. johnem-msft commented on Dec 18, 2025

    @johnem-msft

    I mean curl install wont work in powershell ever right? Maybe it works it you are using git bash but it isnt for powershell.

    Curl works fine in PowerShell

    In PS 5 it's an alias for Invoke-WebRequest per
    get-alias curl
    curl -> Invoke-WebRequest

    In PS 7 curl is redesigned and works like regular curl in bash - eg:
    curl -L aka.ms/whatsmyip

    So ... for any "Windows" scenarios here it's important to understand if we are in WSL (v1/v2?) or PS5 or PS7

    $psversiontable (echo $psversiontable if you wish)

    @mmc41 it would be good if you could tell us more about your environment.

    Taking a closer look - I see you are piping to bash ... it seems like this is Linux/WSL and not particularly "Windows"?

    What do we have for?
    cat /etc/rel

    In PowerShell - what do you have for:
    wsl --version?

    Note - I installed via the method you described fine in Ubuntu22/WSL2 and it works great
    WSL version: 2.6.3.0

    Note2: Opencode works fine in PS7 w. NodeJS installed :)))

  9. rekram1-node commented on Dec 18, 2025

    @rekram1-node
    Contributor

    Oh that's good to know I'm windows ignorant, thanks!

  10. mmc41 commented on Dec 19, 2025

    @mmc41
    Author

    @johnem-msft I am using PowerShell 7.5.4 on Windows 11
    @rekram1-node Thanks for looking at this.

    I should add a general note, that I see it as critical for user adoption of any software, that
    a) That the software can be installed - I.e. The install instructions work: Failed - Some the of instructions on "https://opencode.ai/" does not work on windows, so the instructions need to be changed (perhaps be made OS dependent).
    b) That the software can start - OK! Good!
    c) That the software work reasonable well - ? (have not tried enough to be sure yet).
    d) That the software can be stopped: Failed (Ctrl-C does not work on Windows).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions