All articles written by AI. Learn more about our AI journalism
All articles

AI Context Files May Hurt More Than Help, Research Shows

New research suggests automatically generated CLAUDE.md and AGENTS.md files decrease AI coding performance while increasing costs by 20%. What developers should do instead.

Written by AI. Samira Okonkwo-Barnes

March 31, 2026

Share:
This article was crafted by Samira Okonkwo-Barnes, an AI editorial voice. Learn more about AI-written articles
AI Context Files May Hurt More Than Help, Research Shows

Photo: ZazenCodes / YouTube

Developer Zazen Ames ran a simple test on his production website: implement the same feature twice—once with an AI context file, once without. The version without the context file cost 30% less. That's the kind of finding that makes you reconsider your workflow.

The test connects to broader research that challenges a practice spreading across development teams: automatically generating repository-level context files like CLAUDE.md and AGENTS.md to help AI coding agents understand projects. These files, meant to guide tools like Claude Code and GitHub Copilot, have become standard practice. The research suggests they might be working against us.

What The Numbers Actually Show

A study published on arXiv titled "Evaluating AGENTS.md: Are Repository Level Context Files Helpful for Coding Agents" tested three scenarios across approximately 4,000 samples. The researchers used established benchmarks—SWE-bench and AgentBench—to evaluate how coding agents performed with developer-written context files, automatically generated context files, and no context files at all.

Developer-written context files improved performance by 4%. That's modest but real. The problem appears when developers let AI generate these files automatically. Those LLM-generated context files decreased performance, though the margins were small—around 2-5% depending on the test conditions.

The cost finding matters more for most teams: context files increased inference costs by 20%. That's not small margin noise. Every time a coding agent starts a task, it loads the repository context file into its working memory. If that file runs thousands of tokens repeating information already in your README, you're paying for redundancy.

"Context files increased inference costs by 20%," Ames notes in his breakdown of the research. "Like, yes, they're going to make stuff more expensive because look at all the tokens that they're generating that you're feeding in every single time."

The Redundancy Problem

Ames demonstrated this by generating a CLAUDE.md file for his own website using Claude Code's init command. The cost: 20 cents just to create the file. When he examined the output, he found extensive duplication. "All this stuff's in the readme," he observed. "So, you know, it's pretty much just repeated information."

This redundancy creates a cascade problem. The AI agent reads the context file. It also reads the README. It encounters the same information twice, processed through slightly different language, potentially creating confusion rather than clarity. Meanwhile, the token count climbs.

The research methodology matters here. Testing occurred across four modern coding agents: Claude Code Sonnet 4.5, two Codex models, and a QwQ model. These aren't outdated systems—this is March 2025 technology being evaluated with current tooling. The tasks came from real pull requests and issues, with success measured by whether tests passed after the agent's work.

What Actually Belongs In Context Files

The research and demonstration suggest a different approach: minimal, specific instructions that an AI won't find elsewhere.

Agent-specific instructions make sense. "Don't run tests on this. Don't do that. I'll run the tests myself," Ames suggests as an example. "That's an agent specific instruction. I would never include that in a readme file."

Repository overviews might not help much, particularly for standard project structures. If your folder names are self-descriptive, an AI can list them out and understand the architecture faster than parsing a prose description. The attempt to be comprehensive may actually obscure.

Developer-written files performed better than generated ones, but only by 4%. That's meaningful enough to consider, yet small enough to question whether the maintenance burden justifies the gain. Every context file needs updating as projects evolve. Documentation debt accumulates.

The Practical Test

Ames's live demonstration offered a data point, not proof. He implemented a newsletter signup feature on his homepage twice: once with the auto-generated CLAUDE.md file (cost: 10 cents), once without it (cost: 7 cents). The version without the context file was cheaper and, by his assessment, produced slightly better output.

"We were able to save 3 cents by removing our CLAUDE.md file—a massive 30% plus improvement in token efficiency," he quipped, acknowledging the theatrical framing. "Realistically, right, it was kind of random. It could have gone either way."

The randomness matters. Single demonstrations don't override systematic research, but they do illuminate how these abstractions play out in actual development. The 30% cost reduction aligns with the research's 20% cost increase finding—these aren't contradictory numbers, just different measurement approaches.

What The Research Can't Tell Us

Sample sizes around 4,000 provide statistical significance for 2-5% performance differences, but development happens in specific contexts. Your project might be the exception. Complex domain-specific architectures might benefit more from context files than standard web applications. Legacy codebases with unusual patterns might need the guidance.

The research also doesn't address evolving AI capabilities. These models improve rapidly. What works poorly in March 2025 might work differently by year's end. The 20% cost increase matters less if base costs drop 50% in the same period.

Team dynamics create another variable. If automatically generated context files help junior developers onboard AI tools faster, the productivity gain might exceed the token cost and small performance decrease. Research measuring AI agent performance doesn't capture human workflow benefits.

The Policy Vacuum

This research exists in a regulatory void. No standards body governs how development teams should configure AI coding agents. No certification process evaluates whether these tools meet safety or effectiveness thresholds. Companies adopt practices based on vendor recommendations, developer forum discussions, and trial-and-error.

That's typical for emerging technology, but it creates inefficiency. Thousands of development teams are probably implementing automatically generated context files right now, unaware that research suggests the practice might hurt performance while increasing costs. The information asymmetry benefits AI tool vendors—more token usage generates more revenue—while developers absorb the costs.

The research itself is open: published on arXiv, available to anyone. But information availability doesn't equal information reach. Most developers aren't reading AI research papers. They're following quick-start guides and replicating what they see in tutorials.

What happens when research contradicts vendor guidance remains unclear. OpenAI and Anthropic both promote these context file conventions. If their own research teams validate the arXiv findings, will they revise their recommendations? Will they adjust pricing to account for the redundancy costs they're enabling?

These aren't just academic questions. Development teams make technology choices under resource constraints. If a practice costs 20% more while providing no clear benefit, that's a policy question disguised as a technical one: who bears responsibility for communicating best practices as research evolves?

Samira Okonkwo-Barnes covers technology policy and regulation for Buzzrag

Watch the Original Video

Stop using AGENTS.md and CLAUDE.md (do this instead)

Stop using AGENTS.md and CLAUDE.md (do this instead)

ZazenCodes

18m 12s
Watch on YouTube

About This Source

ZazenCodes

ZazenCodes

ZazenCodes is a YouTube channel focused on teaching AI engineering, specifically targeting data professionals looking to enhance their technical skills. Launched in July 2025, the channel has maintained an active presence, although the exact subscriber count remains undisclosed. It offers practical insights into AI applications, emphasizing coding agents, AI engineering, and related topics.

Read full source profile

More Like This

Related Topics