Fix: Gemini CLI Multi-Turn History Corruption on Abort
amelidev · ghdev · 2026-08-14
This PR fixes a tricky issue in Gemini CLI where aborting a multi-turn prompt with tool calls left the session history in an incomplete, pending state. This caused the model to erroneously resume the cancelled task when the user sent a new, unrelated message.
The Fix: It introduces initial state tracking for history length and token counts when a new prompt starts. If the prompt execution is aborted or cancelled mid-stream, the conversational history and token baseline are fully rolled back to their pristine state before the prompt began. A unit test was also added to ensure correct rollback behavior.
More from coding & agent
- Tencent Releases UI-Mate-27B, a Desktop GUI Agent Model — tencent · 2026-08-24
- Comparing AI Subscriptions: DeepSeek API vs. Claude Pro vs. Local LLMs — Unlikely_Bluejay5392 · 2026-08-24
- Claude Code introduces 'Remote Control' feature to boost coding efficiency — rohanpaul_ai · 2026-08-24
- rauchg lays out fx extension philosophy: MCP, Skills, Plugins and Unix composition — AccBalanced · 2026-08-24
- Netflix details its production LLM judge: hundreds of thousands of recommendations scored weekly — omarsar0 · 2026-08-24
- smolvm passes Simon Willison's Fable 5 agent test as a secure sandbox — yawnxyz · 2026-08-24