← Latest papers
💻 computer science

SkeletonGraph: A Zero-LLM Structural Retrieval Engine for Coding Agents, and Why Its Gains Land in the Cost Tail, Not the Median

This paper introduces SkeletonGraph, a structural retrieval engine that significantly improves function-level code localization and reduces costs for coding agents in the expensive tail of task distributions, yet fails to lower median costs or boost solve rates because its effectiveness is constrained by repository familiarity and cannot replace the agent's own learning from reading code.

Original authors: Yash Doke

Published 2026-08-20
📖 7 min read🧠 Deep dive

Original authors: Yash Doke

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

Imagine a team of highly skilled digital assistants, each equipped with a vast library of code and a powerful brain capable of understanding complex instructions. These assistants are tasked with fixing bugs in massive software projects, a job that requires them to find the exact piece of code that is broken, understand how it fits into the whole system, and then rewrite it correctly. For a long time, the industry believed that the biggest bottleneck for these assistants was simply finding the right file. The prevailing theory was that if we could build a better map or a smarter search engine to hand the correct file to the assistant immediately, we would save a tremendous amount of time and money. It seemed logical: if the assistant doesn't have to wander through thousands of files to find the one it needs, it should finish the job faster and cheaper.

This belief drove a wave of new tools designed to act as structural retrieval engines. Instead of letting the assistant read through text line by line, these tools analyze the code's architecture, understanding how functions call one another, and serve up the exact function the assistant needs to edit. The promise was dramatic: some developers claimed these systems could cut costs by ninety-nine percent. But a new study challenges this optimistic view, suggesting that while these tools do find the code better, they do not necessarily make the job cheaper for the average task. The researchers found that the savings are not spread evenly across all jobs; instead, they appear only in the most difficult, expensive cases, leaving the typical task just as costly as before.

The study, conducted by independent researcher Yash Doke, set out to test these claims in a real-world setting. The team built a system called SkeletonGraph, which acts as a specialized librarian for coding agents. Unlike standard search tools that look for keywords in text, SkeletonGraph understands the structure of the code. It knows that a function is a specific unit of work and can trace how different parts of a program connect. To test its effectiveness, the researchers pitted this new system against a standard, built-in text search tool used by a leading coding agent, Claude Code. They ran both systems through one hundred real-world coding tasks, ensuring that every proposed fix was actually tested by running the project's own software tests to see if it worked. This was crucial, as it meant they were measuring the actual cost and success of the entire process, not just how well a search engine performed in isolation.

The results were striking in their precision but surprising in their financial impact. When it came to finding the right file to edit, the new structural system was significantly better. On its very first try, it located the correct file for eighty-six percent of the tasks, whereas the standard text search only found the right file sixty-six percent of the time. The difference was even more dramatic when it came to identifying the specific function within a file that needed changing. The new system identified the correct function about eighty percent of the time, while the standard text search, which is designed to match lines of text rather than logical blocks of code, could not name a single correct function. In this sense, the structural tool was undeniably superior at its primary job: it found the right neighborhood and pointed directly to the right house.

However, when the researchers looked at the cost, the story changed. They expected that because the new system found the code so much faster, the total bill for each task would drop significantly. Instead, they found that for the typical, medium-difficulty task, the cost actually went up slightly, by about two percent. The massive savings did not appear in the middle of the pack; they were hidden entirely in the tail end of the most expensive, difficult tasks. For the hardest twenty-five percent of tasks, the new system reduced costs by roughly sixteen percent, and for the most difficult five percent of tasks, it slashed costs by forty-two percent. The average saving across all tasks was about fifteen percent, but this number was misleading because it was driven almost entirely by a few runaway cases where the standard system had gotten lost and spent a fortune. For the vast majority of tasks, the new system did not make the job cheaper; in fact, for the easiest tasks, it made them slightly more expensive.

The researchers discovered the reason for this disconnect by looking at how the coding agents actually worked. They found that the total amount of information the agent had to hold in its memory at any one time remained almost exactly the same, whether it used the new structural tool or the old text search. The agent still needed to understand the same amount of context to write the fix. The new system simply delivered that context earlier in the process. Because the agent had to re-send all the information it had gathered so far with every new step it took, delivering the right file early did not reduce the total volume of data processed; it only reduced the number of steps the agent took to get there. The agent still had to spend time writing the code and running tests, which made up the bulk of the work. The new system saved the time spent wandering, but it could not save the time spent building the solution.

This led to a counterintuitive finding about how these agents learn. When the standard text search system was allowed to search and read files on its own, it often ended up reading more files than the structural system, but in doing so, it learned the specific vocabulary and patterns of that particular codebase. This "learning by doing" allowed it to search more effectively as the task progressed. The structural system, by handing over a ranked list of files immediately, sometimes prevented the agent from exploring and learning the code's unique language. In three out of four conditions tested, the standard system eventually found the correct files just as often as the structural system by the end of the task, simply because it had explored more. The structural system was faster to the starting line, but the finish line was the same.

The study also tested whether the quality of the problem description mattered. They stripped away technical details like error logs and code snippets from the task descriptions, leaving only plain English explanations. They expected this would make the structural system struggle, but it did not. The system's ability to find the right code remained stable, suggesting it relies on the structure of the code itself rather than the specific clues in the problem description. However, they found that the system performed significantly worse when the codebase was completely new and unfamiliar to the model, dropping its success rate from nearly eighty-eight percent to about fifty-nine percent. This showed that the system's success depends heavily on the model's prior knowledge of the repository, not just the quality of the search tool.

Ultimately, the paper concludes that structural retrieval is a tool for preventing disasters rather than optimizing the average. It acts as a safety net that stops the most expensive, difficult tasks from spiraling out of control, but it does not make the routine tasks cheaper. The researchers argue that the industry has been measuring the wrong thing. By focusing on how many tokens are saved in a single search, developers have been ignoring the fact that the total cost is determined by how many steps the agent takes and how much context it must carry. The new system shortens the path to the answer, but it does not shrink the size of the answer itself. For the typical user, the bill will not go down; for the user facing a complex, broken system, the bill will be significantly lower. The value of this technology is not in making the easy jobs cheaper, but in ensuring that the hard jobs do not become impossible.

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 →