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
[v2 Windows] v2.0.3 times out waiting for background service after local CLI install #49034
On Windows, opencode2 from @opencode/cli v2.0.3 fails to start the managed background service and exits with:
Starting background server...
[07:36:33.937] ERROR (#1): Error: Timed out waiting for the background service to start
at <anonymous> (B:/~BUN/root/chunk-4e5snr3z.js:3:5676)
at service.ensure (B:/~BUN/root/chunk-en214e40.js:3:662)
at service.ensure (definition) (B:/~BUN/root/chunk-4e5snr3z.js:3:3933)
at cli.server-connection.resolve (B:/~BUN/root/chunk-115pyc4p.js:2780:6687)
at cli.server-connection.resolve (definition) (B:/~BUN/root/chunk-en214e40.js:2:399)
The package postinstall completes without an error and opencode2 --version reports opencode v2.0.3, but launching opencode2 itself cannot bring up/connect to the background service.
This may be related to #41746 / #41696, but this reproduces on the stable v2.0.3 release rather than an older next build.
Plugins
None required to reproduce; startup fails before the TUI opens.
OpenCode version
opencode v2.0.3
Steps to reproduce
On Windows, install @opencode/cli so it is present under node_modules/@opencode/cli.
From node_modules/@opencode/cli, run:
node .\postinstall.mjs
Confirm the installed v2 CLI:
opencode2 --version
Output:
opencode v2.0.3
Run:
opencode2
It prints Starting background server... and then times out waiting for the background service.
Since you already mention these in your report, it would be worth confirming whether your reproduction matches those issues exactly. If so, adding your details as a comment there (with the v2.0.3 version info) would help consolidate tracking.
Thanks for the report! I think this is a duplicate of #41746, the existing Windows report of opencode2 stopping at "Starting background server..." and then timing out.
Possible duplicates and related issues, ordered from most to least likely:
netsh interface ipv4 show excludedportrange protocol=tcp
If 49374 falls inside a listed range, move the service to a free port:
opencode2 service set port 40900
opencode2 service start
Look for the underlying error in %USERPROFILE%\.local\share\opencode\log\opencode.log, or upgrade to v2.0.23 or later, which should print the real error instead of the timeout.
The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different, for example if a newer version or the log shows an error other than the port conflict.
We haven't heard back since the duplicate note yesterday, so I'm closing this as a duplicate of #41746. That issue tracks the same Windows problem: opencode2 stops at "Starting background server..." and then times out.
If you still hit this, it's worth checking two things first:
Reserved ports: see whether Windows has reserved a port range that includes 49374 with netsh interface ipv4 show excludedportrange protocol=tcp. If it has, move the service to a free port with opencode2 service set port <port>.
Activity
github-actions commentedon Sep 14, 2026
This issue might be a duplicate of existing issues. Please check:
Since you already mention these in your report, it would be worth confirming whether your reproduction matches those issues exactly. If so, adding your details as a comment there (with the v2.0.3 version info) would help consolidate tracking.
opencodejr commentedon Oct 28, 2026
Thanks for the report! I think this is a duplicate of #41746, the existing Windows report of
opencode2stopping at "Starting background server..." and then timing out.Possible duplicates and related issues, ordered from most to least likely:
49374.49374is hardcoded with no fallback, so a conflict shows up only as a timeout.Things that may help in the meantime:
netsh interface ipv4 show excludedportrange protocol=tcp49374falls inside a listed range, move the service to a free port:opencode2 service set port 40900 opencode2 service start%USERPROFILE%\.local\share\opencode\log\opencode.log, or upgrade to v2.0.23 or later, which should print the real error instead of the timeout.The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different, for example if a newer version or the log shows an error other than the port conflict.
opencodejr commentedon Oct 29, 2026
We haven't heard back since the duplicate note yesterday, so I'm closing this as a duplicate of #41746. That issue tracks the same Windows problem:
opencode2stops at "Starting background server..." and then times out.If you still hit this, it's worth checking two things first:
49374withnetsh interface ipv4 show excludedportrange protocol=tcp. If it has, move the service to a free port withopencode2 service set port <port>.If a newer version or
opencode.logshows a different underlying error, please comment here or on #41746 and we can reopen. Thanks for the report!