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
opencode provider: unhelpful ENOENT when the opencode CLI is not on PATH #1503
Follow-up from #856. The attach path was removed in #1445, but createOpencodeServer() in packages/ai/providers/opencode-sdk.ts (~:93-98) has no try/catch around the spawn: when the opencode CLI is missing, the raw uv_spawn ENOENT propagates through ensureServer()'s rethrow with no PATH probe and no actionable hint. Wrap the spawn and surface a clear message ('opencode CLI not found on PATH - install it or disable the opencode provider'), ~10 lines. Reported shape: Windows, Ask AI with the opencode provider selected.
The problem is in createOpencodeServer() within opencode-sdk.ts. The function does not handle the case where the opencode CLI is missing from the PATH. I would first add a try/catch block around the spawn call. This would allow us to catch the ENOENT error and provide a clearer message to the user. I will ensure the message suggests installing the CLI or disabling the provider. This should improve the user experience on Windows when the CLI is not found.
Activity
modelpath-dev commentedon Sep 11, 2026
I will take this issue. Please assign it to me.
The problem is in
createOpencodeServer()withinopencode-sdk.ts. The function does not handle the case where the opencode CLI is missing from the PATH. I would first add a try/catch block around thespawncall. This would allow us to catch the ENOENT error and provide a clearer message to the user. I will ensure the message suggests installing the CLI or disabling the provider. This should improve the user experience on Windows when the CLI is not found.fix(ai): show friendly error when opencode CLI is unavailable (#1669)