Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
When the Agent uses StrReplace / Apply / Write on a file larger than 8 MiB, Cursor rewrites the entire file instead of applying a surgical patch, then silently truncates the write at exactly 8 MiB (8,388,608 bytes). The tool still reports success.
Evidence from a Unity .unity scene (~12.0 MB / 452,917 lines):
- Intended change: rename one line (
Main Camera→Main Camera_CURSOR_TEST, +12 bytes) - Resulting file size: exactly 8,388,620 bytes = 8,388,608 + 12
- File truncated mid-token (
m_LocalPositiocut fromm_LocalPosition) - Line count dropped ~452,917 → ~303,584
- git diff: +2 / -149,334
- UI review bar previously showed ~+303k / -452k and Cursor became unstable/crashed
Control: same one-line edit via sed → 1 insertion / 1 deletion, file remains intact at full size.
This is silent data corruption on large files (common with Unity scenes/prefabs).
Steps to Reproduce
- Open a project with a text file larger than 8 MiB (e.g. a Unity .unity scene ~12 MB).
- Ask the Agent to make a tiny one-line change using file edit tools (StrReplace), not an external MCP.
- Let the edit apply (or watch the review bar).
- Check file size / tail / git diff:
- Final size ≈ 8,388,608 + net byte delta of the edit
- File ends mid-line / truncated
- Huge deletions despite a 1-line intent
- Compare with the same edit via sed/perl: surgical 1-line diff, file intact.
Operating System
MacOS
Version Information
Version: 3.12.30
VS Code Extension API: 1.128.0
Commit: 63a2996a10d9e476b6c28e951dd7691d9c0cf480
Date: 2026-07-21T22:50:03.568Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin arm64 25.5.0
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor