Cursor-agent -p hangs with zero output on 2026.07.01-41b2de7 (macOS Intel) — all output formats, even trivial prompts

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

cursor-agent -p (print/headless) hangs indefinitely with zero bytes on stdout/stderr. Auth is fine (cursor-agent status shows logged in). On longer runs (8+ min) ripgrep child processes start but no output is ever emitted.

Steps to Reproduce

Inside a git repo workspace:

cursor-agent -p --force --output-format text “Reply with just OK”

Also tried: --trust -p, stream-json, stdin closed (< /dev/null), trivial and real prompts — all identical (0 bytes, hang).

Expected Behavior

Command prints model response to stdout and exits.

Operating System

MacOS

Version Information

CLI:
cursor-agent 2026.07.01-41b2de7 (cursor-agent update → Already up to date)

OS: macOS 15.6 (Darwin 24.6.0), Intel MacBook Pro

Additional Information

Likely root cause (from related forum reports + our case): TCP connections to Cursor’s API backend hang silently with no output. Other users self-recover after 10–15s; our case persists 5+ min with zero bytes.

Possibly related: cursor-agent worker from desktop app running concurrently (forum topic 142677).

Impact: headless/scripted use completely broken (nightly cron agent produces nothing).

Similar: topics 150246 (closed), 132641.

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the detailed report.

  1. Seeing 0 bytes with --output-format text is already telling. text is a real-time format, it should stream short action descriptions from the agent as it runs, not dump everything at the end. Dumping at the end is what --output-format json does. So if nothing comes through at all with text, it looks like a transport stall from the very first token. The agent is hanging even before model resolution or connect.

  2. For deeper debugging, run stream-json. It outputs NDJSON events like init and user lines, plus the request_id. That makes it clear where it gets stuck:

cursor-agent -p --output-format stream-json "Reply with just OK"

If you also get 0 bytes from the start here, that confirms a client-side connect or HTTP2 transport stall. Things to check:

  • Switch to HTTP/1.1 in network settings, disable HTTP/2
  • Turn off VPN if you have one
  • If you’re behind a corporate proxy, set HTTPS_PROXY and HTTP_PROXY. CLI streaming transport has historically not picked them up
  1. Run with --debug and send the Request ID here:
cursor-agent -p --debug --output-format stream-json "Reply with just OK"

The Request ID lets us trace your specific case on the backend. Also let me know if you’re on a VPN or behind a corporate proxy.

This symptom matches a known cluster of transport issues on the headless CLI. I can’t share an ETA for a fix yet. With the Request ID and the answers above, we can narrow down your case.