gemini-cli stuck on "This is taking a bit longer" after Esc cancel — is there a fix?
In gemini-cli, pressing Esc to cancel a request leaves the "This is taking a bit longer, we're still on it" message on screen, and new prompts are blocked. The reporter used gemini-cli v0.32.1 Stable in Termux on Android 15 with gemini-3.1-pro-preview and Google OAuth; another commenter reproduced it on Ubuntu. Is there a fix or workaround?
Originally asked on GitHub: https://github.com/google-gemini/gemini-cli/issues/21096
5 answers
The issue is closed as completed, and the thread links PR #21960 as the fix. The thread attributes the stuck state to a cancel/retry race: a late retry event could keep the "taking a bit longer" message active after Esc.
The PR blocks retry callbacks after abort, ignores retry events when a request is canceled or not responding, clears retry state immediately on cancel, and shows the retry/cancel timer text only while the request is actively responding. A contributor reported 5 of 5 smoke test runs passing on macOS (Node v22.14.0, OAuth, gemini-3.1-pro-preview) with no stuck loading line and normal follow-up prompts.
A later commenter said the problem still occurred after trying the change. Their debug log showed HTTP 429 "No capacity available for model gemini-3.1-pro-preview on the server" with reason MODEL_CAPACITY_EXHAUSTED. That commenter did not state which build they tested. Another commenter guessed the problem was on Google's server side, but this is unconfirmed.
To inspect errors, press F12 inside gemini-cli or run with the debug flag. The issue body lists restarting the interface or session as the impact, and the thread does not describe any other workaround.
Did this work for you?What @Hassan786gg tried on GitHub (Didn't work)
On Termux with CLI v0.32.1 and gemini-3.1-pro-preview, the reporter pressed Esc to cancel a running request, then sent "Continue". The loading message stayed and the session had to be restarted.
Source: https://github.com/google-gemini/gemini-cli/issues/21096 (opens external site)
Did this work for you?What @alieonsido tried on GitHub (Outcome unclear)
A commenter pressed F12 in gemini-cli to view the error log and reported the stuck problem on gemini-3.1-pro, gemini-3-flash, and gemini-2.5-flash (and lite), while gemini-2.5-pro worked. The thread does not say this changed the outcome.
Did this work for you?What @Aaxhirrr tried on GitHub (Worked)
Contributor's fix in PR #21960: block retry callbacks after abort, clear retry state on cancel, and show retry/cancel text only while responding. Smoke-tested on macOS with CLI 0.34.0-nightly.20260304.28af4e127, OAuth, gemini-3.1-pro-preview, Node v22.14.0, passing 5 of 5 runs.
Did this work for you?What @alieonsido tried on GitHub (Didn't work)
A commenter tried the fix and still saw the problem. Their debug log showed HTTP 429 "No capacity available for model gemini-3.1-pro-preview on the server" with MODEL_CAPACITY_EXHAUSTED. The build version they tested is not stated.
Did this work for you?
Related questions
- gemini-cli 400: "only 'enum' and 'date-time' are supported for STRING type"
- Gemini CLI: API Error 'Model stream ended with an invalid chunk or missing finish reason' after ReadFile or Edit tool calls
- Is there a way to get codebase indexing in gemini-cli?
- How can I use voice input instead of typing with Gemini CLI?
- Is gemini-cli able to run as an MCP server for other AI tools?