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
- Resin lets an agent build standalone LLM inference engines; vLLM and SGLang optimize DeepSeek kernels differently — AccBalanced · 2026-10-27
- How I let my cloud Grok Bot code on my Mac mini via Tailscale, no public ports — talkaboutdesign · 2026-10-27
- Context layout is a cost decision: one memory edit can bust your entire agent prompt cache — dscape · 2026-10-27
- Alchemy adds effect/Workflow support across Durable Objects, Workflows and Lambda Durable Functions — samgoodwin89 · 2026-10-27
- Alchemy's Lambda Web Functions run plain Node web servers on Lambda, no OpenNext needed — samgoodwin89 · 2026-10-27
- Alchemy makes all ~2,850 AWS bindings work from any cloud, not just S3/Lambda/DynamoDB — samgoodwin89 · 2026-10-27