"The string to replace was not found in the file." Every time

Describe the Bug

It seems every time Cursor tries to use this feature, I get this error. And sometimes I have to specifically tell it to not try to use string replace for it to be able to continue.

Steps to Reproduce

I just prompt the AI and it seems anytime it tries to do string replace, it fails. I have private mode on, not sure if that is needed to use it.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.1.2 (Universal)
VSCode Version: 1.96.2
Commit: 87ea1604be1f602f173c5fb67582e647fcef6c40
Date: 2025-06-13T00:26:52.696Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, sorry about this!

If possible, can you share:

  • which model you are using
  • if this still happens in a brand new chat, or only in existing ones
  • a request ID for a chat that has a bad find and replace attempt (privacy mode off please!)
  • a screenshot of a failed attempt at this

I’m using Claude 4 … and I guess I wouldn’t know if it does work in a new chat because it would only report an error, right? At the moment, I’m in a chat that says “Start a new chat for better results” I don’t want to turn off privacy mode lol.

It looks like it is working most of the time, but you see the occasional error when the model provides the wrong parameters.

This is somewhat expected, as the models may not be precise enough with their execution of their tool, but it should self-heal like it has done here, and continue being able to modify the file!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.