This week, Sourcegraph published the results of analyzing 1,281 coding agent runs across more than 40 open-source enterprise repositories, and found something that contradicts the dominant narrative about coding agents: when an agent fails on a large codebase, it's almost never because the model "isn't smart enough." It's because it loses efficient access to context. It matters today because while the 2026 narrative has been "add more agents, go faster," most development teams —and the agencies selling them that promise— are still operating on codebases that are years old, with thousands of files and nobody who understands them completely.
The central finding: there's a threshold where agents stop working
Sourcegraph's study identified five recurring failure patterns, but the most forceful is the first: above 400,000 lines of code, conventional search tools —grep, file reading— start failing systematically. It's not a gradual degradation; it's a point where the search space becomes, in the report's own words, "structurally intractable" for an agent without more sophisticated context engines.
The other four patterns they documented:
- Search quality, not quantity. When a repository has multiple files named
handler.goor__init__.py, keyword search returns hundreds of irrelevant results and the agent can't tell critical code from legacy or test code. - Incomplete refactors. Half-done changes across interdependent files create hidden inconsistencies; tasks that touched several repositories at once showed much larger performance gaps than single-repository ones.
- The cost of "tool thrashing." In one of the benchmark tasks, giving the agent more efficient search tools cut the process from 96 calls in 84 minutes to just 5 calls in under 5 minutes — a 30% cost reduction and a 38% speed improvement across the whole dataset.
- More tools doesn't mean better performance. Counterintuitively, giving agents more search options made them perform worse: they diluted their context window with irrelevant results instead of improving precision.
Why this isn't a "better model" problem
The study's conclusion is uncomfortable for anyone selling the idea that the next model will fix this on its own: the difference between a run that finishes perfectly and one that fails completely wasn't the underlying model's intelligence, but how efficient the access to context was. An agent with a bigger model but poor search is still lost in a half-million-line repository.
What's already happening in real companies, not just in the benchmark
Dan Adler, CEO of Sourcegraph, put it in cruder terms this week: he described what he's seeing as "a tsunami of code" that companies can't absorb at the pace it's being generated. Some examples he cited:
- A senior technical leader at a top-10 automaker admitted about part of his own system: "I don't know what this code does. The AI wrote it for me."
- A top-ten U.S. bank had to review and fix code across 90,000 repositories after discovering a supply chain vulnerability.
- In a case at Mercari, an agent that started out investigating just two known vulnerability locations ended up finding 80 additional vulnerabilities across the rest of the codebase.
The broader context: according to figures cited in the same report, 72% of people who work in software do so at companies with 500 employees or more — in other words, most developers aren't writing new projects from scratch, they're bringing agents into huge systems that existed before agents did.
What this means for agencies and developers
If your agency is already selling (or using internally) coding agents as a way to speed up deliveries, this is the study you should review before promising a timeline based only on "now we have AI":
- Measure the real size of the codebase before promising speed. A 20,000-line greenfield project and a 600,000-line legacy system don't behave the same with the same agent, even if you use the same model. The 400,000-line threshold Sourcegraph found is a concrete signal of when you need context infrastructure (indexing, semantic search, code graphs) before letting the agent loose.
- Don't confuse "the agent finished the task" with "the agent understood the system." The case of the technical leader who doesn't know what his own code does is the real risk: fast deliveries that nobody on the team —human or agent— can maintain six months later.
- Review multi-file refactors more carefully than isolated changes. The study is explicit: tasks that touch several repositories or interdependent files are the ones that fail most silently. That's where a human reviewer is worth it before merging, not on a one-line change.
- Don't give the agent every available tool by default. The finding that "more tools = worse performance" should change how you configure an agent's access: fewer, better-curated options almost always win.
The underlying lesson for agencies and product teams in 2026 isn't "coding agents don't work on large codebases." It's that the speed of code generation has far outpaced the speed at which companies can index, understand and maintain that code — and that is exactly the infrastructure work a serious agency should be selling alongside the automation, not after the client discovers 80 vulnerabilities nobody knew existed.
At Geek Vibes we help teams diagnose how ready their codebase is to scale the use of agents —and to build the context layer they're missing before a half-done refactor turns into a security incident. If your team is bringing coding agents into a system that has been growing for years without that map, write to us at comercial@geekvibes.agency.



