Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Bug Report: Plan Update Fails with “Received invalid string to replace in plan” Error
Summary
When attempting to update a plan file using the plan update functionality, the operation fails with an error indicating that the text to be replaced doesn’t match exactly. The system appears to store plan content in a different format than what is displayed, causing string matching failures during updates and unecessary compute.
Request ID
7dbe6adc-d091-4426-8b2e-7310e51bdd3b
Environment
- Cursor Version: 2.0.77 (ba90f2f88e4911312761abab9492c42442117cf0, arm64)
- OS: macOS 24.4.0 (darwin)
- Mode: PLAN mode (plan update operation)
Steps to Reproduce
Steps to Reproduce
- Create or open a plan file (
.plan.md) in PLAN mode - Attempt to update a specific section of the plan using the plan update functionality (just asking the agent to evaluate and update the prompt)
Expected Behavior
Expected Behavior
The plan update should successfully without erroring tool calls.
Actual Behavior
The update operation fails with an error message indicating:
- “Received invalid string to replace in plan”
- The text matching fails even when the
old_strappears to match the visible content - The system suggests that the stored format differs from the displayed format
- The errors make users lose confidence the plan was updated properly.
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2.0.77
VSCode Version: 1.99.3
Commit: ba90f2f88e4911312761abab9492c42442117cf0
Date: 2025-11-13T23:10:43.113Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.4.0
For AI issues: which model did you use?
Claude Sonnet 4.5 (Thinking) with Max Mode
Does this stop you from using Cursor
No - Cursor works, but with this issue