Before submitting
Area
apps/server
Steps to reproduce
- Enable the OpenCode provider with Server URL empty so T3 Code owns the local server.
- Open a thread and send a prompt so T3 Code spawns its
opencode serve helper. Leave that helper running.
- When the update toast appears, click Update now.
opencode upgrade runs, exits 0, and replaces the binary on disk.
- T3 Code shows
Provider still needs an update / OpenCode still appears outdated even though the CLI on disk is now the latest version.
Expected behavior
After the update command exits 0, T3 Code should verify the newly installed version and show the success state. For a local OpenCode server that T3 Code owns, it should restart or invalidate that helper before re-reading the version, or fall back to the version from the opencode --version probe it just ran.
Actual behavior
The post-update verification reads the version from the already-running opencode serve child instead of the updated CLI. opencode upgrade replaces the binary but the running process keeps the old code in memory, so /global/health keeps returning the old version. The advisory stays behind_latest, the update state becomes unchanged, and the client renders Provider still needs an update.
Relevant code on main:
apps/server/src/provider/Layers/OpenCodeProvider.ts probes opencode --version, then overwrites that result with the server handle's version at line 535: version = inventoryExit.value.version;
- The local server handle comes from
OpenCodeServerOwner.withServer(...), which reuses any live server and only restarts it after OPENCODE_SERVER_IDLE_TTL = "30 seconds" (apps/server/src/provider/OpenCodeServerOwner.ts).
apps/server/src/provider/providerMaintenanceRunner.ts computes stillOutdated from that refreshed snapshot and records status: "unchanged" at line 416, which produces the toast.
Timeline from my machine (local time, 2026-09-21, OpenCode 1.18.31 to 1.18.32, native install, no npm):
- 22:16:30 the update starts.
opencode upgrade exits 0 after about 15 s and the binary on disk becomes 1.18.32.
- 22:16:45.667 the provider probe records
version = 1.18.31 in ~/.t3/caches/opencode.json, even though opencode --version reports 1.18.32 at the same moment.
- 22:16:49.99 the update finishes as
unchanged.
- 22:17:39 and 22:18:26 new
opencode serve children start. Both report 1.18.32 on /global/health, so the reported state self-corrects once the helper is replaced.
Trace: ProviderMaintenanceRunner.runCommandAndVerify, traceId b345808a7791d2cd9d02b630872e0cbc.
Note: this is the same visible symptom as #5629 and #3550 (Codex) and #8280 (Claude Code), but a different root cause. The binary install path is detected correctly here, the upgrade succeeds, and the CLI probe returns the new version. Only the server version used for verification is stale.
Impact
Minor bug or occasional failure
Version or commit
T3 Code 0.0.42 (client APP_VERSION from the running bundle)
Environment
Windows host with a WSL2 (Ubuntu) environment. OpenCode provider enabled with the default local server (Server URL empty). OpenCode upgraded from 1.18.31 to 1.18.32 via opencode upgrade, native install at ~/.opencode/bin/opencode.
Logs or stack traces
# Snapshot written by the failed verification (~/.t3/caches/opencode.json)
{
"version": "1.18.31",
"checkedAt": "2026-09-22T05:16:45.667Z",
"versionAdvisory": {
"status": "behind_latest",
"currentVersion": "1.18.31",
"latestVersion": "1.18.32",
"updateCommand": "~/.local/bin/opencode upgrade",
"canUpdate": true
}
}
# CLI after the update
$ opencode --version
1.18.32
# T3 Code owned servers after the helper was replaced
$ curl -s http://127.0.0.1:<port>/global/health
{"healthy":true,"version":"1.18.32"}
Span timeline (server.trace.ndjson):
22:16:30 ProviderMaintenanceRunner.updateProvider started
22:16:45 ProviderMaintenanceRunner.collectCommandResult finished (exit 0, 14.9 s)
22:16:45 checkOpenCodeProviderStatus started, recorded version 1.18.31
22:16:50 setProviderMaintenanceActionState status=unchanged
Screenshots, recordings, or supporting files
Toast text: Provider still needs an update / OpenCode still appears outdated. Check provider settings for details. with a Settings button.
Workaround
Refresh provider status after the local helper has been idle for about 30 seconds (it restarts from the new binary), or restart T3 Code. The update itself is already applied.
Before submitting
Area
apps/server
Steps to reproduce
opencode servehelper. Leave that helper running.opencode upgraderuns, exits 0, and replaces the binary on disk.Provider still needs an update/OpenCode still appears outdatedeven though the CLI on disk is now the latest version.Expected behavior
After the update command exits 0, T3 Code should verify the newly installed version and show the success state. For a local OpenCode server that T3 Code owns, it should restart or invalidate that helper before re-reading the version, or fall back to the version from the
opencode --versionprobe it just ran.Actual behavior
The post-update verification reads the version from the already-running
opencode servechild instead of the updated CLI.opencode upgradereplaces the binary but the running process keeps the old code in memory, so/global/healthkeeps returning the old version. The advisory staysbehind_latest, the update state becomesunchanged, and the client rendersProvider still needs an update.Relevant code on main:
apps/server/src/provider/Layers/OpenCodeProvider.tsprobesopencode --version, then overwrites that result with the server handle's version at line 535:version = inventoryExit.value.version;OpenCodeServerOwner.withServer(...), which reuses any live server and only restarts it afterOPENCODE_SERVER_IDLE_TTL = "30 seconds"(apps/server/src/provider/OpenCodeServerOwner.ts).apps/server/src/provider/providerMaintenanceRunner.tscomputesstillOutdatedfrom that refreshed snapshot and recordsstatus: "unchanged"at line 416, which produces the toast.Timeline from my machine (local time, 2026-09-21, OpenCode 1.18.31 to 1.18.32, native install, no npm):
opencode upgradeexits 0 after about 15 s and the binary on disk becomes 1.18.32.version = 1.18.31in~/.t3/caches/opencode.json, even thoughopencode --versionreports 1.18.32 at the same moment.unchanged.opencode servechildren start. Both report 1.18.32 on/global/health, so the reported state self-corrects once the helper is replaced.Trace:
ProviderMaintenanceRunner.runCommandAndVerify, traceIdb345808a7791d2cd9d02b630872e0cbc.Note: this is the same visible symptom as #5629 and #3550 (Codex) and #8280 (Claude Code), but a different root cause. The binary install path is detected correctly here, the upgrade succeeds, and the CLI probe returns the new version. Only the server version used for verification is stale.
Impact
Minor bug or occasional failure
Version or commit
T3 Code 0.0.42 (client
APP_VERSIONfrom the running bundle)Environment
Windows host with a WSL2 (Ubuntu) environment. OpenCode provider enabled with the default local server (Server URL empty). OpenCode upgraded from 1.18.31 to 1.18.32 via
opencode upgrade, native install at~/.opencode/bin/opencode.Logs or stack traces
Screenshots, recordings, or supporting files
Toast text:
Provider still needs an update/OpenCode still appears outdated. Check provider settings for details.with a Settings button.Workaround
Refresh provider status after the local helper has been idle for about 30 seconds (it restarts from the new binary), or restart T3 Code. The update itself is already applied.