When in agent mode, it was my understanding that switching the “Auto-Run” mode to “Ask Every Time” would make the agent “stage” changes, so to speak, and have me either accept decline them, specifically when executing file writes.
Instead, even with the setting turned on, Cursor executes file writes without asking. On top of that, it auto-saves as well.
Undoing does not work.
Steps to Reproduce
Go to settings
Go to “Agents”
Scroll down to “Auto-Run” mode
Switch drop-down option to “Ask Every Time”
Attempt to get an agent to edit a file in “Agent” mode
Observe file writes without being asked to accept
Expected Behavior
I should be asked if I want to accept or decline the changes corresponding to my prompt
Thanks for the detailed report. I can see how this is confusing – the “Auto-Run” setting name implies it controls all agent actions, but it’s actually scoped to terminal commands and MCP tool calls only.
Here’s how file edits work in agent mode:
The agent applies edits to your files directly, and Cursor then shows you inline diffs (green/red highlighting) for each changed file
You can accept or reject those changes using the review buttons that appear in the editor and the chat panel
The “Auto-Run: Ask Every Time” setting controls whether the agent needs your approval before running terminal commands (like npm install, git commit, etc.) – it doesn’t gate file edits
A couple of follow-up questions to make sure everything is working as expected:
Are you seeing the inline diffs at all? After the agent makes edits, do you see green/red diff highlighting in the affected files with accept/reject buttons? If not, that would be a separate issue worth investigating.
When you say “Undoing does not work” – are you referring to the accept/reject buttons, or to Ctrl+Z in the editor?
the “Auto-Run” setting name implies it controls all agent actions, but it’s actually scoped to terminal commands and MCP tool calls only.
I don’t understand this comment. This is directly off of Cursor’s documentation (and the settings item itself):
I’d expect “file writes” to be exactly what I explained: the agent writing code or text or whatever, into the respective files, and not asking me if I want to accept or reject.
Are you seeing the inline diffs at all? After the agent makes edits, do you see green/red diff highlighting in the affected files with accept/reject buttons? If not, that would be a separate issue worth investigating.
Yes, among not being able to accept/reject each separate change, I also do not see the diffs at all.
When you say “Undoing does not work” – are you referring to the accept/reject buttons, or to Ctrl+Z in the editor?
CTRL + Z does not undo whatever edits an agent did in my file.
Thank you for the correction. You’re absolutely right: the setting description explicitly includes “file writes,” so your expectation is completely valid. I’ll flag this with our team so the behavior is adjusted to match what’s described (or the description is updated to be clearer).
The bigger issue here is that you’re not seeing inline diffs at all after the agent makes edits. That’s not expected. Regardless of how the Auto-Run setting works, you should always see green/red diff highlighting in the editor with the ability to accept or reject each change. The fact that diffs aren’t appearing is a known bug that our team is actively investigating. Other users have reported similar behavior (see this thread for context).
Regarding Ctrl+Z not undoing agent edits: the recommended way to revert agent changes is through Checkpoints, which automatically snapshot your workspace before the agent starts editing. You can restore to any checkpoint from the chat panel.
A couple of things that would help us narrow this down:
Check Developer Tools for errors:Help > Toggle Developer Tools > Console tab. Right after the agent edits a file, look for any errors starting with [composer]. If you see any, sharing those here would help our team diagnose why diffs aren’t rendering.
Use Checkpoints as a workaround for now: after any agent action, you can click the restore icon next to the checkpoint in the chat panel to roll back unwanted changes.
Sorry again for the initial confusion, and thanks for flagging this.
You mentioned this bug is being actively investigated, is there anywhere we can track progress and/or be notified when the issue is resolved other than checking here daily? The thread you mentioned has already been closed.
I would add to all of the above that for me the behaviour of Cursor seems even more unpredictable: for example, sometimes for small files changes made by an agent, the inline diff appears, and sometimes doesn’t (with no discernable pattern).
Likewise I will sometime see the “review next file” button appear after an agent has made some file changes, but pressing it will open a file that was not modified by the agent, instead it will ask me to accept/reject some changes that were part of a previous commit entirely.