Skip to content

fix(server): Antigravity models keep their own thinking levels after a restart - #41699

Merged
juliusmarminge merged 4 commits into
mainfrom
factory/issue-41689
Nov 23, 2026
Merged

juliusmarminge merged 4 commits into
mainfrom
factory/issue-41689

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

After a server restart, the first Antigravity session rebuilt the model catalog and gave every model not yet selected in that process the active model's thinking-level options, overwriting each model's own saved levels and defaults in the provider cache and model picker. Now a model the server has not observed reports no thinking levels of its own, so the registry keeps the levels it reported when the catalog was probed.

Fixes #41689

Reproduction on main

Commit origin/main 9f11faf, Linux VM, agy 1.5.15. 1) Started T3CODE_DEV_SEED=0 GOOGLE_GEMINI_BASE_URL=<hub> vp run dev --home-dir <fresh dir> with a settings.json enabling the antigravity instance (authMethod gemini-api-key, dummy key). 2) In the web app, Settings > Providers > Antigravity > Connect, which runs the sign-in catalog probe. caches/antigravity.json then held each model's own levels: gemini-4-neon and gemini-4-hydrogen low/medium/high/xhigh; gemini-4-carbon, gemini-4-argon and gemini-3.8/3.7/3.6-flash low/medium/high; gemini-3.1-pro low/high. Each had currentValue low. 3) Stopped and restarted the dev server. The cache was unchanged. 4) Ran t3 thread start --provider antigravity --model gemini-4-neon --wait . "Reply with just the word ok.". The session started, then the hub refused the turn with a quota 429, which does not affect this bug. 5) The cache now listed gemini-4-carbon, gemini-4-argon, gemini-4-hydrogen and gemini-3.8/3.7/3.6-flash with Neon's low/medium/high/xhigh and currentValue null. Only gemini-3.1-pro, which was observed in that session's process, kept low/high. GPT-OSS is not offered through the hub, so models with fewer levels stood in for it. Regression test: branch factory/repro-41689, test "keeps each model's probed thinking levels after a restart observes only the active model" in apps/server/src/provider/AntigravityProvider.test.ts. It fails on main: carbon receives ['low','medium','high','xhigh'] instead of ['low','medium','high'].

Evidence

Linux web app, Chromium at 1440×1000 CSS pixels, dark appearance; real agy 1.5.15 in Gemini API-key mode through the test hub, separate fresh databases. On both commits: Connect to probe the catalog → restart the server without re-probing → start the first session on Neon → open the model picker and select Carbon without sending another turn. Both Neon turns received quota 429 after initialization.

Before After
Carbon incorrectly offers Extra and has no selected default Carbon retains Low/Medium/High with Low selected
d49cf0bab5 8bc867dfaf
Before recording After recording

Base overwrote Carbon, Argon, and all three Flash models with Neon's four levels and removed saved defaults from unobserved models. Head preserved every offered model's original levels and defaults. Recordings show the post-restart picker interaction; before catalog and after catalog contain real probe and post-session metadata.

Reproduction steps · Synthetic seed · Capture script · Redacted runtime logs

Not shown:

  • Models with no thinking levels, including GPT-OSS, were not offered by the available hub. The zero-level case was not shown; models with fewer levels demonstrated the reported cross-model contamination.

Tests

  • vp test run src/provider/AntigravityProvider.test.ts -t "restart observes only" on the base commit without the fix: fails as reported (carbon gets low/medium/high/xhigh)
  • vp test run src/provider/AntigravityProvider.test.ts src/provider/ProviderRegistry.test.ts (apps/server, after merging main): 2 files, 123 tests passed
  • vp test run src/provider/AntigravityProvider.test.ts src/provider/Drivers/AntigravityDriver.test.ts src/provider/ProviderRegistry.test.ts src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts (apps/server, before the merge): 4 files, 167 tests passed
  • effect-tsgo tsrs --noEmit (apps/server, after merging main): exits 0
  • vp run check:changed: format, lint, knip, graphql and tests pass

Not in this change

  • A model never probed and never selected now shows no thinking levels until it is probed or selected, instead of borrowing the active model's.
  • A model observed in-process with no thinking options still does not clear levels cached earlier, because mergeProviderModels treats empty capabilities as unknown.

Who did the work

  • Written by Claude Opus 5.5, in Claude Code
  • Reviewed by GPT-6.1 Sol, in Codex, and by Claude Opus 5.5, each on its own
  • Proof captured by GPT-6.1 Sol and checked by Claude Opus 5.5

Run by the t3code factory in T3 Code.

juliusmarminge and others added 2 commits November 23, 2026 21:55
…restart

Reproduces #41689: after a restart the provider has observed only the
session's model, so every other model inherits that model's thinking
levels and the registry merge overwrites the probed ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a restart

An Antigravity model the server had not seen selected was given the
active model's thinking levels, and the registry merge let that copy
overwrite the levels the model reported when the catalog was probed.
An unobserved model now reports no levels, so the cached ones stay.

Fixes #41689

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 23, 2026
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ The exact PR base did not have a successful artifact. Baseline uses the latest successful main measurement shown below.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 21.5 KiB 21.5 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 1 1 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Other scenarios

All 64 scenario measurements match main.

All 64 scenario measurements
Provider Scenario Metric Main baseline This PR Impact PR ceiling
Codex short turn resume WebSocket decoded 10.5 KiB 10.5 KiB 0 B (0.0%) 12.7 KiB ✅
Codex short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn running, cold open HTTP decoded 281.7 KiB 281.7 KiB 0 B (0.0%) 302.7 KiB ✅
Codex long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Codex long turn running, history page HTTP decoded 92.4 KiB 92.4 KiB 0 B (0.0%) 107.4 KiB ✅
Codex long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Codex long turn finished, cold open HTTP decoded 381.5 KiB 381.5 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, socket cold open WebSocket decoded 381.6 KiB 381.6 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, work page HTTP decoded 186.2 KiB 186.2 KiB 0 B (0.0%) 200.2 KiB ✅
Codex long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Codex idle thread resume WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell snapshot HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Codex fleet shell subscribe WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Codex fleet shell resume check rows 0 0 0 0 ✅
Codex stale shell reload HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex stale shell reload rows 27 27 0 (0.0%) 27 ✅
Codex stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Codex stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex stale todo list cold open HTTP decoded 72.4 KiB 72.4 KiB 0 B (0.0%) 83.0 KiB ✅
Codex stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Codex stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅
Claude short turn resume WebSocket decoded 10.6 KiB 10.6 KiB 0 B (0.0%) 12.7 KiB ✅
Claude short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn running, cold open HTTP decoded 283.3 KiB 283.3 KiB 0 B (0.0%) 302.7 KiB ✅
Claude long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Claude long turn running, history page HTTP decoded 93.4 KiB 93.4 KiB 0 B (0.0%) 107.4 KiB ✅
Claude long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Claude long turn finished, cold open HTTP decoded 384.2 KiB 384.2 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, socket cold open WebSocket decoded 384.3 KiB 384.3 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, work page HTTP decoded 188.1 KiB 188.1 KiB 0 B (0.0%) 200.2 KiB ✅
Claude long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Claude idle thread resume WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell snapshot HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Claude fleet shell subscribe WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Claude fleet shell resume check rows 0 0 0 0 ✅
Claude stale shell reload HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude stale shell reload rows 27 27 0 (0.0%) 27 ✅
Claude stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Claude stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude stale todo list cold open HTTP decoded 73.4 KiB 73.4 KiB 0 B (0.0%) 83.0 KiB ✅
Claude stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Claude stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅

Baseline: 7872c23 · PR result: 8bc867d · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Antigravity model construction now reports each model’s observed thinking-level capabilities. Models with unknown configurations report no capabilities. Tests verify per-model reporting and confirm that snapshot merging preserves previously probed options after restart.

Changes: Antigravity thinking-level metadata

Layer / File(s) Summary
Report observed thinking-level capabilities
apps/server/src/provider/AntigravityProvider.ts, apps/server/src/provider/AntigravityProvider.test.ts
Model construction uses each model’s observed thinking configuration. Models with unknown configurations report no capabilities. Tests verify per-model options and retained metadata after merging snapshots.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Possibly related issues

Possibly related PRs

  • pingdotgg/t3code#39398 — This PR addresses the same restart behavior and overlaps in how unobserved models’ capabilities are merged.

Suggested labels: bugfix

Suggested reviewers: t3dotgg, mkantenko, macroscopeapp

Merge Risk: Minimal · up to 7f1db

After a server restart, Antigravity models keep their own previously probed thinking-level options instead of inheriting the active model's. The change is small and covered by a regression test, and no merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: Antigravity models keep their own thinking levels after a server restart. It matches the summary (unobserved models keep probed levels instead of inheriting the active…
Linked Issues check Passed Directly linked issue [#41689] requires that Antigravity models keep their previously probed thinking-level capabilities after a server restart, and that a model without levels of its own not display …
Out of Scope Changes check Passed The PR changes are described as limited to thinking-level handling in apps/server/src/provider/AntigravityProvider.ts (thinkingCapabilities, the observed-config selection in `buildAntigravityModelsF…
Description check Passed The description states the problem (after a server restart, the first Antigravity session gives unobserved models the active model's thinking-level options, overwriting their saved levels and defaults…
Full details: Title check

Explanation

The title names the main change: Antigravity models keep their own thinking levels after a server restart. It matches the summary (unobserved models keep probed levels instead of inheriting the active model's levels) and follows the conventional commit form. Its length (78 characters) is acceptable.

Full details: Linked Issues check

Explanation

Directly linked issue [#41689] requires that Antigravity models keep their previously probed thinking-level capabilities after a server restart, and that a model without levels of its own not display the active model's effort options. At the reviewed head, thinkingCapabilities(config) in apps/server/src/provider/AntigravityProvider.ts returns the observed select descriptor as reported. It no longer receives the active model's configuration or strips currentValue. In buildAntigravityModelsFromSession, the active model uses its own observed config. Any other model uses thinkingLevels.get(value). A model with no entry receives EMPTY_MODEL_CAPABILITIES, which mergeProviderModels treats as unknown, so the registry keeps the cached levels. This addresses the copying behavior described in the issue. The PR description reports a regression test, keeps each model's probed thinking levels after a restart observes only the active model, which fails on the base commit and passes with the fix. I did not read the test file. The PR summary also reports the restart-merge test in AntigravityProvider.test.ts. Two gaps remain, and the PR states both. A model never probed or selected shows no levels. An in-process observation with empty capabilities does not clear older cached levels. The issue's expected behavior is retention of previously probed levels, so neither gap is a stated acceptance criterion. Limitation: the whole-PR diff could not be read because changed blobs are absent from the checkout. This verdict rests on the reviewed head source and the PR description, not on a base-to-head diff.

Full details: Out of Scope Changes check

Explanation

The PR changes are described as limited to thinking-level handling in apps/server/src/provider/AntigravityProvider.ts (thinkingCapabilities, the observed-config selection in buildAntigravityModelsFromSession, and a comment) and to the regression tests in AntigravityProvider.test.ts. The reviewed head source for thinkingCapabilities and buildAntigravityModelsFromSession matches that description. The PR does not report changes to other files or behavior. The changes implement the objective in [#41689]. The PR description also lists the test runs, which cover related Antigravity driver, registry, and adapter test files; these support the same behavior. Limitation: the whole-PR diff could not be read, so no file-by-file base comparison was possible. The verdict relies on the PR summary and the head source.

Full details: Description check

Explanation

The description states the problem (after a server restart, the first Antigravity session gives unobserved models the active model's thinking-level options, overwriting their saved levels and defaults), the change (unobserved models with no own levels keep the levels from the catalog probe), a linked issue (#41689), a reproduction on main, before/after evidence, and test results. It follows the template's Problem, Change, Scope, and Verification sections. The Scope section is covered by the linked issue and a bug-fix framing. Verification is detailed with specific test commands and counts. The author lists the agent that did the work at the end, as the template requests. Minor gaps: the title is not shown in the provided text, and the evidence section is heavy, but the description is complete enough to pass.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 1e4b04e and 7f1db95.

Files selected for processing: 1

  • apps/server/src/provider/AntigravityProvider.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juliusmarminge
juliusmarminge merged commit de6315a into main Nov 23, 2026
38 checks passed
@juliusmarminge
juliusmarminge deleted the factory/issue-41689 branch November 23, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Antigravity loses per-model thinking-level metadata after server restart and copies the active model's effort options onto unrelated models

1 participant