gemini-cli - ✅(Solved) Fix non-interactive mode noisily emits 429 errors, even without --debug [1 pull requests, 2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#25017Fetched 2026-04-10 03:45:25
View on GitHub
Comments
2
Participants
3
Timeline
10
Reactions
0
Author
Timeline (top)
commented ×2labeled ×2closed ×1cross-referenced ×1

Error Message

$ gemini --prompt "hello world" Attempt 1 failed with status 429. Retrying with backoff... _GaxiosError: [{ "error": { "code": 429, "message": "No capacity available for model gemini-3-flash-preview on the server", "errors": [ { "message": "No capacity available for model gemini-3-flash-preview on the server", "domain": "global", "reason": "rateLimitExceeded" } ], "status": "RESOURCE_EXHAUSTED", "details": [ { "@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "MODEL_CAPACITY_EXHAUSTED", "domain": "cloudcode-pa.googleapis.com", "metadata": { "model": "gemini-3-flash-preview" } } ] } } ] at Gaxios._request (file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-Y2Y27YKT.js:8578:19) ...

Fix Action

Fixed

PR fix notes

PR #25043: fix(core): suppress verbose 429 retry errors in non-interactive mode

Description (problem / solution / changelog)

Summary

Reduce non-interactive retry noise for 429s by logging a concise retry message by default instead of dumping the full error object to stderr.

When debug mode is enabled, preserve the existing detailed retry logging so troubleshooting output is still available.

Details

This change adds a logErrorDetails option to retryWithBackoff() and uses it to control whether retry warnings include the original error object.

The main config-backed retry callers now pass config.getDebugMode(), so:

  • normal non-interactive runs get a short, readable retry line
  • debug runs still include full retry details

Regression coverage was added for both summary-only and debug-detailed retry logging, and the affected caller test fixtures were updated to include getDebugMode().

Related Issues

Closes #25017

How to Validate

  1. Run the targeted core test suite:

    cd /Users/nilptr/dev/open-source/gemini-cli/packages/core
    npx vitest run --coverage.enabled=false src/utils/retry.test.ts src/core/baseLlmClient.test.ts src/core/client.test.ts src/core/geminiChat.test.ts src/tools/web-fetch.test.ts

    Expected result: all 5 test files pass.

  2. Verify the default retry logging behavior in code/tests:

    • retry.test.ts should confirm that 429 retries log only: Attempt 1 failed with status 429. Retrying with backoff...
    • No full error object should be attached in the default case.
  3. Verify debug behavior in code/tests:

    • retry.test.ts should confirm that when logErrorDetails is enabled, the retry log still includes the original error object.
  4. Optional manual validation:

    • Trigger a non-interactive run that hits retryable 429s.
    • Expected result: stderr shows a short retry message without the verbose serialized error payload unless debug mode is enabled.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

Changed files

  • packages/core/src/core/baseLlmClient.test.ts (modified, +1/-0)
  • packages/core/src/core/baseLlmClient.ts (modified, +1/-0)
  • packages/core/src/core/client.ts (modified, +1/-0)
  • packages/core/src/core/geminiChat.ts (modified, +1/-0)
  • packages/core/src/tools/web-fetch.test.ts (modified, +1/-0)
  • packages/core/src/tools/web-fetch.ts (modified, +2/-0)
  • packages/core/src/utils/retry.test.ts (modified, +43/-0)
  • packages/core/src/utils/retry.ts (modified, +20/-10)

Code Example

$ gemini --prompt "hello world"
Attempt 1 failed with status 429. Retrying with backoff... _GaxiosError: [{
  "error": {
    "code": 429,
    "message": "No capacity available for model gemini-3-flash-preview on the server",
    "errors": [
      {
        "message": "No capacity available for model gemini-3-flash-preview on the server",
        "domain": "global",
        "reason": "rateLimitExceeded"
      }
    ],
    "status": "RESOURCE_EXHAUSTED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.ErrorInfo",
        "reason": "MODEL_CAPACITY_EXHAUSTED",
        "domain": "cloudcode-pa.googleapis.com",
        "metadata": {
          "model": "gemini-3-flash-preview"
        }
      }
    ]
  }
}
]
    at Gaxios._request (file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-Y2Y27YKT.js:8578:19)
...

---

> /about
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                                             │
About Gemini CLI│                                                                                                                                                             │
CLI Version                                           0.39.0-nightly.20260409.615e07834Git Commit                                            675bd1aa5                                                                                             │
Model                                                 Auto (Gemini 3)Sandbox                                               no sandbox                                                                                            │
OS                                                    linux                                                                                                 │
│                                                                                                                                                             │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
RAW_BUFFERClick to expand / collapse

What happened?

When using Gemini in non-interactive mode, capacity errors (429) are emitted, making it difficult to read the expected output.

E.g.,

$ gemini --prompt "hello world"
Attempt 1 failed with status 429. Retrying with backoff... _GaxiosError: [{
  "error": {
    "code": 429,
    "message": "No capacity available for model gemini-3-flash-preview on the server",
    "errors": [
      {
        "message": "No capacity available for model gemini-3-flash-preview on the server",
        "domain": "global",
        "reason": "rateLimitExceeded"
      }
    ],
    "status": "RESOURCE_EXHAUSTED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.ErrorInfo",
        "reason": "MODEL_CAPACITY_EXHAUSTED",
        "domain": "cloudcode-pa.googleapis.com",
        "metadata": {
          "model": "gemini-3-flash-preview"
        }
      }
    ]
  }
}
]
    at Gaxios._request (file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-Y2Y27YKT.js:8578:19)
...

What did you expect to happen?

I would expect (strongly prefer) that such error messages be abbreviated (to one line) or else shown only with --debug

Client information

<details> <summary>Client Information</summary>

Run gemini to enter the interactive CLI, then run the /about command.

> /about
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                                             │
│ About Gemini CLI                                                                                                                                            │
│                                                                                                                                                             │
│ CLI Version                                           0.39.0-nightly.20260409.615e07834                                                                     │
│ Git Commit                                            675bd1aa5                                                                                             │
│ Model                                                 Auto (Gemini 3)                                                                                       │
│ Sandbox                                               no sandbox                                                                                            │
│ OS                                                    linux                                                                                                 │
│                                                                                                                                                             │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
</details>

Login information

I'm logged in with my Google Account (AI Pro).

Anything else we need to know?

The output in non-interactive mode has been nicely improved over the last month or so (thank you), such that "clutter" of the above sort has been removed - this is the only "noisy" message that remains.

extent analysis

TL;DR

Run the gemini command with the --debug flag to potentially suppress or abbreviate the capacity error messages in non-interactive mode.

Guidance

  • The error message indicates a rate limit exceeded (429 status code), which may be due to the model's capacity being exhausted, so consider checking the usage limits of the Gemini model.
  • To verify if the issue is related to the model's capacity, try running the command with a different model or at a different time to see if the error persists.
  • The user expects error messages to be abbreviated or only shown with the --debug flag, so try running the command with this flag to see if it suppresses the error message.
  • Consider checking the Gemini documentation to see if there are any known issues or workarounds for this error.

Example

No code snippet is provided as it is not clearly supported by the issue.

Notes

The issue may be specific to the Gemini model or the user's account, so further investigation may be needed to determine the root cause.

Recommendation

Apply workaround: Run the command with the --debug flag to potentially suppress or abbreviate the error messages, as this may help mitigate the issue until a more permanent solution is found.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING