Gemini CLI PR adds tool_call_id to BeforeTool/AfterTool hooks for precise call pairing

ayam04 · ghdev · 2026-11-27

PR #30491 on google-gemini/gemini-cli adds an optional toolcallid field to BeforeTool and AfterTool hook inputs, letting hooks pair a call's before/after events by the same id carried in the model's functionCall/functionResponse (genai.tool.call.id), instead of fragile tool-name + arguments + arrival-order matching. The change is purely additive optional-param threading through hookEventHandler, hookSystem and ToolExecutor, with no breaking impact on existing hooks or tests.

Original post →

More from coding & agent

coding & agent channel →