Recommendations for long running agents

We’re about to run an experiment with long running agents and I’d be curious to hear people’s or Cursor’s team experience with this so we can have a higher chance of actually using what gets produced with it.

We’re planning on doing a major refactor and have the output match one for one and just change the underlying code so that we can more easily iterate on it later. We also expect that it will be easier for the model to verify itself if it has a baseline to compare against.

What kind of instructions/guidelines should we include or not include in the initial prompt? Anything you found that we should be careful of? Any other advice relating to long running agents?

Thanks!

Hi @raphael-yapla You may be interested in these blog posts we put up earlier this year! I’m sure some things have changed since then, but you may nonetheless find it interesting! Remember to start small and iterate before moving on to the longer-running agents.
Best of luck!

Here are the relevant blog posts:

Thanks for the recommendations @kevinn!

Are some of your findings from your experiments already included in a special harness when executing a long running agent or are we expected to build that harness from scratch within our initial prompt?

Hi @raphael-yapla You can use “Long-running” mode on Cursor Cloud agents at https://cursor.com/agents. This mode is also called “Grind” mode and we are considering renaming it to “Goal” mode.

This is available with a subset of models, and it is in Research Preview. It is also fairly token hungry so just be aware of that before you kick it off. A well crafted prompt on a difficult task can run for hours or more!

A one-for-one baseline is useful, but for a multi-hour refactor I would also make every checkpoint name the commit SHA, exact tests, preserved invariants, and the next safe resume point. We found long runs became hard to recover when only the chat remembered what had already been verified. Does Long-running mode persist that evidence across restarts, or mainly the conversation state?

@kevinn I see that this workflow was updated today in favour of a /goal skill. I’m surprised that there’s no mention of subagents in the skill, it doesn’t look like it follows the finding posted on your blog: Towards self-driving codebases · Cursor

Are we expected to bring our own harness for big goals?