Cold start cursor cli headless mode slow

I’m using Cursor Agent P in headless mode to build a web-based multi-turn conversation feature.

Currently, each turn starts a new Cursor process, which causes a cold start delay of about 20 seconds.

This results in a poor user experience because users have to wait for every turn.

Is there a more efficient approach to keep the process warm or avoid restarting it for each

have you experimented with --resume ?
the agent is a node js application - you can ask cursor to modify it if you want to get your hands dirty, so you could then hook into the IO of an agent process that stays running…

another idea - I think there’s 2 or 3 hooks that the agent kindof half obeys - maybe you could write a hook that deliberately blocks until the user starts talking?

This may likely be match for Ideas > Feature Requests instead of help.

Also curious @cyril.xie why it would take 20 sec for agent to start? For me its instant.