Description
What happened
The desktop app showed "OpenCode v2.2.5 update failed". The installed OpenCode was 2.2.2. Running opencode upgrade by hand failed too, with EUNKNOWN: unknown error, uv_spawn. Neither message says what is wrong.
Diagnosis
- Smart App Control was On (VerifiedAndReputablePolicyState = 1). The Windows Code Integrity log (event 3077) shows it blocked the unsigned Vite+ shims in %LOCALAPPDATA%\vite-plus\bin. They failed the signing-level requirement.
- The update failed at 12:16:14 local time. At the same second, Code Integrity logged "T3 Code (Beta).exe" trying to load vite-plus\bin\vp.exe and being blocked.
- OpenCode is installed through Vite+, so the updater picks
vpwith ["i", "-g", "@opencode/cli"] (packages/provider-core/src/server/maintenanceResolver.ts:486). The runner then calls resolveSpawnCommand and spawn (apps/server/src/provider/providerMaintenanceRunner.ts:99-110). - Windows reports the policy block to Node as
spawn UNKNOWN(libuv UNKNOWN/EUNKNOWN). recordFailedUpdate stores only that, so nothing tells the user a policy blocked the launch. - All Vite+ shims in bin are the same 13,312-byte unsigned file with the same SHA-256. The policy allowed some (opencode.exe, npm.exe) and blocked others (node.exe, bun.exe, pnpm.exe, vp.exe). I could not determine why.
- OpenCode itself was healthy: 2.2.2, authenticated, 38 models.
Suggested improvements:
- Detect a Code Integrity or policy block on spawn failure, and say so in the update-failed message instead of a bare
spawn UNKNOWN. - When
vpcannot launch, fall back tonpm(npm install -g @opencode/cli@latest) or the provider's own upgrade command.
Steps to reproduce
- On Windows 11 with Smart App Control On, install OpenCode through Vite+. The shims in %LOCALAPPDATA%\vite-plus\bin are unsigned.
- Run T3 Code Desktop 0.1.6 with the OpenCode provider enabled and a newer OpenCode release available.
- Trigger the provider update. It fails with "update failed", and the trace shows
Error: spawn UNKNOWN. - Optional: confirm the block in Event Viewer under Microsoft-Windows-CodeIntegrity/Operational (event 3077).
Only observed on one machine; not tried on a second one.
Version
T3 Code Desktop 0.1.6 (the bug happened on this build, on Windows)
Environment
Windows 11 Home 10.0.26300 x64, Node v24.22.1 (system) and Node 26.12.0 managed by Vite+, npm 11.20.0, OpenCode 2.2.2 -> 2.2.5, Vite+ split layout
Evidence
ProviderMaintenanceRunner.runCommandAndVerify exit: Failure
Error: spawn UNKNOWN
at ChildProcess.spawn (node:internal/child_process:487:11)
at ProviderMaintenanceRunner.collectCommandResult
at ProviderMaintenanceRunner.runProviderUpdate
-> recordFailedUpdate (12:16:14 and 12:16:25 local)
CodeIntegrity/Operational, event 3077, 12:16:14:
"Code Integrity determined that a process (...\T3 Code (Beta).exe) attempted to
load ...\vite-plus\bin\vp.exe that did not meet the Enterprise signing level
requirements or violated code integrity policy"
opencode upgrade:
Error: EUNKNOWN: unknown error, uv_spawn
(CI event 3077: opencode.exe blocked from loading vite-plus\bin\pnpm.exe)Related issues
#21686 (closed): Group Policy blocked an unsigned binary under .t3. #8396 (closed): spawn UNKNOWN for the Claude CLI on Windows. This one is a different cause and code path (the provider update runner).
Fix applied or workaround
The user turned Smart App Control off and reinstalled with npm install -g --allow-scripts=@opencode/cli @opencode/cli@latest. They answered Y to Vite+'s "Create a link in /.vite-plus/bin/" prompt. The link landed in %LOCALAPPDATA%\vite-plus\bin, and /.vite-plus) than the one actually used, which may be worth fixing in Vite+.opencode --version then printed v2.2.5. The prompt text names a different folder (
Filed by
Claude (claude-sonnet-5-5) via t3 triage
Activity