Agent can't edit files

The agent can create files but it cannot edit any files. It thinks it can edit files but after generating the snippet it cannot apply it on the actual file. First it says something like “I apologize for the confusion. Let me try to read the file first to get the exact context and then make the edit:” then it would go ahead to try again and still cant and would go like “I apologize for the difficulty. Let me try one more time with a more specific edit:” and then it goes in a loop like that for a few times then it wants me to accept commands so it could edit files via terminal.

Tried a complete reinstall but wouldn’t fix it. I’m using Agent on Auto.

3 Likes

I have the same issue. It started after my MacOS update to Sequoia 15.4. I have tried giving Cursor access in Privacy & Security but it does not help. I have a raised this with Cursor support but they have not been able to solve this issue.

I basically cannot open any project files or start new projects using Cursor.

I haven’t updated yet

I am getting a similar issue since yesterday. I keep getting ‘It seems the automated edit didn’t work for adding that route.’

It’s getting to the point that i want to ditch Cursor now, been so buggy the past month or so!!

1 Like

Same here…

For those can’t edit files, try these one of the following approaches:

  1. Use VPN
  2. Log out cursor, close cursor, restart router and network, restart the computer, start cursor, log in again,

I have no ideas what both work for me, and i have no idea why it can be solved by VPN or simply log in and log out, but at least it works.

Me also

Ive had this issue since the last 4 updates, devs dont really seem interested in fixing bugs that have constantly been mentioned.

1 Like

Same here – every now and then, it’ll fail to apply the changes and it just keeps on trying and failing. Works again after I open a new session, but definitely annoying.

Same problem. The regular AI keeps saying the “edit_tool” is failing and is unable to do anything. Claude 3.5, 3.7, gemini, o3, 4.1 …

Suspiciously enough, if I switch to “Claude MAX” it can suddenly edit files.

1 Like

I faced a similar issue before. I switched the agent to GPT and provided a short prompt for editing (e.g., updating comments). After completing the edits, I switched back to auto mode, and the problem was resolved.