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
- Rollikey: open-source proxy adds pre-flight snapshots and LIFO rollback for production AI agents — Rollikey · 2026-11-30
- Open-source LoRA restyles MiniMax H3 video from a single reference image — linoy_tsaban · 2026-11-30
- Dev shares Avi home AI companion internals: device control, memory and full system prompt — aloncarmel · 2026-11-30
- Microsoft exec explains AI governance with a 4-step closet-cleaning method — donasarkar · 2026-11-30
- Catching steps your AI agent silently skipped: declare required actions per task — Ok-Machine7983 · 2026-11-30
- MoonBit 1.0 RC Ships with Stable Compiler, Targeting February 2027 Release — harryshum · 2026-11-30