-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Gemini CLI should utilize 'pipelining' of write -> validate inner loop #20093
Copy link
Copy link
Open
Labels
area/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent QualityIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Qualitykind/customer-issueIssues that were reported by customersIssues that were reported by customerspriority/p2Important but can be addressed in a future release.Important but can be addressed in a future release.status/bot-triaged🔒 maintainer only⛔ Do not contribute. Internal roadmap item.⛔ Do not contribute. Internal roadmap item.
Metadata
Metadata
Assignees
Labels
area/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent QualityIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Qualitykind/customer-issueIssues that were reported by customersIssues that were reported by customerspriority/p2Important but can be addressed in a future release.Important but can be addressed in a future release.status/bot-triaged🔒 maintainer only⛔ Do not contribute. Internal roadmap item.⛔ Do not contribute. Internal roadmap item.
Type
Fields
Give feedbackNo fields configured for Task.
Analysis of the Terminal Bench suite of evals yielded #19574 which utilizes a 'pipelining' strategy of optimizing the outputs of specific sequences of tool calls to eliminate turns. That strategy caused at least a 10% reduction in turn count in SWEBench with Gemini 3 flash and potentially significantly greater savings with Gemini 3.1 pro preview.
This issue tracks another pipelining change. Specifically optimizing the write_file -> validate loop performed by the agent during its inner loop validation.
Previously the agent would explicitly write the file and then have to explicitly remember to build and/or validate after each edit. This is time consuming and requires attention and is potentially error prone.
Instead, I propose the creation of dynamic validation hooks which the agent can register on-the-fly during the session. Each hook takes a file path pattern, and for all matching files/paths, runs that validation after a matching write_file, returning any non-success codes in the write_file response.
The benefit is an estimated 5-9% reduction in turns, faster scenario completion, and more systematic and thorough validation and feedback, particularly across long running sessions.