Selecting rules instead of loading them: Kurtel against Claude Code's native memory on multi-session coding tasks
Thomas Bodénan · Kurtel · October 2026
A coding agent that works on a repository for months accumulates hundreds of rules: corrections, conventions, decisions. We measure what happens to cost, time and success when that memory grows. On 20 three-session sequences adapted from DreamBench-SWE, a reviewer states a requirement that a test checks two sessions later, while the memory already holds 100, 250, 500 or 2,000 other rules. We compare Claude Code with its native memory against Claude Code with Kurtel, which delivers with each message only the rules that concern it. Over 160 runs, a run with Kurtel costs $0.39 against $0.81 and takes 2.3 minutes against 4.2; both gaps are established. The final test passes in 53 of 80 runs with Kurtel against 43 of 80; this gap is not established: if the two systems succeeded equally often, chance alone would give a gap this large about 9 times in 100 (p = 0.087), more than the 5 in 100 we accept. In both arms, success follows whether the requirement reaches the agent in the last session. With the native memory this happens less often as the memory grows; with Kurtel it does not depend on the size of the memory.
2.3 minutes per run with Kurtel, against 4.2 with Claude Code's native memory
$0.39 per run with Kurtel, against $0.81
53 final tests passed out of 80, against 43 — gap not established
1Introduction
Developers correct their coding agents all the time, and the corrections do not last. In a study of 20,574 real sessions, the most common problem between a developer and an agent was the agent ignoring the developer's own rules, and a session that went wrong was followed by another one that went wrong 51.9% of the time, against 33.6% otherwise[2].
Memory is the obvious answer, and coding agents now ship with one. Claude Code writes what it learns to files, one per rule, with an index that is loaded at the start of each session. This works well when there is little to remember. The question we ask here is what happens later, when the memory of a repository holds hundreds or thousands of rules and only one of them matters for the task at hand.
Kurtel takes the other route. It keeps the rules in a store outside the conversation, and for each message it selects the few rules that concern that message and delivers only those. The cost of a message should then not depend on how much has been learned. This paper tests that claim against Claude Code's native memory, on the same tasks, with the same model, at four memory sizes.
Our contributions:
- An extension of DreamBench-SWE where the memory is filled with 100 to 2,000 other rules before the first session, in the layout each system writes itself.
- A comparison over 160 runs between Claude Code's native memory and Kurtel, with a protocol and criteria written before the first run.
- An analysis of where success comes from in each arm: whether the reviewer's requirement reaches the agent in the last session.
2Background
Recent benchmarks agree on two points. Past experience helps a coding agent when it is accurate and well selected: verified experience injected into five coding agents raised the share of resolved tasks for four of them and reduced the number of steps for all five[3]. And memory that is not selected does not help: unfiltered or wrongly selected context brings limited or even negative benefits[4], and when four existing memory systems had to build and retrieve the experience themselves, eleven of twelve pairings with coding agents did no better than no memory at all[3].
DreamBench-SWE[1] tests memory across sessions: a later task depends on something said in an earlier session that cannot be inferred from the code, and an executable test decides whether the agent used it. It does not test what happens when the memory is large, and its published results do not include Claude Code. We found no benchmark that measures the memory Claude Code ships with as it grows.
3Method
3.1Tasks
We use 20 sequences adapted from the public DreamBench-SWE repository. Each sequence is three sessions on a small Python project. After the first and the second session, a reviewer tells the agent something it cannot find in the code: a format to respect, a value to use, a file that must never be edited by hand. The reviewer's feedback is sent as a user message. The third session asks for a change that only passes its test if the agent still knows what the reviewer said.
Each session starts a new conversation. Whatever the agent knows in the third session, it knows through its memory. The scoring tests of DreamBench-SWE are not public; we wrote our own tests for the third session, so our figures cannot be compared with the paper's.
3.2Preloaded memory
On the original sequences, the agent has two or three things to remember per project. Claude Code's own memory handles that well: in an earlier campaign of ours it kept the reviewer's requirement in 29 of 30 runs. To represent a repository that has been worked on for a long time, we fill the memory before the first session with 100, 250, 500 or 2,000 other rules about the same project, written like reviewer feedback.
Both arms get the same rules. Claude Code gets them as memory files in the layout it writes itself: one file per rule and one line per rule in its index. Kurtel gets them as rules in its store. The agent then has to find the one requirement that matters among them.
3.3Arms
- Claude Code, native memory. Default settings, native memory on, no Kurtel.
- Claude Code with Kurtel. Kurtel installed, native memory off. Kurtel learns from the sessions and delivers rules with each message.
Same model (Claude Sonnet 5), same version of Claude Code, same sandbox, same messages. Both arms of a memory size ran in the same launch, on 10 October 2026. When the agent asks whether a remembered rule is really the user's, the harness answers yes, once, in both arms.
3.4Measures and analysis
Each sequence is played once per memory size and arm: 20 × 4 × 2 = 160 runs. We measure three things per run: whether the test of the third session passes in full, the minutes spent waiting for the agent across the three sessions, and the cost in US dollars, Kurtel's own model calls included.
Success is compared on the 80 pairs (same sequence, same memory size) with a two-sided sign test on the pairs that differ, and reported with 95% Wilson intervals. Cost and time are reported with 95% bootstrap intervals over the 80 runs of each arm. Before the first run, we wrote down that a gap counts as established if p < 0.05 for success, or if the 95% intervals do not overlap for cost and time. Here p is the probability of seeing a gap at least this large if the two systems in fact succeeded equally often: the smaller it is, the harder the gap is to explain by chance. Below 0.05, that is less than 5 times in 100, is the usual threshold. Every run counts; none was run again because the agent failed.
4Results
| Rules in memory | Test passed | Cost per run | Minutes per run | |||
|---|---|---|---|---|---|---|
| Native | Kurtel | Native | Kurtel | Native | Kurtel | |
| 100 | 15/20 | 14/20 | $0.62 | $0.39 | 3.0 | 2.3 |
| 250 | 7/20 | 13/20 | $0.89 | $0.38 | 4.8 | 2.3 |
| 500 | 13/20 | 11/20 | $0.92 | $0.39 | 4.7 | 2.3 |
| 2,000 | 8/20 | 15/20 | $0.82 | $0.39 | 4.4 | 2.3 |
| All | 43/80 | 53/80 | $0.81 | $0.39 | 4.2 | 2.3 |
20 runs per cell, 80 in the last row. Native: Claude Code with its native memory. Kurtel: Claude Code with Kurtel.
4.1Cost and time
A run with Kurtel cost $0.39 on average, against $0.81 with the native memory (Figure 1). It took 2.3 minutes against 4.2 (Figure 2). Both gaps are established: the 95% intervals of the two arms do not overlap.
Average over 80 runs per arm, in US dollars, Kurtel's own model calls included. 95% intervals: $0.76–0.87 for Claude Code, $0.37–0.41 with Kurtel. They do not overlap.
Average over 80 runs per arm, in minutes spent waiting for the agent across the three sessions. 95% intervals: 3.9–4.6 for Claude Code, 2.2–2.4 with Kurtel. They do not overlap.
With Kurtel, cost and time stay the same whether the memory holds 100 rules or 2,000. With the native memory, both are higher at 250, 500 and 2,000 rules than at 100 (Figures 3 and 4). A run used about 2.4 million tokens with the native memory, against 1.1 million with Kurtel.
Each point is the average of 20 runs, in US dollars.
Each point is the average of 20 runs, in minutes.
4.2Success
The final test passed in 53 of 80 runs with Kurtel and in 43 of 80 with the native memory (Figure 5). Compared pair by pair, both passed 34 times, Kurtel alone 19 times, Claude Code alone 9 times, neither 18 times.
Only the 28 pairs where one system passed and the other did not tell them apart. If the two systems succeeded equally often, each of these pairs would go either way like a coin toss. A split at least as uneven as 19 to 9 then comes up about 9 times in 100: this is p = 0.087. It is above the 5 in 100 (p < 0.05) we had set, so chance cannot be ruled out. We do not claim that Kurtel succeeds more often. We claim that it succeeds at least as often, for half the cost and time.
80 runs per arm. 95% intervals: 43–64% for Claude Code, 55–76% with Kurtel. They overlap: this gap is not established.
By memory size, the native memory passes 15 runs of 20 at 100 rules and 7, 13 and 8 at the larger sizes; Kurtel passes between 11 and 15 at every size (Figure 6). With 20 runs per point, single points are noisy, and we do not read a trend from them. Beyond 100 rules, the totals are 28 of 60 for the native memory and 39 of 60 for Kurtel.
Out of 20 runs per point, one run per sequence. With 20 runs, a point can move by about 20 points of percentage from one campaign to the next: read the totals (43 and 53 of 80), not the points one by one.
5Analysis: where the difference comes from
In both arms, the result follows one thing: whether the reviewer's requirement reaches the agent in the third session.
Claude Code keeps one file per rule and an index with one line per rule. When the line of the index holding the requirement was loaded in the third session, the test passed in 38 of 48 runs. When it was not, in 5 of 32. That line was loaded in 19 of 20 runs with 100 rules in memory, and in 6 of 20 with 2,000 (Figure 7).
Kurtel does not load the memory. For each message, it selects the rules that concern it and delivers only those. When the requirement was delivered, the test passed in 53 of 60 runs. When it was not, in 0 of 20. It was delivered in 14 to 16 runs of 20 at every size.
Out of 20 runs per point. Claude Code: the line of its memory index holding the requirement was loaded. Kurtel: the rule was delivered with a message.
The two systems therefore fail differently. The native memory loses the requirement more often as the memory grows. Kurtel misses it in about one run in four, whatever the size: those are runs where the rule was not learned from the reviewer's message, or was learned and not selected in the last session.
6Limitations
- The rules filling the memory are synthetic, in both arms.
- The projects are small Python projects, and the reviewer's requirements are arbitrary on purpose, so that the agent cannot guess them.
- One run per sequence, size and arm. We did not measure how much the same run varies when repeated.
- With Kurtel, the agent asked the user to confirm a remembered rule more often: the test passed without any answer from the user in 23 of 80 runs, against 31 of 80 with the native memory.
- One model, one agent: Claude Sonnet 5 in Claude Code.
7Conclusion
On multi-session coding tasks with 100 to 2,000 rules in memory, replacing Claude Code's native memory with Kurtel halves the cost and nearly halves the time of a run, and both stay flat as the memory grows. The final test passes at least as often; the ten-run advantage we observe is not established at this sample size. The mechanism is visible in the runs: what decides the outcome is whether the one rule that matters is in front of the agent, and selecting it per message keeps that independent of how much has been learned.
Two things remain to be done: more runs to settle the gap in success, and the same campaign on real repositories with rules learned from real sessions.
Kurtel learns from the corrections your developers already make, and hands each task only the rules that concern it — whatever the size of the memory. See how it learns →
References
- [1]Singh, DreamBench-SWE: A Multi-Session Memory-Hygiene Benchmark for Software Agents, arXiv 2608.20664, Aug. 2026
- [2]Tang et al., How Coding Agents Fail Their Users: A Large-Scale Analysis of Developer-Agent Misalignment in 20,574 Real-World Sessions, arXiv 2605.29442, 2026
- [3]Fan et al., VibeMemBench: Evaluating Memory Systems for Coding Agents on Real Repository Coding Tasks, arXiv 2609.23570, Sept. 2026
- [4]Zhu et al., SWE Context Bench: A Benchmark for Context Learning in Coding, arXiv 2602.08316, 2026
Sequences adapted from the public DreamBench-SWE repository; tests, preloaded rules and harness are ours. Figures from [2], [3] and [4] are quoted from each paper.
