Agent CLI stuck on loop

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

When using the agent with the first prompt option, the agent is stuck on a infinite loop where it keeps giving the same prompt one after another
For example, if i just want to make some conversation:
agent "Hi cursor, how are you?"

It gaves a result, then makes the same prompt over and over.

Steps to Reproduce

Use agent "some prompt" and it should loop over and over again

Expected Behavior

Just use the first prompt, show the result and wait for another input from the user.

Screenshots / Screen Recordings

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.3.35 (Universal)
VSCode Version: 1.105.1
Commit: cf8353edc265f5e46b798bfb276861d0bf3bf120
Date: 2026-01-13T07:39:18.564Z (2 days ago)
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.2.0

For AI issues: which model did you use?

Composer 1, Auto.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. This is a known issue with the CLI in non-interactive mode, and the team is working on a fix.

Workaround: use interactive mode. Just run agent with no arguments, then enter your prompts one at a time.