Gemini CLI patch fixes a turn-boundary bug that caused 400s after skill calls
adamfweidman · ghdev · 2026-07-29
Gemini CLI fixes a regression that broke skill-triggered follow-up calls
The google-gemini/gemini-cli repo merged a fix for bug #28565: when active loops were detected, the CLI could start from a merged functionResponse + text turn and miss a required synthetic thought signature. That caused the Gemini API to reject the next tool call with 400 INVALIDARGUMENT, leaving a bad turn in history and making the session unrecoverable.
The regression came from #28407, which introduced coalesceConsecutiveRoles. The fix adds the missing check so function-response turns are skipped when finding the active loop, matching the code comment and the API’s real turn boundary. The new regression test fails on main and passes with the patch; the practical repro is: run a prompt, let the model reply, trigger a skill, then send a follow-up.
More from coding & agent
- 10 open-source repos that let your AI agent reverse-engineer apps and games — victor_explore · 2026-10-16
- The new CTO job: agent management and QA loops, 'cable management' instead of coding — HankYeomans · 2026-10-16
- Why company AI agents go stale: adoption needs in-house knowledge, not just better agents — EdenEmarco177 · 2026-10-16
- Open-source MCP lets coding agents search Obsidian's 9,000-plugin directory before reinventing wheels — pitfa19 · 2026-10-16
- Cheng Lou open-sources Handwired: hand-written weights turn code into training-free neural nets — dotey · 2026-10-16
- Building a portable context vault in Notion so every AI agent knows you from day one — ivanhzhao · 2026-10-16