Claude Code benchmark with and without Besydr: 30 runs on five Python projects

Besydr (say: besider) is a program that runs beside a coding agent. It learns rules from your corrections, adds the ones that fit to later requests, and checks finished work against your request. Until now this site said that none of it was measured. This post is the measurement: a Claude Code benchmark.

We ran Claude Code through the same work with and without Besydr: 30 runs, three scenarios, two models. The short version:

  • A rule told once is kept in every project. Without Besydr the agent broke rules from earlier sessions 45 times in 96 requests. With Besydr: 4 times.
  • The developer corrects less. One correction about every 2 requests without Besydr, one about every 9 with it.
  • On long, hard sessions the agent says "done" too early half as often. 11 times against 5.
  • It costs less and takes longer. The Claude Code cost per request, at API prices, was 10% to 20% lower. The agent worked 18% to 25% longer.
  • In a single project it did not help. Claude Code's own memory already kept every rule there, and Besydr doubled the agent's time on small tasks.

Bar chart, five projects, how often in 100 requests. Rules from an earlier session broken: 47 times alone, 4 with Besydr. Corrections the developer typed: 47 and 11. Said done while hidden tests failed: 6 and 3. Unsolved after two corrections: 5 and 0.

The rest of this post says how the benchmark works, gives every number, and lists what we had to fix along the way.

How the coding agent benchmark works

A program plays a developer. It gives the agent one request at a time, in the developer's own words, and holds the agent to a set of rules. The agent is Claude Code, run without a person, in a Docker container. Each run is a sequence of sessions, and each sequence runs in its own fresh container, so nothing carries from one run to the next: not Besydr's lessons, not Claude Code's own notes.

The requests are real changes. Each request asks for what one real commit of an open-source project did. The projects are pytest, click, anyio, cattrs and tox. The pytest changes were made after the model's training cutoff, so the model cannot have read the real fix.

Hidden tests judge the work. The tests of the real commit are the judge. The agent never sees them. When the agent hands its work back, the harness runs those tests.

The developer has rules and states each one once. For example:

  • "Do not run the whole test suite, it takes too long. Run only the test files that cover your change."
  • "Do not install anything, not even the project itself in editable mode."
  • "Keep your final message to three lines at most."

Programs check each rule on every piece of work: which commands the agent ran, which files it changed, how long its final message is.

The developer corrects, at most twice. If a rule is broken, the developer repeats that rule. If the hidden tests fail, the developer writes one fixed sentence that names no test: "It still does not do what I asked. Read my request again, check the behaviour I described, and fix it." The texts are the same in every setup.

Diagram of one request: the developer asks, Claude Code works, programs check, the developer corrects. A correction sends the agent back to work, at most twice per request.

Every setup is run several times. A model answers differently each time. The main setups were run three times and the others twice. Each number below is the mean of those runs, with the lowest and highest run in brackets. Things that happen are counted per 100 requests: 47 means it happened 47 times in 100 requests. Cost and time are given per request. A difference that sits inside the brackets is not a result.

Three scenarios:

Scenario What the developer does Requests
Five projects Works on five projects in ten sessions of 2 to 4 requests. Personal rules are told once, in the first project. 32
One project Works on anyio in eleven short sessions. 21
Long sessions Works on pytest in two sessions of 18 and 16 requests. The conversation is compacted into a summary nine times. 34

The agent model was Opus 5.5. The five-project scenario was repeated on Sonnet 5.5. Besydr used the same two models of its own in every run.

Five projects: rules told once to Claude Code are kept everywhere

Per 100 requests Claude Code alone With Besydr
Rules from an earlier session broken 47 [44 to 50] 4 [3 to 6]
Corrections the developer typed 47 [41 to 50] 11 [9 to 13]
Said done while hidden tests failed 6 [6 to 6] 3 [0 to 6]
Unsolved after two corrections 5 [3 to 6] 0 [0 to 0]
Client cost per request $1.24 [1.16 to 1.30] $0.99 [0.98 to 1.00]
Besydr model calls per request none $0.010
Minutes per request 1.90 [1.88 to 1.92] 2.25 [2.14 to 2.38]

Counted over the three runs of each:

  • Rules from an earlier session broken: 45 times alone, 4 times with Besydr. That is in 34 of the 96 requests alone and in 4 with Besydr, because one request can break two rules.
  • A personal rule the agent had heard only in another project: broken in 45 of 225 chances alone, in 4 of 221 with Besydr. A chance is one such rule at one request.
  • Corrections: 45 alone, 11 with Besydr.
  • Requests still unsolved after two corrections: 5 alone, none with Besydr.

Why the agent alone breaks so many rules is visible in what it keeps. Claude Code's memory is a set of notes it writes itself, filed per project. In the first project the developer says "run only the test files that cover your change", and Claude Code saves that. In the next project the note is not there, so the agent runs the whole suite, is corrected, and saves the note again for that project. Besydr stores the rule once for the developer and adds it wherever the task fits.

The false "done" row is lower on average with Besydr, but the brackets overlap, so this scenario does not establish that difference. The long sessions below do.

The same on Sonnet 5.5

Per 100 requests Claude Code alone With Besydr
Rules from an earlier session broken 52 [50 to 53] 3 [3 to 3]
Corrections the developer typed 59 [56 to 63] 27 [19 to 34]
Said done while hidden tests failed 8 [6 to 9] 9 [9 to 9]
Unsolved after two corrections 5 [3 to 6] 3 [3 to 3]
Client cost per request $0.42 [0.36 to 0.49] $0.41 [0.38 to 0.45]
Minutes per request 1.13 [0.93 to 1.34] 1.36 [1.26 to 1.46]

The effect on rules is the same size: 33 times in 64 requests against 2. Corrections halve. With Sonnet more of the corrections are for failing tests, which learned rules do not touch. There is no gain on false "done" or on cost.

Long sessions: fewer false "done", fewer unsolved requests

Per 100 requests Claude Code alone With Besydr
Corrections the developer typed 23 [18 to 29] 11 [9 to 12]
Said done while hidden tests failed 11 [9 to 15] 5 [3 to 6]
Unsolved after two corrections 8 [6 to 9] 3 [3 to 3]
Hidden tests failing at the end, per run 7 [6 to 8] 3 [1 to 5]
Rules broken after a compaction 1 [0 to 4] 0 [0 to 0]
Client cost per request $8.13 [7.43 to 9.10] $7.32 [7.18 to 7.42]
Minutes per request 2.45 [2.36 to 2.58] 3.07 [2.93 to 3.32]

Counted over the three runs of each: 23 corrections alone and 11 with Besydr, 11 false "done" against 5, 8 unsolved requests against 3. None of the brackets overlap.

Bar chart, long sessions, how often in 100 requests. Corrections the developer typed: 23 alone, 11 with Besydr. Said done while hidden tests failed: 11 and 5. Unsolved after two corrections: 8 and 3.

One thing this scenario was built to show did not show. Both setups keep the rules of a session through each compaction of the conversation. Without Besydr, a rule told ten or more requests earlier was broken in 0 of 96 chances. Claude Code holds a rule of the current session by itself, so Besydr has nothing to add there.

One project: no gain

Per 100 requests Claude Code alone With Besydr
Rules from an earlier session broken 0 0
Corrections the developer typed 5 5
Said done while hidden tests failed 0 0
Client cost per request $0.36 [0.35 to 0.37] $0.46 [0.40 to 0.52]
Minutes per request 0.84 [0.74 to 0.89] 1.81 [1.38 to 2.15]

The outcomes are identical in all six runs. Inside one project Claude Code's own notes do the job: the saved state of a run without Besydr holds the note "Run only the test files covering the change, never the whole suite. Install nothing."

Besydr cost 28% more here and took about twice the time. Its extra time is roughly fixed per request: the completion check runs, asks its one question, and runs again. The requests of this scenario take about 45 seconds, so a fixed 40 seconds doubles them. On the two-minute requests of the five-project scenario the same overhead is 18%. Version 0.2.0 drops the second run when the agent changed nothing after the question; the last section of this post has its numbers.

Which part of Besydr does what

Four more setups ran the five-project scenario, twice each. The first four columns are counts per 100 requests; cost and minutes are per request.

Setup Earlier rules broken Corrections False done Unsolved Client cost Minutes
Claude Code alone 47 47 6 5 $1.24 1.90
Claude Code alone, rules file written by hand 11 22 8 3 $1.01 1.41
Besydr without learning 39 41 2 2 $1.38 2.76
Besydr without the completion check 3 13 3 3 $0.93 1.57
Besydr, default settings 0 6 2 0 $1.00 2.54
Besydr, all parts on 4 11 3 0 $0.99 2.25

Bar chart of the table above: earlier rules broken in 100 requests and minutes the agent worked per request, for each of the six setups.

  • Learning is the whole effect on rules. Without it, rules break as often as without Besydr.
  • The completion check is the whole extra time. Without it, Besydr is faster than Claude Code alone, because the correction turns are gone.
  • A Claude Code rules file written by hand is a strong setup. A careful developer who writes all 38 rules into the rules file removes most broken rules and gets the fastest runs. Besydr does better on rules and corrections, and nobody writes the file.
  • The default settings are enough. Switching on the check of each command and the trials of generated rules showed no gain in this benchmark.

Time: when is a session shorter

The benchmark counts the agent's time, and that already includes the agent's rework after a correction. It does not count the developer's time: noticing the problem, typing the correction, getting back into the task.

In the five-project scenario Besydr added 21 seconds of agent time per request and removed 36 corrections in 100 requests. A session is shorter with Besydr when one correction costs the developer more than about 58 seconds. We did not measure how long a correction takes a person.

Line chart: with Besydr a request takes 21 seconds longer when a correction costs the developer nothing, the same at about 58 seconds per correction, and less beyond that.

The weak spot: the completion check's verdict

When the agent stops, Besydr's completion check judges whether the request is met. The benchmark compares each verdict with the hidden tests.

Scenario Work that failed the hidden tests The check passed it Clean work The check sent it back
Five projects 3 3 96 5
Long sessions 11 11 99 8
One project 0 0 63 1

The verdict caught none of the 14 failing pieces of work, and it sent clean work back 14 times in 258.

Bar chart: of 14 pieces of work that failed the hidden tests, the check passed all 14. Of 258 pieces of clean work, it passed 244 and sent 14 back.

So where do the gains on false "done" come from? From a question, not a verdict. After a passed check on changed work, Besydr asks the agent once to try the edge cases of the request and to restore any existing check it rewrote. The agent's own model finds problems when asked, and fixes them before handing the work back.

Making the verdict itself catch failing work is the next thing to improve.

What we changed along the way

Two earlier attempts at the full run were stopped after one round each. Each showed a fault, and we fixed the cause before starting again.

  1. Requests that did not match their hidden tests. One click request said "the longest option string wins", while the real test expects the longest prefix. No agent could pass it. We then read all 65 requests against their hidden tests and reworded six of them. We left two hard requests as written, because the request does determine the behaviour and agents simply miss the case.
  2. A gap in Besydr. In one request both setups made their change pass by rewriting an existing test, changing behaviour nobody asked to change. Besydr's check passed it. We added the second part of the question described above: if the change edited or removed a check that existed before the turn, find the words of the request that ask for that, otherwise restore it. The text names no project, file or language. This fix was chosen against a failure the five-project scenario showed us, and that scenario contains the request. It bears on one request of 32. The rule and correction numbers do not depend on it, and the long sessions were not used to find or tune it.
  3. A fault in the harness. The host renewed its login in the middle of a request, which revoked the token inside a container, and the harness spent both corrections in eight seconds. The harness now waits for the fresh login and runs the turn again. In the final run this happened once, and that request passed.

Limits

  • One client, Claude Code, on two models. Codex, OpenCode and pi were not measured.
  • Five Python projects and a scripted developer. A person corrects in more ways than a script does.
  • Three runs of the main setups and two of the others. That is enough for the large differences and not for the small ones.
  • The developer's own time was not measured.
  • Besydr ran from its source at one commit, made before the first release, 0.1.0. The last section measures one change of version 0.2.0 on top of that commit.

Where it fits

From these numbers, Besydr pays off when you work across several repositories and repeat the same rules in each, and when your sessions are long and the work is hard enough that the agent hands back unfinished work. It does not pay off when you stay in one project on small tasks with a client that keeps its own notes for that project.

The benchmark harness will be published as open source, with the requests, the rule checks and the result rows of these 30 runs, so that the numbers can be checked and the runs repeated.

Version 0.2.0: the completion check runs again only after a change

In the version measured above, the completion check ran, asked its question about edge cases, and then always ran a second time. That second run is part of the fixed overhead the one-project scenario showed.

Version 0.2.0, on the releases page, keeps the first verdict when the agent changed nothing after the question: no call that writes succeeded and the files are the same as before. The check runs a second time only when there is new work to judge.

We made three more runs with this change: the one-project scenario twice and the five-project scenario once. They used the commit of the benchmark with only this change added, so the code differs in nothing else.

With Besydr, per request Before, 3 runs With the change
One project: completion check runs 2.06 [2.05 to 2.10] 1.19 [1.10 to 1.29]
One project: client cost $0.46 [0.40 to 0.52] $0.39 [0.38 to 0.40]
One project: minutes 1.81 [1.38 to 2.15] 1.44 [1.42 to 1.46]
Five projects: completion check runs 2.14 [2.06 to 2.22] 1.28
Five projects: client cost $0.99 [0.98 to 1.00] $1.06
Five projects: minutes 2.25 [2.14 to 2.38] 2.51
  • The check runs about 40% less often. One project: 130 check runs in 63 requests before, 50 in 42 with the change. Five projects: 205 in 96 before, 41 in 32.
  • The outcomes are inside what the earlier runs showed. One project: the same corrections in all five runs, no broken rule from an earlier session, no false "done". Five projects, counted in the one run of 32 requests: 0 rules from an earlier session broken (1 to 2 in the earlier runs), 3 corrections (3 to 4), 1 false "done" (0 to 2), nothing unsolved. The check sent no clean work back in that run; before, it did so 5 times in 96.
  • A gain in time is not shown. In one project the mean fell from 1.81 to 1.44 minutes, but both new runs lie inside the bracket of the old ones, and the cost brackets overlap as well. The five-project run was slower than all three earlier runs.

We looked at where the time of that five-project run went. It took 518 seconds longer than the mean of the earlier runs, and 270 of them belong to one request that needed two corrections. The model calls of the completion check were fewer, 122 against 172 to 181, but they took as long in total: 1,072 seconds against 763 to 1,096. One run cannot tell whether those calls were slower that day or the calls the change removes were the short ones.

Claude Code alone needed 0.84 minutes per request in the one-project scenario, so in a single project Besydr still takes longer.

Not measured again: the long sessions, Sonnet 5.5, and the other changes of version 0.2.0.