google-gemini / google-gemini/gemini-cli
[Bug] Esc key fails to cancel retryWithBackoff deadlock during WebSearch tool 429 quota error
- Dominant language
- TypeScript
- Stars
- 107k
- Forks
- 14.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 45
Description
### What happened?
When issuing a prompt using @GoogleSearch, the CLI triggers a background utility_router call. If the secondary/fallback Flash tier model hits a daily quota limit (HTTP 429), the CLI enters an infinite retryWithBackoff loop on "Thinking...". Pressing the Esc key fails to cancel the request state or return control to the prompt.
Steps to reproduce:
Run gemini --model gemini-3.1-flash-lite -d.
Enter prompt: search about bread with GoogleSearch feature.
CLI gets stuck on Thinking... (esc to cancel).
Pressing Esc fails to break the execution state.
### What did you expect to happen?
Pressing Esc should immediately interrupt the retryWithBackoff loop, cancel the pending tool execution, and return control to an active input prompt. Additionally, a sub-call failure in utility_router should gracefully fail with a clear user error rather than deadlocking the main session.
Client Infor
### Client information
Client Information
Run `gemini` to enter the interactive CLI, then run the `/about` command.
```console
> /about
# paste output here
```
PS D:\stuff for me ig\work\lps-projects\sentiment-analysis-project> gemini -d
▝▜▄ Gemini CLI v0.56.0
▝▜▄
▗▟▀ Authenticated with gemini-api-key /auth
▝▀
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
> /about
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ About Gemini CLI │
│ │
│ CLI Version 0.56.0 │
│ Git Commit b6e23a7dc │
│ Model Auto │
│ Sandbox no sandbox │
│ OS win32 │
│ Auth Method gemini-api-key │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
### Login information
Authenticated via Gemini API Key (gemini-api-key).
### Anything else we need to know?
WebSearchToolInvocation.execute
-> executeToolWithHooks
-> GeminiClient.generateContent
-> retryWithBackoff
status: 429
Error flushing log events: HTTP 400: Bad Request
ClearcutLogger: Re-queued 27 events for retry
Contributor guide
Research direction
Start at WebSearchToolInvocation.execute and follow executeToolWithHooks into GeminiClient.generateContent and retryWithBackoff. Reproduce the 429 case with the GoogleSearch prompt and check how Esc cancellation is propagated. Done means Esc returns control to the input prompt and a utility_router failure reports a clear error instead of leaving the CLI in an infinite retry state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100