--plan flag in CLI executes changes instead of planning only

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

running cursor agent -p --trust --plan creates and modifies files instead of just outputting a plan. in headless mode with -p (print), the agent executes the plan and writes to disk even with --plan set.

this matters for anyone using plan mode in CI/CD pipelines or automation scripts expecting dry-run behavior.

Steps to Reproduce

  1. create a directory with a .cursor/rules/ .mdc rule (alwaysApply: true)
  2. run: cursor agent -p --trust --plan "Create a simple hello.js file with a hello world function"
  3. check the directory after execution
  4. hello.js exists on disk (102 bytes), even though --plan should only produce a plan

Expected Behavior

--plan should output the plan without executing it. no files should be created or modified.

Operating System

Linux

Version Information

CLI Version 2026.02.13-41ac335

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey Ned!

Thanks a lot for reporting. This is a known issue we’re tracking and I’ve added your report.