[Bug]: Nightly - OpenCode provider false "not installed / not on PATH" on Windows #2163
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
Not sure
Steps to reproduce#
- Have OpenCode installed
- Open t3Code
- t3Code doesnt detect Opencode
Both cmd and powershell open, opencode with the "opencode" command, Also tried to add the binary PATH just now, but doesnt work either, but the version is found for some reason both with the binary path and without it... I installed OpenCode with NPM if it helps
Expected behavior#
T3Code should detect Opencode
Actual behavior#
Opencode is not detected by T3Code
Impact#
Blocks work completely
Version or commit#
v0.0.21-nightly.20260417.5
Environment#
windows11 25h2
Logs or stack traces#
Didnt find any info about opencode in the logs
Screenshots, recordings, or supporting files#
IuriGuerreiro(GitHub profile, opens in a new tab) added labelsbug
IuriGuerreiro(GitHub profile, opens in a new tab) added labelsneeds-triage
Just for info - my commented findings / fix works. I have opencode working on my local T3 code build. Should anyone want to quickly get it working locally:
IuriGuerreiro(GitHub profile, opens in a new tab) changed the title
Thank you for the workarround, I changed the title for a better description of the problem, I was trying to figure it out the problem, but didn't had time to do it
This issue appears to also affect the Arch Linux build from the AUR (t3code-nightly-bin v0.0.21-nightly).
For me, I can't add the
opencodepath on the settings page (/usr/bin/opencode), as the text fields can't be edited at all. I wonder if the "Checking provider status - Waiting for the server to report installation and authentication details." messages on all providers, which I don't have installed on my system, have anything to do with it.Moreover, I can't toggle any provider on/off on the settings page.
@loxoron218 That seems like a separate bug because I can edit the
OpenCode binary path, and I do not see the messages:"Checking provider status - Waiting for the server to report installation and authentication details."
Original OpenCode (ran with the latest commit):
and the path can be editted:
and I can toggle the providers:
This bug has been partially fixed in v0.0.21-nightly.20260420.77 if the opencode installation is an
opencode.exe. For example if installed using bun:bun add -g opencode-ai where.exe opencode # C:\Users\adam\.bun\bin\opencode.exeBut it is still broken as of v0.0.21-nightly.20260420.77 if the opencode installation is an
opencode.cmd. For example if installed using npm:npm i -g opencode-ai where.exe opencode # C:\Program Files\nodejs\opencode # C:\Program Files\nodejs\opencode.cmdI have updated my pull request #2183 to fix the narrower
opencode.cmdissue.This bug with
opencode.cmdno longer just occurs in nightly, but also now in v0.0.21.juliusmarminge closed this
Sign in to join this conversation.
OpenCode provider false "not installed / not on PATH" on Windows#
Summary#
T3 Code Nightly reports:
But OpenCode is installed and works normally from PowerShell / terminal:
This looks like a Windows-specific process spawning issue. T3 Code's OpenCode version check works through a shell, but the OpenCode server startup uses direct no-shell spawning. The default
opencodebinary path resolves to an npm shim on Windows, which works in a terminal but does not work with directspawn("opencode", ...).Environment#
0.0.21-nightly.20260417.589df3c640210fT3 Code (Nightly)1.4.11What Works#
From PowerShell:
Get-Command opencode -Allresolves to npm shims:The actual native OpenCode executable exists here:
In my case:
Reproduction Steps#
Expected Behavior#
T3 Code should detect and launch OpenCode successfully when
opencodeworks in the user's terminal and is on PATH.Actual Behavior#
T3 Code reports OpenCode as not installed / not on PATH.
Root Cause#
The packaged app appears to use inconsistent Windows process launch behavior for OpenCode.
The version check uses shell mode on Windows:
But server startup does not:
On Windows,
spawn("opencode", ..., { shell: false })fails withENOENTbecause the global npm installation provides a.cmd/.ps1shim, not anopencode.exedirectly on PATH.Local Verification#
I reproduced the behavior with Node:
Directly spawning the native OpenCode binary works:
This successfully started the server:
User Workaround#
Set T3 Code's OpenCode binary path to the native executable instead of
opencode:For example, in:
Add:
After setting that path, T3 Code reports OpenCode as ready:
Suggested Fix#
Option A: Use shell mode for OpenCode server startup on Windows#
This is the smallest behavior-consistent fix, since
runOpenCodeCommand()already usesshell: process.platform === "win32".Option B: Resolve
opencodeto the native OpenCode executable before spawning#For npm installs, the native binary is usually under one of these paths:
This avoids shell usage but requires package-specific resolution logic.
Option C: Add shared Windows CLI spawning logic#
If the configured binary resolves to
.cmd/.bat, invoke it through shell mode; otherwise use direct spawn.Pseudo-code:
Note: this still does not cover the default
binaryPath: "opencode"unless command lookup first resolves the shim path.Why This Matters#
The UI tells users OpenCode is not installed even when it is installed correctly and works from the terminal. The provider can be made fully functional by pointing T3 Code at the underlying
opencode.exe, so this appears to be a Windows process spawning / npm shim resolution issue rather than an OpenCode installation problem.