Skip to content

[Bug]: Google Antigravity returns 429 RESOURCE_EXHAUSTED on tool-catalog-nudge sentence #8772

Closed

Description

@shanelindsay

Client or integration

Codex CLI / Codex App (also reproduces directly against /v1/responses and directly against Cloud Code Assist)

Area

Provider adapter (src/adapters/tool-catalog-nudge.ts / google-antigravity)

Summary

All google-antigravity Gemini requests that declare tools fail with upstream HTTP 429 RESOURCE_EXHAUSTED ("Resource has been exhausted (e.g. check quota).") even when the account quota is nearly empty (~1-4% used) and agy CLI / no-tool requests succeed.

Isolated to a single sentence injected by buildNonOpenAIToolCatalogNudgeFromNames in src/adapters/tool-catalog-nudge.ts:122:

Names mentioned only in instructions, tool descriptions, argument descriptions, or nested helper APIs are not additional top-level tools.

When Cloud Code Assist receives that exact sentence in request.systemInstruction, it consistently returns HTTP 429 RESOURCE_EXHAUSTED — even with tools removed from the payload. Omitting or rewording that sentence consistently returns HTTP 200.

Version

2.100.3 (also observed on 2.100.2)

Operating system

macOS 15.7.4 (arm64) and CachyOS Linux (x86_64)

Provider and model

google-antigravity (gemini-4-hydrogen, gemini-4-carbon, gemini-4-argon, gemini-3.8-flash)

Minimal reproduction & direct Cloud Code Assist ablation

  1. Send a /v1/responses request through OpenCodex 2.100.3 with vs without a single minimal tool:
// Without tools -> HTTP 200
{
  "model": "google-antigravity/gemini-4-hydrogen",
  "input": "Reply exactly OK",
  "stream": false
}

// With one minimal tool -> HTTP 429
{
  "model": "google-antigravity/gemini-4-hydrogen",
  "input": "Reply exactly OK",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "name": "get_time",
      "description": "Get the time",
      "parameters": { "type": "object", "properties": {} }
    }
  ]
}

Observed across models on 2.100.3 (same OAuth account, g1-plus-tier, Gem 5h window <4% used):

  • google-antigravity/gemini-4-hydrogen without tools: 200 | with 1 tool: 429
  • google-antigravity/gemini-4-argon without tools: 200 | with 1 tool: 429
  • google-antigravity/gemini-3.8-flash without tools: 200 | with 1 tool: 429
  1. Inspecting the outbound CCA envelope built by createGoogleAdapter.buildRequest() directly against https://daily-cloudcode-pa.googleapis.com/v1internal:generateContent (with User-Agent: antigravity/cli/1.3.4 ...):
  • Built envelope as-is: 429
  • Built envelope with request.tools removed, keeping systemInstruction: 429
  • Built envelope with request.systemInstruction removed, keeping tools: 200
  • Keeping only the Tool contract paragraph (parts[0], 948 chars): 429
  • Keeping only the second paragraph (Output style / brevity, 871 chars): 200
  1. Sentence-by-sentence testing of the Tool contract paragraph (systemInstruction only, each sent directly to v1internal:generateContent):
  • Sentence 0 (Tool contract: use the current tool catalog as ground truth.): 200
  • Sentence 1 (Valid tool names for this turn are exactly \get_time`.): 200`
  • Sentence 2 (These listed names are the complete top-level tool-call surface for this turn.): 200
  • Sentence 3 (Call only listed names with their listed argument keys; do not invent, translate, or rename tools.): 200
  • Sentence 4 (Names mentioned only in instructions, tool descriptions, argument descriptions, or nested helper APIs are not additional top-level tools.): 429
  • Sentence 5 (If a listed tool exposes nested helpers such as a tools.* API...): 200
  • Sentence 6 (Do not use neighboring-agent tool names...): 200
  • Sentence 7 (If you need shell, file search, file read, edit, or discovery behavior...): 200
  • Sentence 8 (Count a tool call only after its tool result returns...): 200
  1. Ablations on Sentence 4:
  • Full Tool contract paragraph with Sentence 4 removed: 200
  • Shortened (Names mentioned only in instructions are not additional top-level tools.): 200
  • Changed last phrase (...are not extra tools.): 200
  • Reworded (Names that appear only in instructions, tool descriptions, argument descriptions, or nested helper APIs are not extra top-level tools.): 200 (verified 3/3 directly, and restored Codex CLI + Codex App tool-calling sessions on both hosts after patching src/adapters/tool-catalog-nudge.ts:122)

Logs or error output

Direct CCA response on the matched sentence:

{
  "error": {
    "code": 429,
    "message": "Resource has been exhausted (e.g. check quota).",
    "status": "RESOURCE_EXHAUSTED"
  }
}

OpenCodex proxy response:

{"error":{"message":"Provider error 429: Antigravity rate limit exceeded: Resource has been exhausted (e.g. check quota).","type":"rate_limit_error","code":"rate_limit_exceeded"}}

Notes

Because CCA returns RESOURCE_EXHAUSTED (HTTP 429) on a prompt string match rather than 400/403, the failure looks like quota exhaustion and passes through retry logic cleanly. It appears Google's CCA backend is matching that literal OpenCodex nudge sentence (or a close substring of it). Rewording or suppressing/shortening that line in src/adapters/tool-catalog-nudge.ts (or at least for Google/Antigravity) resolves it immediately, though upstream could add further signature checks if they are targeting the nudge text directly.

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

  1. added
    bug
    catalog
    on Nov 15, 2026
  2. iddictive commented on Nov 15, 2026

    @iddictive

    Confirm, google banned all my accounts yesterday. Right now its isn't safe to use OpenCocex

  3. ANBAL534 commented on Nov 15, 2026

    @ANBAL534

    I have the same issue when calling antigravity gemini 4 models (or 3.8 for that matter) through opencodex with tools

  4. huenchunb commented on Nov 15, 2026

    @huenchunb

    Same problem! I recommend don't use Provider for now

  5. project820 commented on Nov 16, 2026

    @project820

    Reproduced on 2.100.3 (macOS arm64, google-antigravity OAuth, one paid account, Gem 5h and weekly usage 0%). This is a single account, so treat it as one data point. Two additions to the analysis above.

    1. With the advisor enabled, even requests without client tools hit this.
    With ocx advisor enabled, OpenCodex adds the synthetic advisor tool to routed requests, so the Tool contract paragraph is still injected. With the advisor on, the provider debug wire shape for a /v1/responses request without client tools showed toolDeclarations: 1. This explains why "without tools → 200" from the report above does not hold when the advisor is on.

    Request through OpenCodex (no client tools) carbon 3.8-flash hydrogen
    advisor on 429 429 429
    advisor off 200 200 not tested

    2. Position matters. Sent directly to CCA, the same sentence inside a user turn returns 200 on gemini-4-carbon-medium. As systemInstruction it returns 429 on both gemini-3.8-flash-medium (3/3) and gemini-4-carbon-medium. The Tool contract paragraph without that sentence returns 200 on both. Including or omitting project made no difference for a minimal request.

    On 2026-11-14 this install served the same models on 2.100.2, which already contained the sentence. I did not capture whether those requests carried the Tool contract paragraph, so this suggests, but does not prove, that CCA behavior changed after that date.

    Local workaround (works on my account; not a recommendation)

    I can't tell whether this 429 is an intentional server-side block on this prompt text or a false positive. Given the suspension reports in this thread, removing the sentence could be treated as evading a block. It only clears the 429 and does nothing about suspension risk, so apply it at your own account's risk.

    Unlike the reword in tool-catalog-nudge.ts above, this strips the sentence only from CCA-bound system text in src/adapters/google.ts, next to stripAntigravityBillingHeader:

    const ANTIGRAVITY_REJECTED_TOOL_CATALOG_SENTENCE =
      "Names mentioned only in instructions, tool descriptions, argument descriptions, or nested helper APIs are not additional top-level tools.";
    
    function stripAntigravityRejectedToolCatalogSentence(systemText: string): string {
      return systemText.split(ANTIGRAVITY_REJECTED_TOOL_CATALOG_SENTENCE + " ").join("")
        .split(ANTIGRAVITY_REJECTED_TOOL_CATALOG_SENTENCE).join("");
    }
    
    // in messagesToGeminiFormat:
    let systemText = isCloudCodeAssist
      ? stripAntigravityRejectedToolCatalogSentence(stripAntigravityBillingHeader(identifiedSystemText))
      : identifiedSystemText;

    After a proxy restart, /v1/responses with one function tool returns 200 on Antigravity for gemini-4-carbon, gemini-4-hydrogen, gemini-3.8-flash and claude-sonnet-5-5. Codex Desktop subagents on carbon and hydrogen also completed a shell tool call end to end.

    The strip is gated on isCloudCodeAssist, so the code does not change other providers' requests; I did not test other providers separately. Because it matches the exact text, it stops working without warning if upstream changes the wording.

  6. Ingwannu commented on Nov 16, 2026

    @Ingwannu
    Owner

    I confirmed the reported sentence is still emitted by the shared tool-catalog builder on current dev da021e37. #8792 proposes the narrow wording replacement, retains the explicit tool-name/argument and code-mode helper constraints, and adds actual Google request-serialization coverage with and without code mode. I reviewed that complete diff and allowed its existing current-head fork CI; it is not merged or released yet.

    The added advisor observation is useful: no client-supplied tools is not the same as an empty final catalog when the advisor contributes one. The reports establish an observed request-shape correlation on those accounts; they do not establish Google's enforcement mechanism, a general quota interpretation, or that a wording change prevents an account suspension. #8752/#8760 track the separate account-level 403 handling, and #8820 is an unmerged explicit sign-in acknowledgement change. This fix must keep genuine quota/refusal handling intact. No new live model probe, account retry or automatic retry-policy change was performed here.

  7. ANBAL534 commented on Nov 16, 2026

    @ANBAL534

    Maybe #8776 would also fix this issue if merged?

  8. chenxianglong1201-beep commented on Nov 17, 2026

    @chenxianglong1201-beep

    The version is v2.100.3/v2.100.4, and the model used is gemini-3.8-flash. It keeps reporting an error "exceeded retry limit, last status: 429 Too Many Requests". How can I resolve this issue?

  9. lidge-jun commented on Nov 17, 2026

    @lidge-jun
    Owner

    Fixed by #8792, merged into dev as ec1bdf1 (2026-11-17 triage round). PRs target dev, so this is closed manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcatalog

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions