gemini-cli bug fix: tool-returned images never reached the model until this one-line patch
T1misageek · ghdev · 2026-10-01
A PR to google-gemini/gemini-cli fixes a bug where images returned by tools (e.g. screenshots read via readfile) never reached the model. stripToolCallIdPrefixes() rebuilt function responses from only name/response/id, dropping functionResponse.parts where multimodal output lives, so the model hallucinated image content. The fix spreads the original response and only rewrites id. Validation includes a unit test plus an end-to-end recipe: before, the model invented titles for an image titled "PLANET CARTOONIA"; after, 3/3 correct.
More from coding & agent
- Generic API-catalog MCP server vs one tool per job: a token-efficiency tradeoff — MandeepKaur9407 · 2026-11-16
- sessionwiki turns your past coding-agent sessions into a searchable local wiki for agents — Cold_Past7184 · 2026-11-16
- Developer hits 700+ commits/day with AI, asks how to manage parallel agent work — blixt · 2026-11-16
- Alibaba's G-CAST: governed continual self-training keeps e-commerce agents fresh in production — Yuechun Yu · 2026-11-16
- harness-evals: open-source library to compare agent versions with success-vs-cost plots — slavadubrov · 2026-11-16
- Developers poll real costs of running coding agents on remote VMs for work — radim11 · 2026-11-16