Reconnecting loop error for headless cli

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

Same here on my end. Though it was related to OpenaAI API issues but seems to be the same for Gemini 3.5 and Composer 2.5

@kevinn @Colin

please help!! @mohitjain @Colin @kevinn @deanrie

@Shah_Neel Per our guidelines, please do not tag folks who are not already involved in a thread.

While I can’t reproduce locally, this is likely related to the ongoing service degradation.

Could you try a different model (for example, adding --model=gpt-5.5 to your request)?

@adamklepacz92 It doesn’t look like you’re working in the CLI. If you’re still facing an issue following the resolution of the mentioned incident, please raise a new thread and include a Request ID.