Plan Mode: Received invalid string to replace in plan

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

  1. Create or open a plan file (.plan.md) in PLAN mode
  2. 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_str appears 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

1 Like

Hey, thanks for the report. This is a known issue the team is already investigating.

The problem you’re seeing matches a broader Plan mode bug where the internal plan storage format differs from what’s shown in the UI, which causes tool calls to break when the plan is updated.

Temporary workarounds while the fix is in progress:

  • Edit the plan markdown file directly in .cursor/plans/ (if it’s saved to your workspace)
  • Start a new plan when you need significant changes

Thanks a lot for documenting everything in such detail!

1 Like

thanks for the update! is there a mechanism to auto save plans in .cursor/plans/ if it’s created?

Great question. Plan mode currently doesn’t auto-save plans to .cursor/plans/ by default.

To save plans to your workspace, you either need to click “Save to workspace”, manually create the file, or ask the agent to save the plan markdown into that directory.

Since this workflow is quite common, especially now that the plan update bug has been fixed, it makes sense to track this as a feature request.

1 Like

Awesome, thank you so much.

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