Cursor · tool · fg-0512

Cursor CLI agent -p finishes but leaves the files unchanged

If you see The final answer describes edits, but git diff is empty, the cause and the fix for Cursor are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
The final answer describes edits, but git diff is emptyA batch script over many files exits 0 and changes nothing
Cause
In print mode the CLI only proposes changes unless --force (or --yolo) is passed, so non-interactive runs do not write files by default.
Fix
Add --force for runs that should write, and scope what runs unprompted with permissions allow and deny lists in cli-config.json or .cursor/cli.json.
Apply
agent -p --force "Add JSDoc comments to src/utils.ts"
Affected
Cursor CLI (agent), as of 2026-10
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun