Why AI coding tools fall apart on large codebases
By Anwar Benhamada · August 6, 2026
Every AI coding tool demos on a small, clean project. That’s not dishonest — it’s just where they work best, and the gap between that and a mature codebase is where most disappointment comes from.
Three things change at scale.
1. It can’t see your codebase
Context windows are large but finite, and a real repository is much larger. Every tool therefore has a retrieval step deciding which slices of your code to show the model — and that step, not the model, is what determines quality.
Retrieval fails in a specific way: it finds code that looks relevant and misses code that is relevant. The function that matters is called something unexpected, or the constraint lives in a config file nobody would search for.
The result is confident code that ignores a rule enforced three directories away. Which brings us to the real problem.
2. It doesn’t know your conventions
Every mature codebase has rules that exist nowhere in the code: this layer never calls that one, errors are wrapped in this shape, that module is deprecated but not deleted.
A model sees only patterns in the code it retrieved. If half your codebase uses an old pattern you’re migrating away from, that’s what it’ll copy — and it will do so fluently.
Working fix: keep a conventions file the tool reads on every request. Which patterns are current, which are deprecated, what never to do. It’s the highest return-per-word of anything you can write for these tools.
3. Verification cost overtakes generation savings
On a small project you read the generated code and know if it’s right. In a large one, “is this right?” means understanding call sites, side effects, and implicit contracts.
That’s the real economics:
If verifying takes longer than writing it yourself, the tool has negative value regardless of price.
And it degrades non-linearly. The tool feels great on isolated additions and gets steadily worse the more your change touches.
Where they genuinely work at scale
The pattern that holds up: small, verifiable, well-specified changes.
- Writing tests for existing code — behaviour is specified, verification is running them
- Mechanical refactors across many files
- Boilerplate that follows an established local pattern
- Explaining unfamiliar code — no verification burden at all, and one of the most underrated uses
- First drafts you were going to rewrite anyway
Where they don’t: cross-cutting architectural change, anything depending on unwritten constraints, and anything where “looks right” and “is right” are hard to tell apart.
Practical adjustments
Give it the constraint explicitly. Don’t hope retrieval finds it. Paste the interface, the convention, the thing it must not break.
Work in smaller diffs. A 40-line change you can verify beats a 400-line one you can’t.
Watch for confident wrongness. Output that fails loudly is safe. Output that silently does the wrong thing is expensive, and these tools produce the second kind far more often than the first.
Measure on your own repo, not the demo. Take ten real tasks from your backlog — including two you expect to fail — and run them three times. The demo’s repo isn’t yours, and the difference is the entire point.
For how the main options differ on exactly these criteria: best AI coding assistant for a real codebase →