Skip to main content
Research

One attempt isn't enough: Letting coding agents try again changes the leaderboard

A lightweight evaluation method that better captures how coding agents perform in real-world iterative workflows.

by The Databricks AI Research Team

  • The way that agentic coding performance is typically benchmarked measures performance after a single agent pass, whereas most real-world workflows involve a human in the loop providing feedback.
  • We introduce a simple evaluation method that is more realistic and informative than the one-shot approach by telling the AI coding agent to simply try again.
  • This method of telling the coding agent to try again was found to increase the performance of models tested on the SWE Bench Live and Databricks Bench V2.

Coding agents have become a massive productivity multiplier for software engineering. At Databricks, merged PRs per engineer jumped ~5.3x over the past two years alongside widespread adoption of agentic coding tools.

PRs per engineer grew 5.3x over the past two years.

As coding agents become an increasingly important part of how we build software, we need better ways to measure and improve their performance. This is especially important at Databricks, where our research team is consistently iterating on new methods for products like Genie, our AI experience that helps users accomplish data-driven tasks, as well as Smart Routing in Unity AI Gateway, which automatically selects models for coding tasks to optimize performance and cost.

To effectively iterate on these systems, we need ways to measure how agents perform on representative tasks. Yet most evaluations only measure single-turn execution. Agents are typically given a codebase, environment, tests, and a prompt and graded on their first attempt. That tells us what an agent can solve in one-shot, but doesn’t capture its ability to recover when its first attempt fails. In practice, developers routinely ask agents to revise their work. It’s therefore important to evaluate how well agents can incorporate feedback, rethink their approach and fix their own mistakes.

Evaluating this behavior at scale typically requires creating a simulated environment to model this feedback loop. Most teams build this by using a second agent to act as a human in-the-loop and generate tailored, multi-turn critiques. However, this approach adds extra complexity and new failure modes. For example, the simulator must provide feedback without leaking ground-truth solutions or injecting variability and bias into the experiment.

Instead of building a complex simulatory to mimic human feedback, we tested a simpler approach: just ask the agent to try again when it fails. 

Introducing “Try Again” evaluation 

Humans rarely give up the first time the outcome isn’t what they want. Even when they can’t pinpoint exactly what went wrong, they can recognize that the result isn’t quite right and ask the agent to try again. This is what led us to introduce “Try Again” evaluation for coding benchmarks to approximate this interaction. 

"Try Again” Evaluation Protocol

“Try Again” evaluation, compared with the standard coding benchmark approach, and a real human workflow. As a proxy to a real human workflow, this evaluation technique automatically provides high level feedback “Not quite right, try again…” when the agent’s original solution doesn’t meet the desired bar.

Coding benchmarks are run normally, but if a model’s solution fails to pass a test, it is simply given the following feedback: 

We tell the agent how many checks passed, but not which ones failed or why, much like a user who knows the solution isn't right yet and asks the agent to try again.

That’s it, but it’s enough to improve pass rates by 50% or more. 

Experiments & results

We tested this approach on two coding benchmarks, SWE-bench-Live and Databricks Bench V2, using Codex and Claude Code agents powered by frontier models from OpenAI and Anthropic, respectively1. All models were evaluated using high reasoning effort. In these experiments, the agent is given up to five total attempts, continuing from its previous solution in the same workspace. Evaluation ends once the agent succeeds or exhausts its attempts. We report cumulative solve rate: the percentage of tasks successfully completed within the first N attempts.

We first evaluated on SWE-bench-Live, a benchmark where agents solve GitHub issues and are graded against tests from the ground-truth PR. For fast, reliable iteration, we curated 97 tasks whose ground-truth patches passed in three independent runs, filtering out flaky or ungradeable tasks.

Performance over N attempts on SWE-bench-Live

We also evaluated on an internal benchmark, Databricks Bench V2 (an extension of the original Databricks Bench), which consists of 100 tasks that we built at Databricks from internal coding agent usage. Each sample consists of an input prompt describing the user’s task, an environment including the repository commit and other relevant workspace files, and a rubric which is used to evaluate the agent’s performance on the task.

Performance over N=5 attempts on Databricks Bench V2

Running agents configured to “try again” on these benchmarks leads to a few key findings.

One-shot benchmarks can lead to different conclusions about which agents perform best

Model rankings can change when agents are given opportunities to revise their solutions. On SWE-bench-Live, Sonnet 5 initially outperforms GPT-6 Sol by nearly 10 percentage points. However, GPT-6 Sol improves over multiple attempts and ultimately overtakes Sonnet by 5 percentage points ahead. On Databricks Bench V2, iteration brings models closer together as performance begins to saturate. For example, GPT-6 Astra starts with a 9-11 point lead over both Sonnet 5.5 and GPT-6 Sol, but all three models converge to 95%-97% success by the fifth attempt.

These results highlight a limitation of one-shot evaluations: the model that's best at solving a problem on its first attempt isn't necessarily the best in iterative settings. This matters for both Genie Code and Smart Routing, where users routinely go back and forth with agents. Evaluating with “Try Again” helps us measure how well agents respond to feedback, allowing us to develop approaches that improve their performance in these settings.

Giving agents multiple attempts can substantially increase task success rate

Most agents' performance improves continuously over five attempts, highlighting their ability to recover from mistakes even with minimal feedback. On SWE-bench-Live, the GPT-6 configurations we evaluated solve approximately 55–67% more tasks by the fifth attempt than on their first attempt. Databricks Bench V2 starts from higher success rates, but the six agents still solve 8-23% more tasks by their fifth attempt. These improvements suggest that a single attempt can substantially underestimate what an agent is capable of accomplishing in an iterative coding session.

“Try Again” exposes successful and failed strategies for self-reflection

Even with little feedback regarding what went wrong, when agents re-examine the task and their own solution, they often discover overlooked edge cases or correct any overly broad assumptions from their earlier attempt. However, sometimes agents will simply go deeper into refining the wrong hypothesis and fail to recover. For example, on a format-detection task in SWE-bench-Live, the agent spent all 5 attempts improving how the code recognized CSV files, whereas the failing check tested to see how the code handled invalid inputs and therefore continued to fail after every attempt. This illustrates how agents can both succeed and struggle to diagnose and recover from their own mistakes, a behavior that “Try Again” evaluation helps us better understand.

Conclusion

Traditional coding benchmarks measure whether an agent can solve a task on its first attempt. But in practice, we rarely use coding agents this way. We ask them to revise their solutions, correct mistakes and keep working until the result meets our needs.

“Try Again” offers a simple way to extend benchmarks to approximate multi-turn coding sessions. Across two coding benchmarks, we find that this small change produces substantial improvements in solve rates and reveals differences in model performance that aren't apparent from one-shot evaluation. 

At Databricks, we use this evaluation technique as one of the tools in our evaluation toolkit, allowing us to iterate quickly on new methods for Unity Gateway Smart Routing and Genie Code to deliver the best possible performance and cost for our customers. To model richer feedback, user simulation remains another valuable tool that can be used when the additional complexity is justified.

We encourage other researchers and developers to adopt “Try Again” as a lightweight way to extend existing coding benchmarks to better evaluate agent performance in iterative settings. 

Authors: Krista Opsahl-Ong, Ivan Zhou, Erich Elsen


1We identified some cases of contamination on SWE Bench Live in some of the latest frontier models, so defaulted to using the last model versions where no contamination was detected. Because Databricks Bench V2 is an internal benchmark, we used all the latest frontier models in this evaluation.

Related tags:

AI Research and Security Threat Research

Get the latest posts in your inbox

Subscribe to our blog and get the latest posts delivered to your inbox.