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
- Gergely Orosz: Shipping 10x PRs With AI Agents, Sites Fill With Small Regressions — ducha_aiki · 2026-09-11
- Same Echo Maze prompt, three frontier models: all passed visually but shipped the same hidden bug — eyishazyer · 2026-09-11
- Astra storyboards plus Minimax H3 per-shot generation boost video success rates — Hailuo_AI · 2026-09-11
- Codex tip: use Sol with Astra and Luna sub-agents to save usage — pvncher · 2026-09-11
- agents-best-practices: a provider-neutral Agent Skill for designing and auditing agentic harnesses — tom_doerr · 2026-09-11
- Cognition's SWE-2 uses a KKT duality argument in RL to shift the effort Pareto curve — YouJiacheng · 2026-09-11