Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
AI-generated code changes are immediately reverted on specific files in Cursor IDE. When the AI model attempts to make changes, they briefly appear and then disappear instantly. Instead of the intended fixes, unrelated formatting changes (additional indents) appear elsewhere in the same file.
This behavior only affects certain files consistently - the same files always exhibit this reverting behavior, while other files in the same project accept and retain AI changes normally. The issue was discovered while using Agent Review’s “fix in chat” feature, but may be unrelated to Agent Review itself and could potentially affect any AI chat code modifications. This issue occurs across different AI models.
The AI model attempted multiple approaches and eventually succeeded by using a Python script executed via terminal to directly read/modify/write the file. However, the successful changes were only visible through git diff, not in the IDE editor.
Steps to Reproduce
- Use AI chat to modify code (observed via Agent Review’s “fix in chat”, but likely reproducible through other AI chat interactions)
- AI suggests and applies code changes
- On affected files: changes appear momentarily then immediately disappear
- On affected files: unrelated indent changes appear in different parts of the file
- On unaffected files: changes work normally and persist as expected
- The same files consistently show this reverting behavior across multiple attempts
- AI may eventually succeed using alternative methods (e.g., Python script via terminal)
- Check git diff - changes may be present on disk but not visible in IDE
Expected Behavior
- AI-suggested changes should persist in all files equally
- No unrelated formatting changes should occur
- All files should behave consistently when receiving AI-generated modifications
- Changes should remain visible and saved unless explicitly reverted by the user
- Changes made to files should be immediately visible in the IDE editor
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2.3.35
VSCode Version: 1.105.1
Commit: cf8353edc265f5e46b798bfb276861d0bf3bf120
Date: 2026-01-13T07:39:18.564Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.0.0
For AI issues: which model did you use?
claude-4.5-opus-high, gpt-5.1-codex-max-xhigh
For AI issues: add Request ID with privacy disabled
8ef48165-2928-406d-8147-54f353db6faa
Additional Information
- Critical detail: Only specific files exhibit this behavior - it’s not random. The same files consistently revert AI changes while others work fine
- The reverting happens immediately after the AI applies changes
- Unrelated formatting changes (indents) appear in the affected files instead of the intended modifications
- The issue was observed during Agent Review usage but is likely not Agent Review-specific
- The issue persists across different AI models, indicating it’s not model-specific
- The AI model reported that search_replace and write tools kept reporting success but changes weren’t persisting. What finally worked was running a Python script via terminal that:
Read the file content directly from disk
Performed the string replacement in memory
Wrote the modified content back to disk - Even after successful modification via Python script, changes were only observable through git diff, not in the IDE editor
Does this stop you from using Cursor
Yes - Cursor is unusable