GeezerVison is showing github.com — fix(server): Antigravity quota failures keep the 'Resets in' reset time by juliusmarminge · Pull Request #42339 · pingdotgg/t3code
Conversation
When Antigravity stopped a turn with a quota error whose reset time appeared only in the message ('Resets in 4m42s.'), T3 Code saved the usage-limit failure without a reset time. The thread then showed 'Reset time unavailable' and was never resumed or snoozed automatically. The failure now takes its reset time from that duration when the error has no structured reset fields.
Fixes #42325
Reproduction on main
Commit ddaba13 (origin/main). Ran the server from a fresh worktree with T3CODE_DEV_SEED=0, a fresh --base-dir, GOOGLE_GEMINI_BASE_URL pointed at a local fake endpoint, and the Antigravity instance set to the 'Gemini API key' sign-in method with a dummy key. The endpoint answers every streamGenerateContent with HTTP 429 and {error:{code:429,status:RESOURCE_EXHAUSTED,message:'Individual quota reached. Please upgrade your subscription to increase your limits. Resets in 4m42s.',details:[ErrorInfo reason QUOTA_EXHAUSTED]}}, with no quotaResetDelay, quotaResetTimeStamp or RetryInfo. Ran t3 thread start --provider antigravity --model gemini-4-neon --wait --json . 'Say hi'. The real agy 1.5.16 called the fake endpoint and wrote step_type 17 'Error 429, Message: Individual quota reached. ... Resets in 4m42s., Status: RESOURCE_EXHAUSTED, Details: [...]'. The run ended failed and the saved failure was {class:'usage_limit', message:'You have reached your Antigravity quota for this period.', code:'RESOURCE_EXHAUSTED', retryable:true}, with no resetAt, so usage-limit auto-resume and snooze have nothing to schedule. Also added a failing assertion in apps/server/src/provider/acp/AntigravityTurnOutcome.test.ts: a 1.5 'RESOURCE_EXHAUSTED (code 429): ... Resets in 4m42s.' error step should give resetAt 1970-01-01T00:04:42.000Z. vp test run src/provider/acp/AntigravityTurnOutcome.test.ts fails on main with no resetAt property. Not reproduced: the reporter's secondary point about a background_task run masking the failure (see #40229).
Evidence
Run the real server and agy 1.5.16 on Linux with separate fresh databases, Gemini API key mode, and the same synthetic HTTP 429 endpoint returning Resets in 4m42s. without structured reset metadata. Start a Gemini 4 Neon thread with Say hi, then inspect the saved terminal failure.
Reproduction driver — accepts base checkout, head checkout, and output directory as arguments.
Not shown:
- Web rendering of reset availability and the auto-resume/snooze interactions were not exercised; this proof captures the real provider-to-persisted-failure path.
- The secondary background_task failure-masking report was not exercised; it is outside this fix's reproduction.
Tests
vp test run src/provider/acp/AntigravityTurnOutcome.test.ts (apps/server): 2 passed; the 'Resets in 4m42s.' assertion failed before the fix
vp run check:changed: fmt, lint, knip, graphql, typecheck and tests all passed
- PR CI on 435c7fa: all 8 required checks passed
Not in this change
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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Repro for #42325: fails on main because resetAtFrom ignores 'Resets in <duration>.'
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Antigravity 1.5 can state a quota reset only as 'Resets in <Go duration>.'
in the error message, which resetAtFrom did not read, so the usage_limit
failure had no resetAt. Fall back to that duration after quotaResetDelay
and retryDelay.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Thread transfer impact
✅ Thread transfer remains within every enforced ceiling.
| 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: ece5f21 · PR result: 435c7fa · 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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 24, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
resetAtFrom now recognizes Antigravity’s Resets in <duration> message as a fallback after existing reset-delay formats. The change includes a quota-error fixture and an assertion for the resulting reset time.
Changes: Antigravity reset duration
| Layer / File(s) |
Summary |
Parse and verify reset durations apps/server/src/provider/acp/AntigravityTurnOutcome.ts, apps/server/src/provider/acp/AntigravityTurnOutcome.test.ts |
resetAtFrom checks Resets in <duration> after RESET_DELAY and RETRY_DELAY; timestamp handling remains unchanged. The test checks that a 4m42s quota error produces a usage_limit failure with reset time 1970-01-01T00:04:42.000Z. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Possibly related PRs
Suggested reviewers: shivamhwp, macroscopeapp
Merge Risk: Minimal · up to 435c7
-
This change lets Antigravity quota errors that report a reset duration only in the message produce a reset time, so usage-limit recovery can schedule auto-resume or snoozing. The change is small, and a test covers it. No merge-blocking risk remains.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title names the fix (Antigravity quota failures keep the 'Resets in' reset time), which matches the changeset. It adds a fallback that parses the 'Resets in ' message into resetAt, and t… |
| Linked Issues check |
 |
[#42325] Requirement: a quota error whose text contains 'Resets in .' must set failure.resetAt to now plus that duration. The head file apps/server/src/provider/acp/AntigravityTurnOutcome.ts… |
| Out of Scope Changes check |
 |
The change set, per the summary and the head source, touches only AntigravityTurnOutcome.ts (+4/-1, adding RESETS_IN, its GO_DURATION helpers, and the fallback in resetAtFrom) and AntigravityTurnOutco… |
| Description check |
 |
The description explains the problem (a quota error whose reset time appears only in the message, so the usage-limit failure saves with no reset time and never auto-resumes or snoozes), the change (de… |
Full details: Title check
-
Explanation
The title names the fix (Antigravity quota failures keep the 'Resets in' reset time), which matches the changeset. It adds a fallback that parses the 'Resets in <duration>' message into resetAt, and the title says the same. It uses the conventional commit form and is specific. No fault found.
Full details: Linked Issues check
-
Explanation
[#42325] Requirement: a quota error whose text contains 'Resets in <duration>.' must set failure.resetAt to now plus that duration. The head file apps/server/src/provider/acp/AntigravityTurnOutcome.ts adds RESETS_IN, matching \bResets in ((?:\d+(?:\.\d+)?(?:ns|us|µs|μs|ms|h|m|s))+)(?!\w|\.\d). resetAtFrom() uses it as a fallback after quotaResetTimeStamp, quotaResetDelay, and retryDelay. It sums Go duration parts and returns now plus the sum when the sum is positive. For '4m42s' the sum is 282000 ms, which gives 1970-01-01T00:04:42.000Z when now is the epoch. The existing timestamp and delay precedence is unchanged. The regex covers the issue's examples ('4m42s', '1h2m', '30s'). The test file adds a fixture and an assertion for the 1.5 'Resets in 4m42s.' case. The author reports that the new test fails on main and passes at head. I could not read the test diff or run the test, so that part rests on the author's report and the raw summary. The reviewed source shows the behavior the issue requests.
Full details: Out of Scope Changes check
-
Explanation
The change set, per the summary and the head source, touches only AntigravityTurnOutcome.ts (+4/-1, adding RESETS_IN, its GO_DURATION helpers, and the fallback in resetAtFrom) and AntigravityTurnOutcome.test.ts (+14/-0). Each change serves the issue #42325 objective. The PR states that the #40229 background_task masking observation is not reproduced and not changed. The PR also states that open PRs #39196 and #40244 are unchanged. No unrelated file or behavior change appears in the evidence. The diff tool was unavailable, so the file list rests on the supplied summary. The head source shows no other logic change relevant to this scope.
Full details: Description check
-
Explanation
The description explains the problem (a quota error whose reset time appears only in the message, so the usage-limit failure saves with no reset time and never auto-resumes or snoozes), the change (derive resetAt from the 'Resets in <duration>' text when structured reset fields are absent), and the scope (links the bug issue #42325). The Verification section gives the focused test command, the before/after failure, the commit references, and a runtime reproduction with transcripts. It also states what was not checked: the web rendering and auto-resume/snooze interactions, and the background_task masking report. The template's required sections are all present and substantively filled in. The description has some extra material, such as the authorship attribution and the long reproduction setup, but this does not make it incomplete.
Finishing Touches
-
Generate unit tests (beta)
-
- 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 ece5f21 and 435c7fa.
Files selected for processing: 2
-
apps/server/src/provider/acp/AntigravityTurnOutcome.test.ts
apps/server/src/provider/acp/AntigravityTurnOutcome.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:XS
0-9 changed lines (additions + deletions).
vouch:trusted
Author is trusted by repo permissions or the VOUCHED list.
Milestone
No milestone
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.
|