Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
When trying to use headless mode in cursor cli, It hangs and then gives me a reconnecting loop.
Connection lost, reconnecting (attempt 1)…
Retry attempt 1…
Connection lost, reconnecting (attempt 2)…
Retry attempt 2…
Connection lost, reconnecting (attempt 3)…
Retry attempt 3…
Connection lost, reconnecting (attempt 4)…
Retry attempt 4…
When i use non headless mode it works fine and when i check agent status, im logged in correctly.
Steps to Reproduce
this is the command i used to test headless mode
agent -p --output-format stream-json “Say hello”
Expected Behavior
It is supposed to give me an actual output
Operating System
MacOS
Version Information
CLI Version 2026.06.02-8c11d9f
Model Composer 2.5 Fast
Subscription Tier Enterprise
OS darwin (arm64)
Terminal vscode
Shell zsh
For AI issues: which model did you use?
composer-2.5-fast
Does this stop you from using Cursor
Yes - Cursor is unusable
