Cursor CLI: at least ask before code change?

I wonder why cursor cli allow code updates directly without ask for permission? I remember cursor agent does ask before take any action, but why cursor agent behave differently?

In both the CLI and IDE agent can change code directly. Also can it be that you enabled Auto-run in the CLI as well?

1 Like

cli does stop to ask before run any command though. but directly apply code changes is quite weird no? or at least provide an option for this?

It’s expected that code is edited directly. Running commands is different as it may remove critical info by accident and you are in control of approving commands.

For code, assuming you use git it can be restored easily

1 Like

what if I have uncommited changes? how could code edit directly be a feature not bug :sweat_smile: is there any other code cli tool that changes code without asking?

Sorry to bump an old thread, but I have the same exact question, only in my case, the situation is a bit worse, I’m using multiple subagents with orchestration, and sometimes subagents (using lower quality models) will make hidden changes to bypass pre-commit hooks and other linter checks (they instinctively add ignore rules), this allows them to commit garbage, usually without the user noticing/or noticing much later (eg. after a couple of commits). I also generally don’t like the fact that the agent just edits files on a whim, sometimes it will update documentation or other related files I never told it to touch (I know this could be improved with rules), with edit approval I could stop it on it’s tracks before the situation gets worse, also it’s hard to get the agent to understand what changes you want it to undo and what to keep (you need a very well crafted, usually very long prompt to get it to correctly undo the mess without changing what you actually want).

This can also be very dangerous when running tools as the agent is always free to edit configuration files.

Generally the cursor cli feels frustrating when videcoding (even when creating a detailed plan before execution).

FYI: I’m currently evaluating cursor for enterprise use.