Anyone programming with AI assistants today creates a context file almost reflexively. Agents.md and comparable files gather project knowledge in one central place: coding conventions, directory structure, test commands, notes on peculiarities of the codebase. The model is supposed to read this information with every request and thereby deliver more fitting suggestions. The practice has become established in a short time, often without anyone actually having measured its effect.

That is exactly what a study by ETH Zurich has now done – and according to reporting, it arrives at a surprising finding: the files noticeably increase costs without any clear benefit for output quality being apparent. The study's recommendation is correspondingly cautious.

Why context costs money

The cost mechanism is easy to understand. Language models calculate in tokens, i.e. small text and code building blocks, and billing is by volume. With many assistants, a context file is not read once, but flows into every single request. A well-maintained file several hundred lines long thus generates additional input tokens with every prompt – multiplied by the number of requests a development team makes over weeks.

There is also a second, less obvious effect: the more text there is in the context window, the more the information competes for the model's attention. General style rules can dilute the actual task description instead of sharpening it. That more context automatically delivers better results is an assumption – not an established fact.

What the result does not mean

A single study result is not a verdict on an entire way of working. The effect of context files is likely to depend heavily on which model is used, how large and how idiosyncratic a codebase is, and which tasks are set. A legacy project with unusual conventions plausibly benefits differently from a fresh application following framework standards.

The robust core of the report is therefore less a prohibition than a call: widespread practices in handling AI tools should be reviewed instead of being continued out of habit. Much of what currently circulates as best practice comes from experience reports and community recommendations, not from controlled measurements.

How the benefit can be checked

For development teams, a pragmatic test that requires no research effort is worthwhile:

  • Establish a baseline: Record token consumption and costs per developer over a defined period. Most providers offer usage statistics for this.
  • Run a comparison: Have a series of typical tasks worked on once with and once without a context file and compare the results – not by gut feeling, but using traceable criteria such as passed tests or the amount of rework required.
  • Trim the file: If the context file stays, cut everything the model can derive from the code anyway. Only information that appears nowhere else should remain.
  • Check alternatives: Linters, formatters, tests and type checks enforce conventions technically instead of explaining them to a model in prose – and cost nothing per request.

Cost transparency belongs in the project

The real point lies beyond a single file. AI-assisted development shifts part of the project costs from working time to ongoing usage fees. These costs are variable, grow with team size and often arise unnoticed in the background. Anyone who does not evaluate them regularly will only notice an inefficient practice on the bill.

It therefore makes sense to treat the use of AI tools like any other part of the development process: with clear conventions, measurable metrics and a fixed date at which both are reviewed. That also includes the question of which tasks an assistant is even used for and where classic tools reach the goal faster and more cheaply.

For web and software projects, this means concretely: AI workflows are not a one-time setup, but need the same attention as build pipelines or hosting costs. Practices that spread through blog posts and communities should be measured in one's own project context before being declared the standard. Anyone who weighs costs and output quality side by side makes more robust decisions than any general recommendation can deliver.

Sources