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
[Bug]: Nightly - OpenCode provider false "not installed / not on PATH" on Windows #2163
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
OpenCode provider false "not installed / not on PATH" on Windows
Summary
T3 Code Nightly reports:
OpenCode CLI (`opencode`) is not installed or not on PATH.
But OpenCode is installed and works normally from PowerShell / terminal:
opencode --version
# 1.4.11
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 opencode binary path resolves to an npm shim on Windows, which works in a terminal but does not work with direct spawn("opencode", ...).
On Windows, spawn("opencode", ..., { shell: false }) fails with ENOENT because the global npm installation provides a .cmd / .ps1 shim, not an opencode.exe directly on PATH.
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.
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:
changed the title [-][Bug]: Nightly - OpenCode is not detected in windows[/-][+][Bug]: Nightly - OpenCode provider false "not installed / not on PATH" on Windows[/+]on Apr 18, 2026
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 opencode path 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.
Activity
timm-u commentedon Apr 18, 2026
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.11curl -fsSL https://opencode.ai/install | bashWhat Works
From PowerShell:
Get-Command opencode -Allresolves to npm shims:The actual native OpenCode executable exists here:
In my case:
Reproduction Steps
curl -fsSL https://opencode.ai/install | bashExpected 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:
{ "providers": { "opencode": { "binaryPath": "C:\\Users\\<user>\\AppData\\Roaming\\npm\\node_modules\\opencode-ai\\node_modules\\opencode-windows-x64\\bin\\opencode.exe" } } }After setting that path, T3 Code reports OpenCode as ready:
{ "provider": "opencode", "enabled": true, "installed": true, "version": "1.4.11", "status": "ready", "message": "4 upstream providers connected through OpenCode." }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".const child = spawn(input.binaryPath, args, { stdio: ["ignore", "pipe", "pipe"], + shell: process.platform === "win32", env: { ...process.env, OPENCODE_CONFIG_CONTENT: JSON.stringify({}) } });Option B: Resolve
opencodeto the native OpenCode executable before spawningFor 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.timm-u commentedon Apr 18, 2026
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:
[-][Bug]: Nightly - OpenCode is not detected in windows[/-][+][Bug]: Nightly - OpenCode provider false "not installed / not on PATH" on Windows[/+]IuriGuerreiro commentedon Apr 18, 2026
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
loxoron218 commentedon Apr 18, 2026
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.
fix: opencode is not on PATH on Windows (pingdotgg#2163)
adammansfield commentedon Apr 18, 2026
@loxoron218 That seems like a separate bug because I can edit the
OpenCode binary path, and I do not see the messages:Original OpenCode (ran with the latest commit):



and the path can be editted:
and I can toggle the providers:
adammansfield commentedon Apr 20, 2026
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:But 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:I have updated my pull request #2183 to fix the narrower
opencode.cmdissue.adammansfield commentedon Apr 24, 2026
This bug with
opencode.cmdno longer just occurs in nightly, but also now in v0.0.21.