Expanding our long-running agents research preview

5 min readadvanced
--
View Original

Overview

Cursor has expanded its long-running agents research preview to all Ultra, Teams, and Enterprise users, enabling autonomous AI agents that can work on ambitious coding tasks for hours or even days. The agents use a custom harness with planning-before-execution and multi-agent verification to produce substantially larger PRs with merge rates comparable to shorter-running agents, representing an early milestone toward self-driving codebases.

What You'll Learn

1

How long-running AI agents differ from synchronous agents in producing larger, more production-ready code

2

Why planning before execution is critical for autonomous agents working on long-horizon tasks

3

How custom agent harnesses address frontier model limitations like losing track of context and partial completion

4

When to delegate tasks to long-running agents versus working interactively with synchronous agents

5

How multi-agent verification enables more thorough and reliable autonomous code generation

Prerequisites & Requirements

  • Familiarity with AI-assisted coding tools and agent-based development workflows
  • Cursor IDE with Ultra, Teams, or Enterprise subscription
  • Understanding of pull request workflows and code review processes

Key Questions Answered

What are Cursor's long-running agents and who can use them?
Cursor's long-running agents are autonomous AI agents that work on ambitious coding tasks for extended periods (hours to days) without human supervision. They are available as a research preview at cursor.com/agents for all Ultra, Teams, and Enterprise users. They use a custom harness that enables agents to handle more difficult work and see it through to completion.
How do long-running agents compare to synchronous coding agents?
Long-running agents produce substantially larger PRs with merge rates comparable to other agents. They are more thorough in their approach and write more production-ready code. Unlike synchronous agents that may fix a bug quickly, long-running agents go further to find edge cases, fix similar occurrences, and create high-coverage tests, as demonstrated in direct comparisons using the same model.
What types of tasks can long-running AI agents complete autonomously?
Long-running agents can handle large features, complex system refactors, challenging bug fixes, performance overhauls, and high-coverage test creation. Example tasks include building an entire chat platform (36 hours), implementing a mobile app from a web app (30 hours), refactoring authentication and RBAC systems (25 hours), migrating a video renderer to Rust, and implementing network policy controls producing 10,000+ line PRs.
Why do frontier AI models fail on long-horizon coding tasks?
Frontier models fail in predictable ways on long-horizon tasks: they forget the big picture of their task, lose track of what they're doing, or stop at partial completion. Additionally, a slightly wrong assumption can compound into a completely incorrect solution when the agent works autonomously without tight prompt-response feedback loops to nudge it back on course.
How does Cursor's agent harness make AI models more capable for long tasks?
Cursor's harness applies two key principles: planning before execution (agents propose a plan and wait for approval before coding, reducing follow-up work) and following through on tasks (using a plan and multiple different agents checking each other's work to maintain focus on larger, more complex tasks). This custom scaffolding leverages the strengths of different frontier models.
What is the vision for self-driving codebases at Cursor?
Self-driving codebases represent a future where agents handle more work with less human intervention. Cursor is working on improving collaboration across long-running agents so they can break up bigger projects into parallel work streams. They are also developing new tools to handle the volume of generated code and new approaches to deploying that code to production safely as code generation costs fall.
How long do Cursor's long-running agents typically run on tasks?
Long-running agents commonly ran for more than a day, with specific examples including 36 hours for building a chat platform, 30 hours for implementing a mobile app, 25 hours for refactoring an auth system, and up to 52 hours for infrastructure tasks. Users can step away, close their laptop, and return to working solutions without needing to monitor the agent.

Key Statistics & Figures

Chat platform build runtime
36 hours
Building an all-new chat platform integrated with an existing open-source tool
Mobile app implementation runtime
30 hours
Implementing a mobile app based on an existing web app
Auth system refactoring runtime
25 hours
Refactoring an authentication and RBAC system
Infrastructure task runtime
52 hours
Large infrastructure task producing a PR with 151k lines of code
PR size for infrastructure task
151,000 lines of code
Single PR produced by a long-running agent for an infrastructure project
Network policy PR size
10,000+ lines
PR for JSON-driven network policy controls and local HTTP proxy for sandboxed processes

Technologies & Tools

Some links below are affiliate links. We may earn a commission if you make a purchase.

IDE/Development Tool
Cursor
AI-powered code editor hosting the long-running agents feature
Programming Language
Rust
Target language for video renderer migration and optimization
CLI Tool
Cursor CLI
Command-line interface that received sudo support implementation from a long-running agent
AI Model
Codex 5.3
Frontier model used in comparison testing between local and long-running agent approaches
Desktop Framework
Tauri
Desktop application framework mentioned in context of experimental agent tasks
Embedded Browser
Cef
Chromium Embedded Framework mentioned as being integrated into Tauri via agent experiments

Key Actionable Insights

1
Implement planning-before-execution patterns in your AI agent workflows. Long-running agents that propose a plan and wait for human approval before executing produce better results because upfront alignment reduces costly follow-ups and prevents compounding errors from wrong assumptions.
This is especially important for autonomous agents working on tasks longer than a few minutes, where a small initial mistake can cascade into a completely incorrect solution.
2
Use multi-agent verification where different agents check each other's work to maintain quality on complex tasks. This approach helps agents follow through on larger tasks without losing track of the big picture or stopping at partial completion.
Frontier models alone tend to forget context on long-horizon tasks. The multi-agent checking pattern addresses this fundamental limitation of current models.
3
Consider delegating quarter-long projects to long-running agents by breaking them into well-specified tasks. Research preview participants reported compressing entire quarter timelines into days, with the ability to run multiple agents in parallel on different projects simultaneously.
Best suited for tasks like feature implementation, system refactoring, performance optimization, and test creation where the requirements can be clearly specified upfront.
4
Build model-specific harnesses rather than generic agent frameworks. Cursor found that working with every frontier model and building custom scaffolding for each produces better results because different models have different strengths that can be specifically leveraged.
A generic one-size-fits-all approach to agent scaffolding misses optimization opportunities. Invest in understanding each model's capabilities and failure modes.
5
Prepare for a shift in engineering workflows where code review of large agent-generated PRs becomes a primary activity. As long-running agents produce PRs with tens of thousands of lines, teams will need new tools and processes for reviewing and safely deploying AI-generated code.
Cursor is actively developing tools to handle the volume of code being generated and new approaches to deploying it safely to production.

Common Pitfalls

1
Letting AI agents execute immediately without upfront planning on long-horizon tasks. When iterating directly with tight prompt-response loops, you can nudge the agent back on course, but when an agent works autonomously, a slightly wrong assumption can compound into a completely incorrect solution by the end of a long task.
Require agents to propose a plan and wait for approval before execution. Upfront alignment dramatically reduces the need for costly follow-ups and rework.
2
Expecting frontier models to maintain context and follow through on complex tasks without additional scaffolding. Even the most capable models can forget the big picture, lose track of progress, or stop at partial completion when working on large tasks.
Use custom harnesses with multi-agent verification patterns where different agents check each other's work to ensure task completion and quality.
3
Using a generic agent harness for all models instead of building model-specific scaffolding. Different frontier models have different strengths and failure modes, and a one-size-fits-all approach fails to leverage these differences effectively.
Invest in understanding each model's capabilities and build custom scaffolding that leverages the specific strengths of each model for optimal performance.
4
Underspecifying tasks given to long-running agents. Since follow-up work on merged PRs consisted mainly of changes not specified in the initial request, the quality of the initial task specification directly determines how complete and useful the output will be.
Be thorough in your initial task description. Long-running agents will execute exactly what you specify but may miss requirements you didn't mention.

Related Concepts

AI Agent Scaffolding And Harness Design
Self-driving Codebases
Multi-agent Systems And Verification
Long-horizon Task Planning
Autonomous Code Generation
Agent Parallelization
Code Review For Ai-generated Prs
Frontier Model Capabilities And Limitations
Sandboxed Code Execution
Production-ready Code Generation