Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
execute this command, after finishing reviewing, the agent not stop.
agent -f "please code review the latest commit"
Steps to Reproduce
execute this command
agent -f "please code review the latest commit"
Expected Behavior
- finishing the task , the agent should stop.
- Use case: Automating code execution (cr), no need user interaction
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2026.01.09-231024f
For AI issues: which model did you use?
auto
For AI issues: add Request ID with privacy disabled
no
Additional Information
no
Does this stop you from using Cursor
Yes - Cursor is unusable
deanrie
(Dean Rie)
3
Hey, thanks for the report. Looks like you’re using the wrong flag for automation.
The -f (force) flag is for auto-approving permissions, not for headless mode. For non-interactive automation you need -p (print mode):
agent -p --force "please code review the latest commit"
-p enables non-interactive mode (prints the result to the console and exits)
--force lets the agent make changes without confirmation
Without -p, the agent starts in interactive mode and waits for more commands.
More automation examples: Using Headless CLI | Cursor Docs
Try it with -p, it should work. If it still hangs, let me know.
1 Like
system
(system)
Closed
4
This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.