File edit card is pretty broken

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

This is part of my investigation into why the file editing tools fail so often.

The ‘file edit’ card in the chat window will originally display a minimal (and correct) line edit count.

Clicking ‘copy’, presumably the same as ‘Show Code’ → copy, results in a diff of the following form:

Old
->
New

Where Old and New are some lines of context around the change.

After clicking ‘Show Code’ or ‘Show Diff’, the line count switches to different values, significantly larger than the minimal edit.

The diff displays the form:

- Delete the entire top of the Old file
+ Some more context from New
- Interleaved with deletions from more of the Old file
+ Some more context from New
+ -> // as in -> sigil from 'Show Code'
- Old
+ New
- Delete the entire bottom of the Old file

When minimising and expanding the card, the line counts briefly flash back to their original minimal numbers before restoring the new large numbers.

This happens across projects, across files, across languages, with non-code and code, with minimal edits and large edits.

When the agent uses the ‘search_replace’ tool, it’s of this form, when it uses ‘edit_file’, it’s of the form:

- Delete entire start of file
+ // ... existing code ...
+ the change
+ // ... existing code ...
- Delete entire end of file

Overall this is pretty useless for displaying diffs, is reproducible with new installations with Cursor, with blank projects, in non-privacy mode, on the latest version.

Steps to Reproduce

This is the test file:

The prompt is:

Replace the line "  ? MergeRecordsRec<Rest, MergeTwo<Acc, First>>" with "? any"

Expected Behavior

I’d expect the diff to be minimal, and the ‘show code’ to show either just the new code, or a UI of ‘old and new’, not a textual ‘diff’ with a → denoting the change.

I’d expect the line change numbers to be consistent and not flicker.

Screenshots / Screen Recordings

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.7.33
VSCode Version: 1.99.3
Commit: a84f941711ad680a635c8a3456002833186c4840
Date: 2025-10-03T03:28:06.574Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.6.0

For AI issues: which model did you use?

Every model I’ve tried

  • gpt-5
  • gemini-2.5-pro
  • claude-4.5-sonnet
  • claude-4-sonnet
  • claude-4.1-opus

For AI issues: add Request ID with privacy disabled

9a3296fe-0a9e-45d1-ba0b-19be764f37c3

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Thanks for the detailed report, I’ve passed it on to the team.

I second this. It became extremely frustrating to work with large code files (1000+ lines) as the Edit windows in Ask chat mode are now showing entire file as “removed” (red wall) and only new lines as “added” leading to diff stuff like +7 -1130

Why its a problem? Just a couple of prompts and my IDE starts to freeze for 3-10 seconds to apply the code and everything becomes laggy until I manually close those editor snippets with minimize button”. I am on M2 macbook pro, so freezes/lags are abnormal to me in Cursor.

Thanks for the info. We’re investigating this.