Research

9 min read

How we measure an agent that finishes the work

Pass rates on toy benchmarks say little about real repositories. We built KestrelBench from 1,200 merged pull requests and grade whole tasks, not single edits.

Maya Okafor

Research lead

Most coding benchmarks ask a model to fix one function and check the output. That measures something, but not the thing our customers pay for. A model can pass every unit test in a toy task and still leave a teammate with a broken branch, a confusing diff and a review that takes longer than writing the code.

So we built KestrelBench: 1,200 tasks taken from pull requests that were actually merged in open source projects. Each task starts from the commit before the change, gives the agent the original issue, and grades the whole loop.

What we grade

A task only counts as finished when all four checks pass. We weight them equally, because a fast agent with a wrong plan costs more time than it saves.

  1. The plan names the right files and the right approach.

  2. The diff applies cleanly and builds.

  3. The existing test suite passes, plus any new tests the maintainers added.

  4. A reviewer, blind to who wrote it, would approve the pull request.

Abstract gradient illustration

Results

The clearest finding was about planning. Agents that wrote a plan before editing finished far more tasks, and the gap grew with repository size.

Setup

Small repos

Large repos

All tasks

Edit first, no plan

61%

28%

44%

Plan, then edit

74%

52%

63%

Plan, edit, run tests

81%

64%

72%

The plan is where a wrong assumption is cheapest to catch. One line in a plan becomes forty lines in a diff.

Maya Okafor, Research lead

How to run it yourself

The harness is open source. Point it at any agent that speaks the kestrel-task protocol and it will report pass rates per check.

pip install kestrelbench
kestrelbench run --agent ./my-agent --split large --report results.json
pip install kestrelbench
kestrelbench run --agent ./my-agent --split large --report results.json
pip install kestrelbench
kestrelbench run --agent ./my-agent --split large --report results.json

What comes next

We are adding tasks from private repositories, with permission, and a fifth check for how readable the final code is. We will publish the next results in February.

Create a free website with Framer, the website builder loved by startups, designers and agencies.