Cursor-agent --print doesn't exit after completing

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

cursor-agent --print returns output correctly but the process never exits. The worker subprocess continues running after the task completes, requiring manual termination or a timeout wrapper.

Steps to Reproduce

~/.local/bin/cursor-agent --print text “what is 2+2” --model grok

Expected Behavior

Process prints response and exits.

Operating System

Linux

Version Information

CLI Version 2026.01.28-fd13201
Model Grok
OS linux (x64)
Terminal konsole
Shell bash

Additional Information

  • Happens with all models tested (grok, gemini-3-flash)
  • --list-models works fine and exits normally
  • Did some strace debugging - looks like a worker subprocess keeps running after the main task completes

Happy to provide more details or logs if helpful.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed strace report, it’s really helpful.

This looks like a known type of issue with the CLI hanging. I’ve shared it with the team.

For now, the timeout workaround is the best option. If you spot anything interesting in the strace output, like which exact subprocess is stuck, drop it here, it could help with debugging.