Cursor · tool · fg-0512
Cursor CLI agent -p finishes but leaves the files unchanged
The final answer describes edits, but git diff is empty
Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100
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"
Affects: Cursor CLI (agent), as of 2026-10
Sources
Have your agent know this before it fails
claude mcp add --transport http footgun https://getfootgun.com/api/mcp