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
- Agentic coding accessibility will reshape understanding of software complexity — pixlpa · 2026-08-24
- Devin Agent bypasses Slack block by finding emails in git logs — sandylikesfrogs · 2026-08-24
- Developer habits shift: Agents become collaborators from simple tools — latticecut · 2026-08-24
- Dev bottleneck shifts from writing to reading code: exe.dev co-founder — thursdai_pod · 2026-08-24
- The biggest AI mistake: trying to reinvent the wheel instead of using tools — Tired40s · 2026-08-24
- DeepPaperNote turns research papers into Obsidian notes — tom_doerr · 2026-08-24