# fix\(opencode\): leave configured server updates to their owner · PR \#23859 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/23859)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: open

Source repository: Unavailable fork

Source branch: fix/opencode-configured-server-updates

Target branch: main

Head commit: bf64a3ae354c3513ceeb384d5a78f6e88ed9043a

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/23859)

[Commits](https://git.cafe/pingdotgg/t3code/pull/23859/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/23859/diffs?format=markdown)

## Description

---

## Problem

Fixes #22869. With OpenCode's **Server URL** configured, T3 checks the running server's version but offers an update for the local **Binary path**. These can be different installations. In the reported Windows/Nightly case, the npm CLI was already 2.1.3 while a desktop-bundled server still ran 2.0.32; repeating the CLI update could not update that server.

## Change

Configured servers now use the existing manual-only maintenance capability. T3 still checks the running server against the appropriate 1.x or 2.x package, keeps the outdated advisory visible on refresh, and explains how to update/restart the installation that hosts the server. The advisory clears when the server actually reports the new version.

An empty or whitespace-only Server URL retains T3-managed local CLI updates. No server is restarted automatically, and no extra CLI probe or shared contract/client changes are needed.

Tradeoffs: configured loopback servers require manual updates even when they happen to use the same local CLI installation. If both managed and manual OpenCode instances are behind latest, the existing shared sidebar update shortcut becomes unavailable; the managed instance's own Settings Update button still works.

### Relationship to #22839

This is an alternative to the open #22839, not an independent bug. Credit to that PR for identifying the installed-CLI/running-server distinction. Its approach verifies the local CLI update, but a current CLI can hide an outdated server, and its successful restart message is discarded by the web success presentation. Those gaps were confirmed against its pinned head `4538f006`: 33 existing tests passed, two version-mismatch characterization cases passed, and an added notification regression failed.

This change fixes the update target itself. A loopback URL also does not prove local installation ownership: it can point to a desktop bundle or a forwarded remote server. It therefore does not treat the local CLI version as evidence that the configured server is current. No code from #22839 is included.

## Scope and approval

Submitted under the focused obvious-bug exception: the offered action updates an installation that T3 cannot establish as the configured provider. The fix stays in OpenCode's existing driver/maintenance boundary, reuses manual-update support, and preserves automatic updates where T3 starts the local server. This is one underlying problem, with focused tests and the corresponding user-guide clarification. No maintainer approval is claimed.

## Verification

- Added driver regressions for both loopback and remote Server URLs. On base `ef924413`, both failed because maintenance returned a local `opencode upgrade` action. After the fix, both pass.
- Tests check manual update/targeted-install capabilities, no local CLI probe, a persistent server-version advisory over repeated refreshes, and clearing that advisory after the server changes from 2.0.32 to 2.1.3.
- A positive control confirms an empty/whitespace Server URL still offers the native CLI upgrade; existing npm 1.x/2.x maintenance tests remain green.
- `vp test run packages/provider-opencode/src/server/driver.test.ts`: 7 passed.
- `vp run check:changed`: passed format, lint, knip, typecheck of all five affected packages, and the focused tests.
- Claude Fable 5.1 completed an independent adversarial review of ownership, update entry points, refresh behavior, contribution scope, and overlap with #22839. Its missing-latest-version finding was reproduced with a failing assertion, fixed, and included in the final checks.

These are isolated driver/service tests with a temporary local installation and replayed server responses. The original Windows incident and supported service-restart workaround are documented in [the sanitized issue comment](https://github.com/pingdotgg/t3code/issues/22869#issuecomment-6350620334). Checks ran in Linux/WSL; Windows test execution, the patched desktop UI, and a live server upgrade were not exercised; the installed application and active state were left untouched. No raw logs or identifying local paths are attached.

Implemented and tested by GPT-6 Astra through Codex in T3 Code; adversarial review by Claude Fable 5.1 through the Claude Agent harness.

