Pricing
Gemini CLI "API Error: got status: INTERNAL" (Error 500): What Helps
Gemini CLI says "API Error: got status: INTERNAL" with code 500? What Google's 500 means, when it is your request size, and the fixes that help.
9 min read
Error text checked Nov 5, 2026 on Gemini CLI’s official GitHub repo (issue #7586, #5125, #7318, #7309, #7310 and #3477). Error meanings checked Nov 5, 2026 on Google’s Gemini API errors and troubleshooting pages. CLI commands checked Nov 5, 2026 in the Gemini CLI command reference. Other dates under Sources. No affiliate links on this page (how we work).
Lead finding: a Gemini CLI 500 is Google’s server falling over mid-request, not a verdict on your key or your quota. Google’s documented fix is one word long: retry. The issue trail adds two useful wrinkles. Long, loopy sessions show up in a lot of the reports, and Google’s own tracking issue was closed in February 2026 as “resolved in the latest version”. So the order is retry, trim the session, update, then report.
The exact error: API Error: got status: INTERNAL (code 500)
This is the string as it appears in the title of issue #7586 on Google’s gemini-cli repo (verified Nov 5, 2026):
[API Error: got status: INTERNAL. {"error":{"code":500,"message":"An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting","status":"INTERNAL"}}]
Issue #5125 carries the same text (its title has a few wrapped spaces in it). Some builds print a longer, double-wrapped version that ends in "code":500,"status":"Internal Server Error", as quoted in #7310 and #7309. Same error, more JSON.
One-line answer: Google’s API errors page defines api_error (HTTP 500) as “An unexpected error occurred on the server.” Its recommended action is “Retry the request. If it persists, contact support.” (verified Nov 5, 2026).
One date check before you trust any forum answer. The cited issues are old. #3477 was opened Jul 7, 2025, #5125 on Jul 29, 2025, #7309 and #7318 on Aug 28, 2025, and #7586 on Sep 2, 2025. All of them are closed. Most were folded into the tracking issue #7310 (“Errors : 500”). A contributor closed #7310 on Feb 17, 2026 with: “Following other threads, it appears this has been resolved in the latest version! Please open a new issue if you are still seeing it” (verified Nov 5, 2026).
So if you see it on a Nov 2026 build, it’s either a fresh server problem or an old CLI. Neither is your fault.
When it’s your request: long sessions and big asks
Google’s pages don’t say “your prompt caused this”. The API errors page files 500 under server errors, and the troubleshooting page (verified Nov 5, 2026) has no 500-specific row and no line tying it to context size. As of Nov 5, 2026, Google documents no long-context trigger for this error.
The issues do show a pattern, though. It’s a user-reported pattern, not Google’s diagnosis:
- Loops. The #5125 reporter wrote that “gemini-cli is loopy and eventually showing the aforementioned error message” (Gemini 2.5 Flash, CLI 0.1.14).
- Malformed tool calls. In #7586 the 500 arrived right after “Response stopped due to malformed function call.” (Gemini 2.5 Pro, CLI 0.2.2).
- Bigger requests. #3477 is literally titled “Larger Requests resulting error 500 and INTERNAL”. The reporter’s prompt was 378 characters asking the CLI to verify a long list of fields. Another user couldn’t reproduce it, and the issue was closed for inactivity on Aug 22, 2025.
That’s the Tim Robinson sketch where the hot dog car guy says “We’re all trying to find the guy who did this.” Sometimes the guy is your 40-turn session.
If your session has been running long, trim it with commands from the Gemini CLI command reference (verified Nov 5, 2026):
/compress: “Replace the entire chat context with a summary. This saves on tokens used for future tasks while retaining a high level summary of what has happened.”/clear: clears the conversation context and starts a new session. It’s the blunt version.- Smaller
@includes: point the CLI at the one file it needs, not the whole folder.
If a fresh, smaller session works, you’ve found your answer.
When it’s Google: retry, check status, switch model
Most of the time this one isn’t yours. #7318’s reporter put it bluntly: “Every day the same issue or 500 or 503 with Pro and Flash.” In #7309, the CLI’s own debug log showed it handling the error as a server fault: “Attempt 1 failed with status 500. Retrying with backoff…”
- Retry, with a pause. Google’s troubleshooting page says to “Only retry on transient errors (like
429,408, or5xx)”, using exponential backoff (about 1 second, then 2, 4, 8) with jitter and a retry cap (verified Nov 5, 2026). A 500 is a 5xx. Mashing Enter isn’t backoff. It’s Arnold in Jurassic Park flipping breakers and saying “Hold on to your butts.” Wait a beat. - Check the status page. Google AI Studio has a public status page at aistudio.google.com/status (verified Nov 2, 2026). If it shows an incident, retrying later is the whole fix.
- Switch model.
/model set <model-name>(or/model managefor the dialog) changes models (commands, verified Nov 5, 2026). The model routing docs also say the CLI “automatically switches to a fallback model in case of a model failure” from “quota or server errors”, on by default (verified Nov 2, 2026). The #7318 reporter saw errors on both Pro and Flash, so switching isn’t guaranteed to help. - Update the CLI. Run
npm install -g @google/gemini-cli@latest(troubleshooting docs, verified Nov 1, 2026). The latest release on Nov 1, 2026 was v0.66.0 from Oct 27, 2026. The #7310 closing note says the fix landed in a later version, so an old build is the one thing you control here. - Report it properly. If it still fails on the latest version,
/bugfiles an issue from inside the CLI. Include the CLI version, model, auth method and the full error. That’s what #7310’s closing note asked for.
Skip the forum advice to rotate keys across a pile of projects. It’s a quota workaround, and it does nothing for a server error.
Who can still use Gemini CLI, and how
This matters for diagnosis, because a lot of 2025 advice assumes you’re signed in with a personal Google account. That route ended. Per codeassist.google (verified Oct 29, 2026): “Starting June 18, 2026, Gemini Code Assist IDE extensions stopped serving requests for the Gemini Code Assist for individuals, Google AI Pro, and Google AI Ultra tiers. This also applies to usage of Gemini CLI.” Login with Google no longer works for those tiers.
What’s left, per the Gemini CLI quota and pricing page (verified Oct 30, 2026):
| Access | Daily limit | Note |
|---|---|---|
| API key, free | 250/day | Flash only |
| API key, paid | Varies | Pay as you go |
| Vertex AI | Varies | Billing project |
| Code Assist Std | 1,500/day | Existing subs |
| Code Assist Ent | 2,000/day | Existing subs |
Code Assist Standard and Enterprise stopped taking new purchases on Oct 9, 2026. Existing subscriptions run to the end of their contract (Google Cloud sunset page, verified Oct 29, 2026). Unpaid and Google One users were moved to Antigravity CLI on June 18, 2026, per the banner on the quota page.
Honestly, this is the part that stings. People paid for Google AI Pro partly for Gemini CLI, and the CLI quietly stopped counting that subscription. If you’re on a personal account and see auth errors mixed in with your 500s, the Gemini CLI 403 permission denied post covers that side. Free-tier numbers are in Gemini CLI free tier limits.
500 vs 503 vs 429 vs 400
From Google’s API errors page (verified Nov 5, 2026):
| Code | Meaning | Fix |
|---|---|---|
| 500 | Server error | Retry |
| 503 | Overloaded | Backoff |
| 429 | Limit hit | Wait or pay |
| 400 | Bad request | Fix request |
- 500
INTERNAL: “An unexpected error occurred on the server.” Retry; contact support if it persists. - 503: “temporarily overloaded or down.” That’s capacity, covered in Gemini CLI 503 model overloaded.
- 429: per-minute limits or “You have exceeded your daily quota.” That one is about your limits. See Gemini CLI 429 resource exhausted.
- 400: the request itself is wrong, and Google says not to retry it. See Gemini CLI 400 invalid argument.
The quick tell: 500 and 503 are Google’s problem, 429 is your meter, 400 is your request.
Does a 500 cost you quota?
Not published. Google’s pages don’t say whether a failed 500 request counts toward your daily request limit, and the CLI docs don’t either (checked Nov 5, 2026). /stats model shows “token counts and quota information” for the session (commands, verified Nov 5, 2026). Check it before and after a bad run if you’re close to a cap. Retries can add up, which is one more reason to back off instead of hammering.
If Gemini CLI’s error lottery is wearing you down, Gemini CLI vs Claude Code and AI coding tools compared are the next stops.
Here’s what I’d do
Retry once after a short pause. If the session is long, /compress and try again, or /clear and restate the task smaller. Check the AI Studio status page. Update to the latest CLI, since Google’s own tracking issue says the fix shipped in a later version. Still failing on the latest build with a short prompt? File it with /bug and the full error text. Don’t buy a plan to fix a 500. Nothing Google publishes says paying helps.
A heap crash is a local memory failure, not a 500 from the API: Gemini CLI heap out of memory.
FAQ
What does Gemini CLI API Error: got status: INTERNAL 500 mean?
It’s a server-side error; Google’s API errors page calls 500 “An unexpected error occurred on the server” and says to retry.
Is Gemini CLI error 500 my fault?
Usually not; Google files 500 as a server error, though users report it more often on long, looping sessions, so try /compress or a fresh session.
Does a 500 error count against my Gemini CLI quota?
Not published; Google doesn’t say, so check /stats model if you’re near a limit.
Was Gemini CLI error 500 fixed? Google’s tracking issue #7310 was closed Feb 17, 2026 as resolved in the latest version, so update the CLI and open a new issue if it persists.
What’s the difference between Gemini CLI error 500 and 503? 500 is an unexpected server error, while 503 means the model is overloaded; both are Google-side and both call for a retry.
Sources
- gemini-cli issue #7586 (verbatim error in title; closed as duplicate Sep 3, 2025): https://github.com/google-gemini/gemini-cli/issues/7586 (verified 2026-11-05)
- gemini-cli issue #5125 (same error, “loopy” session; closed Aug 3, 2025): https://github.com/google-gemini/gemini-cli/issues/5125 (verified 2026-11-05)
- gemini-cli issue #7318 (500 and 503 on Pro and Flash; closed Sep 3, 2025): https://github.com/google-gemini/gemini-cli/issues/7318 (verified 2026-11-05)
- gemini-cli issue #7309 (“Internal Server Error 500”, retry log; closed Aug 28, 2025): https://github.com/google-gemini/gemini-cli/issues/7309 (verified 2026-11-05)
- gemini-cli issue #7310 (“Errors : 500” tracking issue; closed Feb 17, 2026 as resolved in the latest version): https://github.com/google-gemini/gemini-cli/issues/7310 (verified 2026-11-05)
- gemini-cli issue #3477 (larger request → 500 INTERNAL; closed Aug 22, 2025 for inactivity): https://github.com/google-gemini/gemini-cli/issues/3477 (verified 2026-11-05)
- Gemini API, API errors (500, 503, 429, 400 definitions and actions): https://ai.google.dev/gemini-api/docs/api-errors (verified 2026-11-05)
- Gemini API, Troubleshooting (retry 5xx with exponential backoff and jitter): https://ai.google.dev/gemini-api/docs/troubleshooting (verified 2026-11-05)
- Gemini CLI, Commands (
/compress,/clear,/model,/stats,/bug): https://geminicli.com/docs/reference/commands/ (verified 2026-11-05) - Gemini CLI, Model routing (fallback on server errors): https://geminicli.com/docs/cli/model-routing/ (verified 2026-11-02)
- Google AI Studio status page: https://aistudio.google.com/status (verified 2026-11-02)
- Gemini CLI troubleshooting (update command): https://geminicli.com/docs/resources/troubleshooting/ (verified 2026-11-01)
- Gemini CLI releases (v0.66.0, Oct 27, 2026): https://github.com/google-gemini/gemini-cli/releases (verified 2026-11-01)
- Gemini Code Assist consumer accounts (June 18, 2026 change): https://codeassist.google/ (verified 2026-10-29)
- Gemini CLI quota and pricing (daily limits by access method): https://geminicli.com/docs/resources/quota-and-pricing/ (verified 2026-10-30)
- Gemini Code Assist sunset (no new Standard/Enterprise purchases since Oct 9, 2026): https://docs.cloud.google.com/gemini/docs/codeassist/sunset (verified 2026-10-29)