Gemini 2.5 pro unable to edit files

Describe the Bug

The edit_file tool is unable to reliably apply changes to files (espescially large XML files, but in small too).

Suggested Solution:
Implement a search_and_replace tool for precise, literal string manipulation, as edit_file is not suitable for this use case. Alternatively, significantly improve edit_file’s context-matching accuracy for structured text formats.

Steps to Reproduce

Target a large XML (1000+ lines) file with many repetitive sibling nodes.
Use edit_file to modify a single, specific node.
Observe that the edit is not applied.

Expected Behavior

Same as Sonnet - easy edit right lines in file.

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.1.3 (user setup)
VSCode Version: 1.96.2
Commit: 979ba33804ac150108481c14e0b5cb970bda3260
Date: 2025-06-15T06:55:04.603Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.22631

Additional Information

Gemini said that it haven’t search_replace tool (as Sonnet do).

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

我已经持续一整个下午,都是反反复复重来,因为过程中它一直提示编辑工具无法编辑!我使用的模型跟你一样,它很奇怪,有时可以正常运行编辑工具,有时又不行,更让人气愤的时,在代理的过程中,它部分编辑成功,部分编辑不成功,最后告诉我全部编辑成功!我不得不又重来一次,每一次都在消耗着我的次数,而官方却从来不为此买单,也去积极的应当这些工具问题。不作为。

Same here. Please help.

always !