Guides · Updated October 26, 2026
Gemini CLI usage limits: daily quotas, the June 2026 change, and keeping costs in check
Gemini CLI limits work differently from most coding agents: on a Google sign-in you get a number of model requests per day, not a dollar budget, and one prompt can use many requests. On an API key there is no daily ceiling at all, just a per-token bill. And since June 18, 2026, which one you’re on also decides whether Gemini CLI works for you at all. This guide covers the current limits, what to do when you hit them, and how to keep an API-key session from running up the bill.
The short version
- Free, Google AI Pro and Ultra sign-ins no longer work in Gemini CLI. Google moved those users to Antigravity CLI on June 18, 2026.
- Code Assist Standard / Enterprise (and Workspace AI Ultra): 1,500 / 2,000 model requests per user per day.
- Gemini API key: the unpaid tier is 250 requests a day on Flash only; paid usage has no daily request cap and is billed per token.
- Check usage with
/stats model. Bound sessions withmodel.maxSessionTurnsand leave loop detection on.
1. The limits, by how you sign in
Gemini CLI’s quota depends on the authentication method, per Google’s quotas and pricing page:
| Sign-in | Tier | Requests per user per day |
|---|---|---|
| Google Workspace / Google Cloud | Code Assist Standard | 1,500 |
| Google Workspace / Google Cloud | Code Assist Enterprise, Workspace AI Ultra | 2,000 |
| Gemini API key | Free (unpaid) | 250, Flash only |
| Gemini API key | Paid | Varies by tier; billed per token |
| Vertex AI | Express mode / paid | Varies by account; paid is billed per token |
There are also per-minute limits, and requests can be throttled when demand is high. Two details catch people out:
- A request is a model call, not a prompt. In agent mode one prompt can turn into many requests: read files, run a command, read its output, edit, run it again. A long agentic task can use dozens.
- The daily quota is shared. For Code Assist licenses, Gemini CLI and Code Assist agent mode in the IDE draw from the same per-user daily count, across all Gemini models.
2. What changed on June 18, 2026
Google announced in May 2026 that Gemini CLI would stop serving requests for Gemini Code Assist for individuals (the free Google sign-in) and for Google AI Pro and Ultra subscribers on June 18, 2026. Those users are now pointed to Antigravity CLI, which keeps Gemini CLI’s core features (skills, hooks, subagents, and extensions as plugins) but isn’t a one-to-one copy. Gemini CLI still works with Code Assist Standard and Enterprise licenses, Google Cloud projects, and paid Gemini API keys.
So if Gemini CLI suddenly stopped working on a personal Google account, it’s not your daily quota. Your options are to move to Antigravity CLI on the same account, or keep Gemini CLI and sign in with an API key or Vertex AI instead, which means paying per token.
3. When you hit the limit
- Daily quota on a license: requests stop until the quota resets. Nothing is lost. Your files and history are where they were.
- Per-minute limits or capacity errors: wait a minute and retry, or switch to a lighter model for the rest of the task.
- Switch to pay-as-you-go: Google’s recommended route for uninterrupted use is a Gemini API key or Vertex AI. That removes the daily cap, which also removes the thing that was stopping a runaway session. Put a limit back before you switch (section 5).
4. Check what a session is using
/stats model shows the current session’s token usage per model and information about the limits on your current quota. Gemini CLI also prints a usage summary when you exit. On an API key, multiply the tokens by your model’s price for an estimate; the billing page in Google Cloud or AI Studio is the real number.
Large input-token counts with a small output usually mean the same context is being re-sent many times: big files read repeatedly, long command output, or a long session that hasn’t been compressed.
5. Bound sessions and spending
Gemini CLI has a few settings in settings.json (user-level ~/.gemini/settings.json or project-level .gemini/settings.json) that limit how far one session can run:
{
"model": {
"maxSessionTurns": 60,
"compressionThreshold": 0.5,
"summarizeToolOutput": {
"run_shell_command": { "tokenBudget": 2000 }
}
}
}model.maxSessionTurns: the maximum number of turns in a session. The default is-1(unlimited). A finite number puts a ceiling on how long a runaway session can go.- Loop detection is on by default and tries to catch the agent repeating itself. Leave
model.disableLoopDetectionatfalse. model.compressionThreshold: the fraction of the context window at which Gemini CLI compresses the history. Compression keeps each request smaller in long sessions.model.summarizeToolOutput: summarize long tool output (for example shell commands) to a token budget instead of feeding all of it back to the model.
On a paid API key or Vertex AI, the daily request cap is gone, so the money limit has to come from somewhere else:
- Use a dedicated key and project for the CLI so its usage is separate on the bill and you can turn it off without breaking anything else.
- Set a budget with alerts in Google Cloud Billing on that project. By default a Cloud Billing budget sends alerts; it doesn’t stop spending by itself, so watch the alerts or check what spend controls your account offers.
- Bound headless runs. For
gemini -pin scripts or CI, wrap the command intimeout(or set the CI job timeout) and use a project-level settings file with a finitemaxSessionTurns. More in setting a hard budget for AI coding agents in CI.
When a session does loop, stop it (Esc cancels the current request, Ctrl+C twice exits), undo the edits with git or /restore if you have checkpointing on, and start a fresh session with what you learned rather than asking it to try again in the same context.
Where LoopGuard fits
LoopGuard enforces per-session and daily dollar caps and blocks no-progress repeats through the hook systems of Claude Code, Codex CLI and Cursor. It doesn’t guard Gemini CLI or Antigravity CLI today, so for Gemini the settings and billing controls above are the limits to use. If you also use one of those three agents, npm i -g loopguard-cli && loopguard init adds the caps in about a minute. Related: Codex usage limits and Claude Code usage limits.
Related
- How to stop runaway Claude Code, Codex and Cursor agent loops
- How to track AI coding agent token costs per session
- How to set a spending limit for Claude Code
- How to limit Cursor agent usage costs
- How to cap OpenAI Codex CLI spend
- Claude Code usage limit reached: why it happens and how to monitor it
- How to set a hard budget for AI coding agents in CI
- Claude Code stuck in a loop: how to break it and stop it repeating the same command
- Codex usage limit reached: 5-hour and weekly limits explained
- Cursor agent stuck in a loop: how to stop it, roll back, and keep it from repeating
- Why Claude Code uses so many tokens, and how to use fewer
- How to set a budget limit for Aider
- GitHub Copilot agent mode stuck in a loop: how to stop it and keep it from repeating
- Cline stuck in a loop: how to stop it, roll back, and cap what it spends
- Codex stuck in a loop: how to stop it, undo it, and keep it from repeating