Gemini CLI Fix: Retry Loop Ignores AbortSignal Causing Timeout Failure
chelsealong · ghdev · 2026-08-26
A PR submitted to Google Gemini CLI fixes a timeout control failure in BaseLlmClient.
The Problem:
- The generateContent and generateJson methods in BaseLlmClient accept an abortSignal and pass it to individual API requests, but fail to pass it to the signal option of retryWithBackoff.
- Consequently, a caller-side timeout only aborts the in-flight HTTP request. The retry loop itself remains unbounded, continuing its full exponential backoff schedule (e.g., 5s/10s/20s/30s) regardless of the timeout having fired.
The Fix:
- Properly forwards the abortSignal to retryWithBackoff, ensuring that a timeout can immediately terminate the retry loop.
- This resolves a secondary symptom in Issue #29065: when SessionSummaryService fails due to a misconfiguration (hardcoded model name), it previously stuck in a retry loop for over 65 seconds. Now it fails fast and silently (returning null).
Note: This PR does not fix the root cause of Issue #29065 (the hardcoded model name) but addresses the resulting uncontrolled retry behavior.
More from coding & agent
- Open-source Claude Code skills for resume optimization and job search — tom_doerr · 2026-08-26
- Practical Guide to AI Agent Architecture: Constraints in Code, Not Prompts — bigdata · 2026-08-26
- CMU launches new AI Agents course covering scaffolding, evals, and RL training — shuyanzh36 · 2026-08-26
- Toast 1 deep search: mixing semantic search and grep to analyze SEC filings — bclavie · 2026-08-26
- AI agents assist math research: completing a group theory proof in one chat — Sauers_ · 2026-08-26
- 657 PRs and 449 Issues in 30 Days: When Agents Follow Your Backlog Rules Too Well — thechrisperry · 2026-08-26