fix(pi): preserve Antigravity state across turns - #7
Merged
Conversation
iceteaSA
pushed a commit
to iceteaSA/antigravity-auth
that referenced
this pull request
Jul 24, 2026
…tches P2 cortexkit#7: fetchQuotaSummary used only options.endpoints[0] for every project attempt, so a 5xx on the primary endpoint permanently lost the request. Iterate the endpoint list per project attempt so a 500 or 429 on one endpoint falls through to the next — matches the legacy fetchers' failover convention. P2 cortexkit#8: aggregateQuotaSummary derived the pool from group.buckets[0] unconditionally, silently dropping the whole group when an unrecognized bucketId led the array. Use the first RECOGNIZED bucket for pool derivation so the recognized windows are kept. P2 cortexkit#9: modelCount parsed the raw description prose and counted non-comma / non-colon tokens, so the 'Models within this group:' prefix was counted as a model. Strip the prefix before splitting. P2 cortexkit#10: the windowed summary fetch and the gemini-CLI quota fetch ran sequentially — two 10s timeouts back-to-back, ~20s per account on modal open. Run them concurrently via Promise.all.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Pi extension loses Antigravity state across multi-turn and tool-call requests:
functionCall.idvalues are replaced and then omitted from replayed calls and responseslast_execution_idfinishReason: STOP, but Pi cancels immediatelyThe missing tool IDs make Claude Opus reject the continuation after tool execution:
Fix
functionCallandfunctionResponseTrace verification
Additional captures were taken from one continued agy 1.1.5 conversation covering:
The regression fixtures reproduce the captured execution-aware step sequence, same-model thinking/text-signature replay, tool-call signature placement, cross-model sanitation and roles, and GPT STOP-then-usage ordering.
Verification
npm run buildnpm run typechecknpm test— 1,270 passed, 25 todoPR #6 changes the same Pi adapter files but does not currently include these behaviors. They should be retained if that rewrite lands first.