gemini-cli PR fixes 400 errors and retry loops from thoughtSignature-only model turns
tadipavan · ghdev · 2026-11-05
A community PR (#30153) in google-gemini/gemini-cli fixes 400 Bad Request ("Requests ending with a model turn are not supported") errors and empty-response retry loops when using readfile on images with Gemini 2.5/3 models.
- Root cause: post-tool responses containing only a thoughtSignature (or empty text plus signature) were treated as active content by the history validation pipeline, letting empty model turns into agentHistory and producing payloads that end on a model turn.
- Secondary fix: multimodal tool response parts (sibling inlineData image parts) were being dropped in subagent execution (LocalAgentExecutor) and when the multimodalToolUse feature flag was absent.
- Changes: isValidContent, isEmptyTextPart, and stripToolCallIdPrefixes now ignore thoughtSignature when checking active payload keys, with corresponding updates to closeUnansweredToolResponseTurn.
More from coding & agent
- Gov software co-founder: 'We vibe coded a bunch of slop' — even the specs were AI-written — alex_verem · 2026-11-05
- Can't get Dots or Duet in Europe? 6 open-source clones, top at 7.2K stars — femke_plantinga · 2026-11-05
- Open-source ArionTalk demoed at Google Web AI Summit: one tag, voice AI for any website — jason_mayes · 2026-11-05
- Over 40% of GitHub pull requests are now AI-generated, up from 17% in March — marlene_zw · 2026-11-05
- Yacine flags unsolved agent training problem: how to build state-based curricula for agents — yacineMTB · 2026-11-05
- Yuppsy launches a real estate website MCP server, 3 sites free — scuty · 2026-11-05