I had gemini test his tools and he did find some ambiguity in how the diff is returned, which the model seems to misinterpret. Reapply also duplicates lines if it’s a prepending operation. Here’s the bug report he put together `edit_file` and `reapply` Tools Lead to Gemini-2.5-pro Misinterpretation and Task Failure