gemini-cli fixes lost usage tracking when stream aborts
PranavMishra28 · ghdev · 2026-08-07
A PR merged into Google's gemini-cli fixes the issue where token usage already received was not recorded when a stream was aborted. Previously, usage was only flushed on the success path, and the abort path lost it entirely because logApiError early-returns for AbortError. The fix flushes captured usage via logApiResponse before rethrowing, without reclassifying cancellation as an error. If no usage metadata was received before abort, no event is emitted, avoiding fabricated zero-usage records. Tests cover both cases.
More from coding & agent
- Opus 5.5 + Three.js demo stuns with water physics, fish and blossoms — nikola_mr64990 · 2026-10-16
- Grok-built linear regression bot claims $508K PnL in 125 days on Polymarket — Roger_M_Taylor · 2026-10-16
- Karpathy's knowledge engine workflow: Claude Code turns raw notes into a self-updating wiki — nikola_mr64990 · 2026-10-16
- Sierra and Meta unveil Personal Agent Protocol with Zapier as launch partner — sujingshen · 2026-10-16
- ArcKit adds 102 AI-narrated short films for commands across 14 community overlays — mcraddock · 2026-10-16
- Personal agents live or die on chaining tasks, not single-task ability — sujingshen · 2026-10-16