Add Antigravity agy CLI fallback#1313
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 10, 2026, 8:15 AM ET / 12:15 UTC. Summary Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Review detailsBest possible solution: Retry the Codex review after fixing the execution failure. Do we have a high-confidence way to reproduce the issue? Unclear. The review failed before ClawSweeper could establish a reproduction path. Is this the best way to solve the issue? Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction. AGENTS.md: unclear because the file could not be read completely. Codex review notes: reasoning high; reviewed against 1246ec6fc3f7. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
d248976 to
170a179
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
291fc5a to
238a140
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
238a140 to
00d9534
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
00d9534 to
7d76cbf
Compare
|
Rebased onto latest Verification after rebase:
PR is no longer in a dirty/conflicted state ( |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Pushed e33706d implementing Option B for the selected-account routing concern. In @clawsweeper re-review |
e33706d to
8aa1200
Compare
|
Rebased cleanly onto latest @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Closing in favor of a replacement PR. This PR introduced three flakiness bugs that cause Antigravity bar items to flicker:
The replacement PR takes a different approach: scope the local probe to IDE-only processes, add a Thanks for the thorough review — the account-mismatch concern was valid and the replacement PR preserves selected-account OAuth routing by keeping CLI out of the strategy pipeline. |
|
Reopening — closing this was a mistake on my part. The three issues I cited in the close comment are real, but they are fixable in-place, not reasons to abandon the This PR's last ClawSweeper verdict was |
In auto mode the local desktop and agy CLI probes report whichever account is signed into the local session, which can differ from a selected token account. Validate ambient snapshots against the selected account's identity and fall through to the account-scoped OAuth fetch on mismatch. Explicit cli/oauth source modes stay authoritative.
8aa1200 to
8f8da7b
Compare
|
Correction to my reopen comment above: I referenced "warm Pushed
Verification:
CHANGELOG left untouched per the release-flow convention. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…dd serve last-good cache Fixes three flakiness sources in the Antigravity pipeline and codexbar serve: 1. Desktop-local probe attached to any Antigravity process, including the agy CLI language server owned by AntigravityCLIHTTPSFetchStrategy. A stale/initializing agy accepts the connection but fails GetUserStatus, burning the probe timeout before the CLI strategy's readiness loop runs. Add AntigravityStatusProbe.ProcessScope and scope the local strategy to .ideOnly; it now only handles the running-desktop case and otherwise fails over to the CLI strategy. isRunning() keeps .ideAndCLI for status. 2. codexbar serve reset the warm agy session after every refresh because shouldResetSessionAfterFetch keyed only on runtime == .cli, which serve shares with one-shot CLI usage. Every 60s poll cold-started agy and raced its readiness deadline, timing out. Add ProviderFetchContext.persistsCLISessions (set true by serve via UsageCommandContext.persistCLISessions); shouldResetSessionAfterFetch now keeps the warm session for long-lived hosts and resets only for one-shot CLI. The 180s session idle window covers the 60s refresh. 3. serve discarded the last good payload on transient failures. CLIServeResponseCache now records the last good response per key and serves it for failed refreshes, bounded by serveStaleTTL (ten refresh intervals, five-minute floor; disabled when --refresh-interval 0). Tests: probe ideOnly scope (2), serve last-good fallback + TTL bounds (2), session reset honors persistsCLISessions (extended).
8f8da7b to
34064ab
Compare
|
Force-pushed Third fix:
|
|
🦞🧹 I asked ClawSweeper to review this item again. |
Summary
agyCLI HTTPS fallback when the desktop app is closedCHANGELOG.mduntouched for the release flowRationale
Antigravity desktop exposes a local
GetUserStatusAPI while the desktop app is running.agyexposes the same local HTTPS status API without launching the full desktop app, so CodexBar can use it as the closed-desktop local fallback.In observed live Antigravity OAuth responses, CodexBar received Gemini-oriented account/quota data and did not receive the Claude model quota lanes returned by the local Antigravity/
agyGetUserStatusendpoint. The remote OAuth parser can still parse Claude quotas if Google returns them, so this PR does not assume OAuth can never provide Claude models. The practical reason for the fallback is that theagylocal path returned the full tested quota shape: Claude + Gemini per-model lanes, used percentages, and reset timestamps while the desktop app was closed.Verification
swift test --filter AntigravityCLISessionTestsswift test --filter AntigravityCLIHTTPSFetchStrategyTestsmake checkswift testCodexBarCLI usage --provider antigravity --source autonow returnssource: "cli"with the normal Google account config presentRuntime proof: closed-desktop
agyfallbackLocal bundle built and launched from this branch with
./Scripts/compile_and_run.sh.Desktop Antigravity/language server was not running:
Auto mode with a normal config that includes an Antigravity Google OAuth account now still follows the source-mode pipeline and falls through to
agybefore OAuth:This reproduces the intended user-visible fix: OAuth had reported
source: "oauth",primary: null, and Gemini lanes at 100% left for the same account/config; theagylocal path reports the depleted Claude and Gemini quota lanes.