← Latest papers
🤖 machine learning

What Context Does a Coding Agent Actually Need to Act?

This paper demonstrates that for coding agents editing code, the essential context is strictly limited to the specific files being modified, as natural language summaries and surrounding file content contribute negligibly to issue resolution compared to the source code itself, while also revealing a significant noise floor in benchmark results caused by non-deterministic API inference.

Original authors: Brian Sam-Bodden

Published 2026-07-14✓ Author reviewed
📖 4 min read☕ Coffee break read

Original authors: Brian Sam-Bodden

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you're trying to fix a leaky faucet in a massive, 100-story skyscraper. You don't need to read the blueprints for the entire building, the cafeteria menu, or the security logs to find the wrench. You just need to know exactly which pipe is dripping and see the immediate area around it.

That's the surprising lesson from this new study about "coding agents"—the AI bots that write and fix software. For a long time, the tech world assumed these bots needed to swallow the entire codebase of a project (sometimes millions of lines) into their "brain" to do their job. The thinking was: "More context is always better."

But this paper says: Stop stuffing the brain. It turns out that for the actual act of fixing code, the AI needs almost nothing but the specific lines it's about to change.

The "Find" vs. The "Act"

The researchers split the problem into two parts:

  1. The Find: Locating the broken code.
  2. The Act: Actually fixing it once you've found it.

To test this, they used a "magic map" (an oracle) to tell the AI exactly where the broken code was. This meant the AI didn't have to guess where to look; it just had to focus on how to fix it. They then gave the AI different "views" of that code to see what worked best.

The Big Disappointment: Summaries Don't Work

One popular idea was: "Let's just give the AI a natural language summary of the code, like a book blurb."

  • The Test: They asked the AI to answer tricky questions about how the code behaves, using either the full source code or a summary written by a super-smart AI (a "frontier model").
  • The Result: The full source code got 27 out of 45 questions right. The summaries? They got only 4 out of 45 right.
  • The Twist: It didn't matter if the summary was written by the smartest AI in the world or a tiny, basic model. They both failed equally. The problem wasn't the writer; the problem was the format. A summary just can't carry the specific "behavioral" details needed to fix a bug. It's like trying to fix a car engine by reading a travel brochure about the car; the brochure is nice, but it doesn't tell you which bolt is loose.

The "Skeleton" vs. The "Whole Body"

Next, they tested if the AI needed the full, fleshy code or just the "skeleton" (the structure, like function names and signatures).

  • The Setup: They took 70 real-world coding problems. For some, they gave the AI the full files. For others, they gave it just the "skeleton" (UML diagrams and signatures) or a "keep/drop" version (keeping only the essential parts and deleting the rest).
  • The Result: The "skeleton" and "keep/drop" versions solved just as many problems as the full files. In fact, the "keep/drop" method solved slightly more (25 out of 70) than the full files (19 out of 70), though the difference was small enough that it might just be luck.
  • The Cost: Here's the kicker. Solving a problem with the full files cost the AI 94,000 tokens (a unit of text). Solving it with the compressed "keep/drop" method cost only 19,000 tokens. That's a massive savings—about 3 to 3.7 times cheaper—with no loss in performance.

The "Noise" Warning

The researchers also found something weird and important: even when they ran the exact same test with the exact same settings, the AI sometimes gave different answers. About 9% of the time, the outcome flipped between runs. This means that if you see a tiny difference between two methods (like a 2% improvement), it might just be random noise, not a real breakthrough.

The Bottom Line

The paper concludes that for the specific task of fixing code, less is more.

  • What works: Giving the AI the exact lines of code it needs to edit, stripped down to their essentials.
  • What doesn't work: Flooding the AI with summaries, full file histories, or complex structural diagrams.
  • The Verdict: The "signal" lives in the code itself, not in the story we tell about the code. By cutting out the fluff, we can fix bugs for a fraction of the cost, without needing to read the whole skyscraper to fix one leaky faucet.

The authors are very careful to say this applies to "single-shot" fixes (where the AI tries once and doesn't get to re-read or ask for help). But for that specific, high-stakes moment of editing, the data is clear: you don't need the whole library; you just need the right page.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →