gemini-cli - 💡(How to fix) Fix Active session UI is poisoned, falsely displaying "Limit reached" for global quota, while new sessions show healthy limits and manual model selection still works [1 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#26103Fetched 2026-04-29 06:36:01
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
labeled ×1

Error Message

  1. In the active, heavy-load session (Session A), the agent stopped working. Checking the quota via /model or /stats model inside this session incorrectly displayed a fatal error:
  2. State Isolation: A localized error (like a temporary 429 rate limit or router failure) within an active session should not poison the output of global commands like /model or /stats model. These commands should always fetch and display the true Server-Side Truth, regardless of the session's internal router state. Before Session A locked up, it processed a massive context with a very high error rate on the Flash model fallback:
  • gemini-3.1-pro-preview: 61 Requests / 1 Error (1.6%) It appears the high error rate caused the local session to permanently cache a Quota Exhausted flag. This dirty flag not only bricked the Auto router but also intercepted and mocked the UI output for the global /model check within that terminal instance.

Fix Action

Fix / Workaround

Sequence of Facts:

  1. In the active, heavy-load session (Session A), the agent stopped working. Checking the quota via /model or /stats model inside this session incorrectly displayed a fatal error: Limit reached, resets in... Usage limit: 200. Usage limits span all sessions and reset daily.

  2. I opened a completely new, separate session (Session B) and ran /model manage. This new session correctly fetched the real global quota from the server, proving the limits were actually healthy: Pro: 37% used Flash: 21% used

  3. The Workaround & Contradiction: Returning to the "broken" Session A, despite its own /model UI screaming that the global quota was exhausted, I was able to bypass the block by switching from Auto (Gemini 3) to 3. Manual and explicitly selecting a model. The generation successfully continued using the existing context.

  4. State Isolation: A localized error (like a temporary 429 rate limit or router failure) within an active session should not poison the output of global commands like /model or /stats model. These commands should always fetch and display the true Server-Side Truth, regardless of the session's internal router state.

  5. Stateless Auto Router: If the backend API accepts requests (as proven by the manual workaround), the Auto router should not be permanently locked in a "Limit reached" state.

Code Example

> /about
# paste output here
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                                                                                                  │
About Gemini CLI│                                                                                                                                                                                                                  │
CLI Version                                                              0.39.1Git Commit                                                               4d73f3413                                                                                                                               │
Model                                                                    Auto (Gemini 3)Sandbox                                                                  no sandbox                                                                                                                              │
OS                                                                       linux                                                                                                                                   │
Auth Method                                                              Signed in with Google (*@gmail.com)Tier                                                                     Gemini Code Assist in Google One AI ProIDE Client                                                               VS Code│                                                                                                                                                                                                                  │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯


OS info:
WSL ver: 2.6.3.0
Core ver: 6.6.87.2-1
WSLg ver: 1.0.71
MSRDC ver: 1.2.6353
Direct3D ver: 1.611.1-81528511
DXCore ver: 10.0.26100.1-240331-1435.ge-release
Windows ver: 10.0.26200.8246
RAW_BUFFERClick to expand / collapse

What happened?

During a heavy code refactoring session, the CLI's state became corrupted, falsely locking the Auto (Gemini 3) router and displaying incorrect global quota information within that specific session.

Sequence of Facts:

  1. In the active, heavy-load session (Session A), the agent stopped working. Checking the quota via /model or /stats model inside this session incorrectly displayed a fatal error: Limit reached, resets in... Usage limit: 200. Usage limits span all sessions and reset daily.
  2. I opened a completely new, separate session (Session B) and ran /model manage. This new session correctly fetched the real global quota from the server, proving the limits were actually healthy: Pro: 37% used Flash: 21% used
  3. The Workaround & Contradiction: Returning to the "broken" Session A, despite its own /model UI screaming that the global quota was exhausted, I was able to bypass the block by switching from Auto (Gemini 3) to 3. Manual and explicitly selecting a model. The generation successfully continued using the existing context.

What did you expect to happen?

  1. State Isolation: A localized error (like a temporary 429 rate limit or router failure) within an active session should not poison the output of global commands like /model or /stats model. These commands should always fetch and display the true Server-Side Truth, regardless of the session's internal router state.
  2. Stateless Auto Router: If the backend API accepts requests (as proven by the manual workaround), the Auto router should not be permanently locked in a "Limit reached" state.

Client information

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

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

> /about
# paste output here
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                                                                                                  │
│ About Gemini CLI                                                                                                                                                                                                 │
│                                                                                                                                                                                                                  │
│ CLI Version                                                              0.39.1                                                                                                                                  │
│ Git Commit                                                               4d73f3413                                                                                                                               │
│ Model                                                                    Auto (Gemini 3)                                                                                                                         │
│ Sandbox                                                                  no sandbox                                                                                                                              │
│ OS                                                                       linux                                                                                                                                   │
│ Auth Method                                                              Signed in with Google (*@gmail.com)                                                                                                     │
│ Tier                                                                     Gemini Code Assist in Google One AI Pro                                                                                                 │
│ IDE Client                                                               VS Code                                                                                                                                 │
│                                                                                                                                                                                                                  │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯


OS info:
WSL ver: 2.6.3.0
Core ver: 6.6.87.2-1
WSLg ver: 1.0.71
MSRDC ver: 1.2.6353
Direct3D ver: 1.611.1-81528511
DXCore ver: 10.0.26100.1-240331-1435.ge-release
Windows ver: 10.0.26200.8246
</details>

Login information

Signed in with Google Account (OAuth) Tier: Gemini Code Assist in Google One AI Pro

Anything else we need to know?

Before Session A locked up, it processed a massive context with a very high error rate on the Flash model fallback:

  • Session Tokens: ~88.2M
  • gemini-3.1-pro-preview: 61 Requests / 1 Error (1.6%)
  • gemini-3-flash-preview: 609 Requests / 297 Errors (48.8%)

It appears the high error rate caused the local session to permanently cache a Quota Exhausted flag. This dirty flag not only bricked the Auto router but also intercepted and mocked the UI output for the global /model check within that terminal instance.

extent analysis

TL;DR

The issue can likely be resolved by clearing the local session cache or restarting the CLI to remove the incorrectly cached Quota Exhausted flag.

Guidance

  • The high error rate on the Flash model fallback may have caused the local session to cache a Quota Exhausted flag, leading to the incorrect display of global quota information.
  • To verify, try running the /model command in a new session (as done in Session B) to confirm that the global quota is actually healthy.
  • As a temporary workaround, switching to the Manual router and explicitly selecting a model can bypass the block, as seen in Session A.
  • Consider clearing the local session cache or restarting the CLI to remove the incorrectly cached flag.

Example

No code snippet is provided as the issue seems to be related to the CLI's state management rather than a specific code error.

Notes

The root cause of the issue appears to be related to the local session's caching mechanism, which may not be properly handling errors or updating the quota information. Further investigation into the CLI's state management and caching behavior may be necessary to prevent similar issues in the future.

Recommendation

Apply the workaround by clearing the local session cache or restarting the CLI, as this seems to be the most straightforward way to resolve the issue without waiting for a potential fix in a future version.

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

gemini-cli - 💡(How to fix) Fix Active session UI is poisoned, falsely displaying "Limit reached" for global quota, while new sessions show healthy limits and manual model selection still works [1 participants]