t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: After an Antigravity update, other instances keep the old runtime's model list, and an update started from a disabled instance refreshes none

Open sittingmongoose opened this issue 2 weeks ago • 2 comments

Before submitting

  • [x] I searched existing issues and did not find a duplicate.
  • [x] I included enough detail to reproduce or investigate the problem.

Related, not duplicates: #29073 (closed by its reporter: the list stays stale until a session starts, and Refresh provider status rebuilds it; this report is about T3's own post-update refresh missing instances), #25465 (refreshing several Antigravity instances in one RPC).

Area

apps/server

Steps to reproduce

  1. Configure two enabled Antigravity instances (two Google accounts, oauth-personal), both on the managed runtime (no custom binary path). The disabled default antigravity instance is also present, as it is on a fresh install.
  2. Let both instances build a model list on runtime 1.3.0, so each effort level is its own model (gemini-4-argon-high, gemini-4-argon-medium, …).
  3. Update the managed runtime from one of the two instances' settings (Settings → Providers → Antigravity → Update Antigravity), here to 1.4.5 and on another machine to 1.5.8.
  4. Without starting a session, open the model picker for the other instance.
  5. Separately: call provider.install.start with the disabled default instance's id. A script that picks the first Antigravity instance from server.getConfig does this, because the disabled default instance is listed first.

Expected behavior

After a successful install or update of the managed runtime, every enabled instance that runs on it gets the new runtime's model list, whichever instance started the install.

Actual behavior

  • Only the starting instance is refreshed. The other instance reports the new version (1.5.8) but keeps the 1.3-style per-effort list, so the picker shows gemini-4-argon-high/-medium/-low as separate models instead of one model with a Thinking Level option. Models that only the new runtime offers are missing.
  • An install started on a disabled instance refreshes nothing. The update installs and activates, and no instance's list changes. The server trace shows AntigravityInstallation.install and AntigravityInstallation.activate with no AntigravityDriver.refreshModels after them.
  • The stale list persists across restarts. The cache file <T3 home>/caches/<instance>.json holds the new version with the old models.
  • Result: on the same 1.4.5 runtime, one machine showed grouped models with a Thinking Level and another showed separate per-effort models, until Refresh provider status was pressed.

Cause, at main (0b0a61a01f):

  • apps/server/src/provider/providerInstallation.ts:163-171: the post-install refresh looks up only input.instanceId, and returns early unless that instance is enabled.
  • apps/server/src/provider/AntigravityProvider.ts:317: the health check updates version but never models. That is intentional, because it must not spawn the runtime. Models change only in onSessionStarted (:398) or refreshModels.
  • On restart, providerStatusCache.ts:82 and the registry merge keep the cached models while the health check reports an unchecked Antigravity account.

Impact

Minor bug or occasional failure

Version or commit

0.1.10-nightly.20261113.4616; the same code is on main @ 0b0a61a01f.

Environment

Windows 11 desktop app and Linux x64 and macOS arm64 standalone servers. Managed runtime 1.3.0 → 1.4.5, and 1.3.0/1.4.5 → 1.5.8. Two oauth-personal instances per environment.

Logs or stack traces

# Server trace, update started with the disabled default instance id
AntigravityInstallation.install    ok
AntigravityInstallation.activate   ok
# (no AntigravityDriver.refreshModels follows)

# Linux, 1.3.0 -> 1.4.5 update started on the disabled default instance; an enabled instance's cache:
"version": "1.4.5"
"models": ["gemini-4-argon-medium", "gemini-4-argon-high", "gemini-4-argon-low",
           "gemini-3.8-flash-high", "gemini-3.8-flash-medium", "gemini-3.8-flash-low",
           "claude-opus-5-5-low", ..., "gpt-oss-120b-medium"]   # 13 per-effort entries

# Windows, update to 1.5.8 started on the first instance; the second instance's cache:
"version": "1.5.8"
"models": ["gemini-3.8-flash-high", "gemini-3.8-flash-medium", "gemini-3.8-flash-low",
           "claude-sonnet-4-6", "claude-opus-4-6-thinking", "gpt-oss-120b-medium"]
# The first instance, refreshed by the update: gemini-4-argon, gemini-4-hydrogen,
# gemini-3.8-flash, claude-opus-5-5, ... with a thought_level option per model.

Workaround

Press Refresh provider status in provider settings after every Antigravity update. It rebuilds every enabled, installed instance.

sittingmongoose avatar Nov 13 '26 06:11 sittingmongoose

I tried to reproduce this on the current build and could not.

Could not run the real app: Antigravity cannot run on the worker VMs. Reproduced at the service level instead, on origin/main 73e49aa6cd. Added two cases to apps/server/src/provider/providerInstallation.test.ts. Each registers two Antigravity instances: the one that starts the install (disabled in one case, enabled in the other) and an enabled sibling. Each calls ProviderInstallation.start for the first instance, sets the installation state to phase 'succeeded' (1.5.8), and waits for the sibling's refreshModels. On main, both cases hang until the 120s test timeout because refreshModels is never called on the sibling. With a minimal fix (loop over instances.listInstances and refresh every enabled Antigravity instance that has refreshModels), all 9 tests in the file pass in about 2s. The fix was reverted; only the tests are committed (89e67551b7).

Closing as not planned. If it still happens for you, reply with the exact steps and the version you are on and it will be looked at again.

juliusmarminge avatar Nov 13 '26 06:11 juliusmarminge

The repro tests committed in 89e67551b7 hang on main and pass with the minimal fix, as the comment above says, so the bug does reproduce.

#36035 implements that fix with tests. After a successful install it refreshes every enabled Antigravity instance on the managed runtime, whichever instance started the install. Both of those repro cases also pass on that branch.

Please reopen.

sittingmongoose avatar Nov 13 '26 06:11 sittingmongoose