Gemini CLI fixes a credential fallback bug that crashed agent mode on expired OAuth tokens
luisfelipe-alt · ghdev · 2026-07-21
Gemini CLI fix restores credential fallback when cached OAuth data is stale
A PR to google-gemini/gemini-cli fixes a regression in Gemini Code Assist Agent Mode where the client would stop after finding a cached .gemini/oauthcreds.json file and skip GOOGLEAPPLICATIONCREDENTIALS entirely.
When the cached OAuth tokens expired or failed to refresh, local dev machines could fall back to GCE metadata credentials, hang on the 169.254.169.254 metadata endpoint, and crash the agent with FatalAuthenticationError. The patch changes credential loading to try all available paths sequentially, verify each one, and keep falling back until one succeeds. It also adds a regression test covering the invalid-cache-plus-fallback case.
More from coding & agent
- A 9B Ollama agent can run a fully local DJ radio with tools, memory, and TTS — pinku1 · 2026-07-27
- Bugbot rejects an MCP permission flag because it would break path-scoped isolation — zeeg · 2026-07-27
- One GPT-5.6 agent is guarding a Blink security system while another makes a parody rap album — repligate · 2026-07-27
- An agent got unblocked by reusing a logged-in browser, not stealth tricks — armanidev_ · 2026-07-27
- Paper argues graph topology can become the core operating system for AI agents — theomitsa · 2026-07-27
- Claude Code desktop adds UI markup feedback for smoother visual editing — EricBuess · 2026-07-27