Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Cursor’s agent seems to have a SIGNIFICANT problem understanding the concept of “move.” It is my general preference that existing code, if it needs to be somewhere else, that it is MOVED, or even copied and pasted, as is, without modification.
However, when I give even simple prompts to move code or move a file, the agent ALWAYS seems to resort to generating an entirely new file, often quite different in terms of contents, from the original, then deleting the original. This is a HORRIBLE practice!! It is dangerous, often quite destructive (especially when talking about uncommitted files in git), and should not be the default mode of operation for the agent.
When the user requests that code or a file be MOVED, it should be moved. As in, the original contents, copied and pasted exactly as-is, without change, into a new location…or if its a file, the file should literally be moved. When in a git repository, a file move, if it has been previously committed, should be moved with git mv
to preserve file history, and if it is an uncommitted file then the file should be moved with the standard mv
command.
The primary concern here is that, when the agent+llm REGENERATE a file/code, its a NEW file/NEW code, in the destination location, and due to the probablistic, non-deterministic nature of LLMs, the recreation is never the same as the original.
Non-determinism in models, is a critical factor that should be avoided in certain operatoins at all costs. MOVING code, files, heck any content not necessarily even code (i.e. documentation, regular text content) is one of the things that should really be done in as strictly a DETERMINISTIC manner as possible. Arbitrarily rewriting code or other content, files, etc. that have already been vetted, verified and tested, is a terrible practice in general, however it seems to be the fundamental modus operandi for Cursor (and other agentic and LLM powered coding tools).
I think for tools like Cursor to be truly viable in the long term, they need to start acquiring capabilities to perform certain key operations as deterministically as possible. Moving code/content/files is a critical one. (Refactoring is another, and I think I have another bug report or perhaps feature request about that.)
Steps to Reproduce
Request the agent move a file, or a specific set of code (i.e. line selection) to some other location.
Weep as the code you are purposely trying to PRESERVE is detroyed when the agent instead, CREATES a new file, generates arbitrarily different content (even if it sorta does the same job/serves the same purpose), then DELETES your original!!!
Expected Behavior
When file/code/other content is asked to be MOVED, it should be MOVED. NOT regenerated differently and the original nuked (often irrecoverably!)
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 1.4.5 (Universal)
VSCode Version: 1.99.3
Commit: af58d92614edb1f72bdd756615d131bf8dfa5290
Date: 2025-08-13T02:08:56.371Z
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.5.0
Does this stop you from using Cursor
No - Cursor works, but with this issue