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
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.
I tested it a few times and it exits now. Still odd that it takes 30-55 seconds to do 2+2.
$ time agent -p 'what is 2+2?' --model composer-2-fast
**4**
beep boop 🤖
real 0m55.439s
user 0m3.070s
sys 0m1.078s
willy@workinux:~
$ time agent -p 'what is 2+2?' --model composer-2-fast
Four.
beep boop 🤖
real 0m36.261s
user 0m3.020s
sys 0m0.971s
willy@workinux:~
$ time agent --version
2026.05.05-84a231c
real 0m0.506s
user 0m0.611s
sys 0m0.077s