Is your context file doing anything? Measure your noise before you compare setups
In short: Before you compare two agent setups, run the one you have four times on your frozen bench, count the tasks the identical runs disagree on and turn that into a noise floor any setting has to beat; then freeze the setting, check it, run it twice and read it against the floor. On 44 pytest tasks identical runs disagreed on about 3 tasks, the project's own contributor documentation moved a net 1.25 and a generated context file 2.25 against a floor of 2.06, both raised the median task's cost by 27% to 40%, mostly for carrying the file, and the agent rarely did what either file asked.
Every team that hands work to a coding agent ends up arguing about the context file: the AGENTS.md or CLAUDE.md at the root of the repository that tells the agent how the project works. Generate it or write it by hand, keep it short or make it complete, point it at the documentation you already have. The argument is usually settled by trying each option once and keeping the one that felt better.
A group at ETH Zurich tested the practice at scale. Their study reports that context files, generated or committed by developers, do not generally improve task success and raise inference cost by over 20%, and it closes by saying any attempt to improve performance with one should be evaluated before deployment. My question comes before that evaluation: is the difference you see between two setups larger than the difference between two runs of the same setup? I owe a correction here. In an earlier post I measured that difference at 1 task in 44, from one pair of runs, and built the next post on it. Two more pairs of identical runs I kept from that post disagree on 3 and on 6. One pair was not a measurement.
This post is the method as six steps a team runs on its own test bench, the one from those two posts. Then I run it on a public repository, to check that it holds up and to get a rough sense of what to expect. The repository is not the point, and neither is the agent or the file; the method is.
Step one: measure your noise first
Run the setup you have four times and count what changes. Same tasks, same settings, nothing varied. Count the tasks each two runs disagree on; I call those flips. Then split the four runs into two halves, all three ways, and see how large a difference appears when nothing differs. The flips give you a noise floor: with two runs a side, a difference has to exceed the square root of twice the average flips before it counts. The kit’s report --noise prints the flips, the splits and the floor for the runs you have.
Step two: freeze the setting and check it
One file for the whole bench, produced once, from the repository as it was before any task’s fix. That is how a team lives with a context file, and it means the file cannot know an answer. context.py check runs two checks before the file is frozen. A leak check refuses a file naming anything that appears only in the withheld tests or fixes. A “commands work” check looks up every program the file names inside the agent’s own environment, without running it, and lists the missing ones for a person to confirm.
Step three: hand it to the agent the way your tool would
The file goes in front of the ticket, in its own block, and nowhere else. If your tool loads context files itself, there is nothing to do. My harness does not, so the run step places the frozen file ahead of the ticket, labelled as the AGENTS.md at the repository root. It is not written into the working tree, so it cannot end up in the change the agent submits.
Step four: run each setting twice, in turns
Two runs per file, interleaved with the no-file runs. Same harness, model, limits and isolation throughout. I ran them in the order none, docs, generated, none, none, docs, generated, none, so that no setting sits entirely before or after another if something drifts during the day.
Step five: read each setting against the floor
A net inside the floor is not a difference. Per task, a setting scores the share of its runs that resolved it; the net is the tasks it gained over no file minus the tasks it lost. Read cost task by task as well, and split what a file adds in two: the file’s own tokens, paid again on every call, and the rest, which is the agent doing more. Measure the file’s size from the runs, as the difference in the first call’s prompt; a rule of thumb undercounts it. Then count behaviour from the agent’s commands: how often it runs the tests, and how often it calls a program the check found missing. I added one more count after my runs, because of them: how often the things the file asks for show up in the submitted change. It belongs in the method from the start.
Step six: work out what your bench can see
Turn the floor into the number you need before the argument starts. The arithmetic behind the floor also gives the smallest difference your bench can show, in tasks and in points of resolved rate, and how many tasks or repeated runs a smaller one would take. The report prints both. If the difference you care about is under that, no single comparison will settle it, and you know what settling it costs.
What I wrote down before running it
The thesis: most differences teams argue about between setups are smaller than the difference between two runs of the same setup; on this bench, neither the project’s own documentation used as a context file nor a generated one moves landed changes by more than the setup’s own noise lets a team see, while the generated file costs more. The predictions, fixed before any run: each file’s net stays inside the floor; the generated file raises the median task’s cost by at least 15%, and by more than identical runs differ; each file makes the agent run the tests at least once more per task; and single runs with and without a file give answers 2 or more tasks apart. The first two were the ones I cared about, since they are the thesis.
How I tested the method
The bench and the two files. The 44 pytest tasks frozen in the earlier post, tickets as filed. The project has no context file, so I tested the two a team can have without writing one. The first is the project’s own contributor documentation: its section on preparing a pull request, 180 lines, unedited, which sends contributors to two tools my sandbox does not have. The second is a file the model generated in one session inside the bench’s own environment, from a prompt in the kit that asks it to explore, run the commands it recommends and keep the file short: 35 lines.
One plain setup, and a small check on a second model. mini-swe-agent 2.4.6 with its own prompt and tools, Claude Haiku 5.5 through an AI gateway, 5 cents and 75 steps per task. I chose a small model so that repeats are affordable: four runs without a file and two with each file cost $5.90. To see whether the verdicts depend on that choice, I ran each file once on Claude Sonnet 5.5, the model of the earlier posts, over the 21 tasks whose tests check what the ticket states, against two runs I already had. This is not a comparison of tools or of models; it is one setup, used to see whether the method works.
What the run showed
| No file | Project docs | Generated file | |
|---|---|---|---|
| File size in tokens, measured | 2,622 | 1,188 | |
| Resolved per run, of 44 | 15, 13, 12, 15 | 15, 15 | 17, 15 |
| Net against no file (noise floor 2.06) | +1.25 | +2.25 | |
| Cost per run | $0.63 to $0.69 | $0.83, $0.88 | $0.76, $0.78 |
| Median task’s cost against no file | +40% | +27% | |
| Share of the extra cost that is the file itself | 71% | 54% | |
| Test-runner commands per task | 3.7 | 3.8 | 3.8 |
| Tasks with a changelog entry added, of 44 | 1, 1, 0, 2 | 5, 4 | 1, 2 |
Identical runs disagreed on about 3 tasks, which put the floor at 2. The six pairings of the four no-file runs flipped between 1 and 4 tasks, 2.8 on average. For two runs against four that gives a floor of 2.06 tasks, about 5 points of resolved rate. The halves show what that means: two of the three splits differed by half a task and the third by 2.5, with nothing changed between them. A floor like this is crossed by chance about one time in twenty. On your own bench, expect one pair of runs to tell you little about the next: here single pairs ranged from 1 flip to 4.
One file stayed inside the floor and the other crossed it by a fifth of a task. The documentation gained a net 1.25 tasks, the generated file 2.25. Three tasks carry most of both gains. On two of them every run fixed the tests that came with the fix; the runs that lost broke one existing test beside them, and the runs that won ran the tests again, saw that failure and revised. With a file in front of it the agent took that extra round a little more often, not reliably. The second model showed a net of 1 in 21 for the generated file, where a single run could only have shown a gain of about 3. I would not make a decision on a result like this, and on your repository I would expect a context file’s effect on landed changes to sit near your floor. None of this grades the project’s documentation, which is written for people.
The cost was real, and most of it was the price of carrying the file. The median task cost 40% more with the documentation and 27% more with the generated file, where identical halves differ by up to 9%. Of what each file added, 71% and 54% was the file’s own tokens, sent again with every call because this harness caches nothing; the rest was the agent doing more. The documentation section measured 2,622 tokens against 1,717 by the four-characters rule of thumb. If your tool caches its prompt you will pay less for the first part; expect to pay something for both.
The agent rarely did what either file asked. Sent to tools it did not have, it tried them twice in 88 task runs. It ran the tests 3.7 times per task without a file and 3.8 with one. Both files ask for a changelog entry with each change: one appeared in 5 and 4 of 44 tasks with the documentation, against 0 to 2 otherwise, and no change touched the authors file or the tests both files also ask for. On the second model the same request was followed in 19 and 20 of 21 tasks, against 10 and 9 without a file, so how far a file changes what an agent does depends on the model reading it. Count it on yours before you polish the file.
Predictions 1, 3 and 5 held: the documentation’s net inside the floor, the generated file’s cost up 27% against a threshold of 15%, and single-run comparisons for the generated file ranging from no difference to 5 tasks. Predictions 2 and 4 failed: the generated file’s net is outside the floor by a fifth of a task, and neither file made the agent test more. The thesis held for the documentation and for cost and failed, narrowly, for the generated file; beside that failure stand a larger difference between identical runs in one of three splits, and a second model that did not show a gain of that size. So is your context file doing anything? Here it cost a quarter to two fifths more per task, it was mostly not acted on, and what it did to landed changes sits at the edge of what 44 tasks can show.
What I’d tell a fellow technical leader
Measure the noise before the argument. Four runs of the setup you already have, on the tasks you already froze. Anything under the floor is not a difference between setups, however clear it looked on the day.
Never compare one run with one run. With the same file and the same tasks, single runs put the generated file anywhere from level to 5 tasks ahead. A team that tried it once would have had a confident answer.
Size the bench to the difference you care about. This one sees about 5 points. Seeing 2 would take 242 tasks at this rate of flips, or 15 runs a side on these 44; seeing 5 takes 39 tasks or 3 runs a side. Decide what gain would change your decision, then check that your bench can show it.
Price the file per call. A context file is paid for every time the agent speaks. Measure its size from a real run, find out whether your tool caches it, and weigh that against a gain you may not be able to see.
Check that the agent does what the file says. Pick two or three things your file asks for that leave a trace in a change, and count them. A file that is carried and not followed is cost without effect.
Try it yourself
The kit now has context.py with four subcommands, docs, generate, check and freeze, the generation prompt as a file, and new flags on bench.py: run --context, report --noise and report --study context. It needs the bench from the earlier post, Docker or OrbStack, and the gateway key the kit already uses. At this size the eight runs on the small model cost $5.90 and took fifty minutes to an hour each, the check on the second model $10.82, and the whole study about $17. One repository with good documentation, one small model, one harness that had to be handed the file, and one file of each kind is a check of the method, not a verdict on context files.
What’s next
That closes the three questions I wanted to ask of one bench: whether your own history can be a benchmark, what the ticket is worth, and what the setup is worth. What they leave behind is a floor, and a floor is what any comparison of two ways of routing work through agents has to clear.
Appendix: method, data and limits
The study was written down on 14 November 2026, before any run, and every change after that was recorded with its reason before the result it affects was read. The main ones, all before any data: a first draft compared a file’s net with the raw flips between single runs, which are different units and made the central predictions almost impossible to fail, so the floor replaced it; the file a person was to write was replaced by the project’s own documentation; and the main runs moved to a smaller model for cost, with a gate fixed in advance (the first run had to resolve at least 10 of 44, and resolved 15). The count of what the files ask for in the submitted changes was added after the runs and is exploratory.
Setup: as in the earlier posts, with Claude Haiku 5.5 through the Vercel AI Gateway at default sampling, no prompt caching and cost from reported token usage at list prices; the 5-cent cap buys the same number of tokens as the $1 cap used before. The floor is two standard deviations of a net between settings when nothing differs: with F the average flips between two single runs and a and b runs a side, one standard deviation is the square root of (F/2)(1/a + 1/b). The documentation file is the “Preparing Pull Requests” section of the project’s CONTRIBUTING.rst at the commit before the oldest task; the whole file was left out for its size and because it carries the project’s policy on AI-assisted contributions, which is addressed to people opening pull requests. This study opens none and submits nothing to the project. The generated file’s prompt is stricter than a typical initialisation command, and one line of the file restates a boundary from the harness’s own prompt, inside which the session ran. Neither file was edited. The check found tox and pre-commit missing from the sandbox. On the second model the documentation agreed with the main runs on all three verdicts compared (net, cost, test-running); the generated file agreed on cost and disagreed on the other two, by a rule fixed in advance.
Limits: one repository, one small model, a single-run check on a second one, and 44 tasks, of which 24 were resolved in none of the eight runs and 11 in all, so 9 tasks carry every difference here. The floor assumes tasks flip independently and rests on six pairings of four runs; a floor a fifth of a task higher would move the generated file’s verdict. Resolved means the withheld tests pass, nothing more. The model’s training data cutoff is not published; its stated knowledge cutoff of June 2026 precedes the tasks, which were merged from July 2026. No file written by a person for the agent was tested.
Data: pytest is MIT-licensed; only public issues, pull requests and the repository’s own code, tests and documentation were used, the documentation excerpt is not redistributed in the kit, and no contributor is named. I am not affiliated with the makers of pytest, the harness or the models, and none has reviewed or endorsed this post.
This is personal research, done in my own time and on public data only. The views are my own and not my employer’s.
I used Claude to help build the tool and draft this post.
Ask your own repository
How to evaluate your own AI setup against your own codebase, pipeline and history, one delivery step at a time: each post gives a method a team can run on its own repository, and uses public data only to check that the method works and to hint at what to expect.
- How much of triage and code review can you hand to AI? A way to find out for your own team Intake: the three lanes, prologue
- Can a cheap decision model take triage off your team's plate? What happened when Jev finally answered Intake: confidence you can act on, prologue
- Is it the model or your labels? What it takes to hand issue triage to AI Intake: measure against labels a person confirmed, prologue
- How many tickets do you have to label before you can trust an AI lane? Fewer than you think, or no number is enough Trust: measure the room before counting labels
- Which tickets can you hand to an agent? Three numbers to pull from your own attempts before you try to sort them Hand-off: three numbers and one division
- Can your own history be your benchmark? Six steps from fixed issues to a test bench you can trust The bench: six steps and a screen
- Do your review bot's warnings turn into bugs? What your history can and cannot tell you Review: four numbers against a placebo
- Does a better ticket beat a better setup? Pricing ticket wording on your own test bench The ticket: three versions, read in pairs
- Is your context file doing anything? Measure your noise before you compare setups The setup: measure the noise first
The series continues.
Sources
- Gloaguen et al. 2026: Evaluating AGENTS.md, Are Repository-Level Context Files Helpful for Coding Agents?
- Thanos Karpouzis: Can your own history be your benchmark?
- Thanos Karpouzis: Does a better ticket beat a better setup?
- pytest on GitHub
- mini-swe-agent on GitHub
- Anthropic: Claude Haiku 5.5 model page
- Anthropic: Claude Sonnet 5.5 model page
- GitHub: ai-triage-review-eval, the kit behind this post