-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Description
Description
Description
On one Windows 11 machine, OpenCode CLI hangs at startup when it runs internal npm commands.
The process gets stuck while executing npm list, and after manually installing the package,
it proceeds to hang at npm config get registry.
The npm commands themselves work perfectly when executed manually.
The CLI does not crash or show an error — it hangs indefinitely.
This happens consistently on this machine, but another Windows 11 PC with a very similar setup works without any issues.
Reproduction steps
-
Windows 11
-
Node.js via fnm (tested with Node v22.22.0, npm v10.9.4)
-
Run: npx opencode-ai@latest
-
Confirm installation
-
CLI hangs during startup (window title shows
npm list)
Same behavior also occurs with:
- winget-installed
opencode.exe npm install -g opencode-ai@latest
After global install, the hang progresses to:
npm config get registry
Expected behavior
The CLI should either:
- start normally, or
- fail with a visible error message
It should not hang indefinitely during startup.
Observed behavior
- The CLI hangs silently during startup
- The window title shows
npm listornpm config get registry - No error output is shown
- The process must be terminated manually
Additional investigation results
npm listandnpm config get registryboth exit normally when run manually- The issue occurs in:
- PowerShell 5.1
- PowerShell 7.4
- cmd.exe
- Environment variables such as:
NPM_CONFIG_PROGRESS=falseFORCE_COLOR=0
did not change the behavior
- Desktop version of OpenCode works fine on the same machine
- The issue reproduces with:
- winget binary
npx- global npm install
- Another Windows 11 PC with a similar setup does not reproduce the issue
Environment
- OS: Windows 11
- Node.js: v22.22.0
- npm: v10.9.4
- Node manager: fnm
- Installation methods tested:
- winget
- npx
- npm global install
Notes
This seems related to how the CLI spawns npm processes on Windows during startup checks.
The fact that:
- npm works correctly when run manually
- desktop app works
- the issue occurs across multiple installation methods
suggests a Windows-specific child process / stdio handling issue during npm execution.
Plugins
No response
OpenCode version
1.1.48
Steps to reproduce
Steps to reproduce
- Windows 11
- Install OpenCode CLI via winget:
winget install SST.opencode
- Run
opencode
- The CLI hangs during startup (window title shows npm list)
Screenshot and/or share link
No response
Operating System
Windows 11 25H2
Terminal
Windows Terminal