WhoBuilt

Benchmarking Coding Agents on New vs Legacy Codebases

Aug 8, 2026· 18 min· 3.4K views·Watch on YouTube

Speaker

Denys Linkov of Wisedocs discusses whether and when to refactor a legacy AI pipeline, drawing on his company’s experience with complex medical claims.

Why tech debt became a business problem

In 2025, Wisedocs was struggling to meet customer demand, update a complicated AI pipeline, and maintain more than 10 repositories that developers avoided. The company processes medical claim PDFs that can exceed 10,000 pages, making the pipeline difficult to scale. Linkov frames technical debt as a tradeoff: complexity can quickly outweigh the return from shipping features or gaining customers.

How AI tools changed the refactor work

Wisedocs spent about two months evaluating five open-source orchestrators against 17 criteria, then built proofs of concept with a team of three. Linkov estimates current research tools could make that work 90% faster, while warning that research reports need checking against real product capabilities. An earlier Temporal implementation took three hours of back-and-forth with Cursor and involved 10 major mistakes; later tests with Sonnet 4.6 and Opus 4.8 needed fewer iterations, and he estimates the same task would take about one-fifth as long now.

What agents can and cannot do reliably

Linkov says newer models can execute well-constructed specifications more capably, but engineers still need a realistic sense of task reliability. He argues that 80%, 90%, or 99% success rates are more useful planning benchmarks than 50%, since a long-running task with a coin-flip chance of success can waste time and compute. In his zero-shot refactor experiment, GPT-5.5 extra high finished in 10 minutes and 22 seconds but produced scaffolding rather than the underlying models.

What the monorepo changed

Wisedocs moved 10 repositories into a monorepo and reached feature parity with the old codebase within six months, then continued shipping features. More developers began contributing across the stack, and Linkov says the company reduced pipeline time and costs, supported larger files, and cut some feature work from months to under a week. Developers also found the new codebase cleaner and patterns from it spread to other repositories.

Why the refactor was worthwhile

Linkov acknowledges that better models and tooling may make future refactors easier, but AI-generated code can also accumulate low-quality implementation that teams do not understand. He says the refactor was worthwhile because Wisedocs had first built patterns to meet customer needs, then used cleanup to accelerate delivery and improve the pipeline. Teams can also isolate parts of a codebase and add guardrails without committing to a full refactor.

Takeaways

  • Treat technical debt as a business tradeoff: compare its ongoing cost with the value of the work it enables.
  • Verify AI research against the actual capabilities of tools and libraries before committing to a design.
  • Use high-confidence success rates when deciding whether to hand a long task to an agent.
  • Check agent output for working behavior and validation; fast scaffolding is not a completed refactor.
  • A monorepo can make cross-stack contributions and end-to-end verification easier, but weigh that against the cost of migrating.

Mentioned in this talk

Search inside this talk

What was claimed 8

  • feature
    Wisedocs: Processes complex medical claims from PDFs over 10,000 pages long
    “Wisedocs, processes complex medical claims, which are PDFs more than 10,000 pages long.”
    YouTube
    Unverified1 source· Talk
  • metric
    Claude Opus 4.8: Nearly completed the refactor task in one shot
    “Opus was basically able to one-shot the problem”
    YouTube
    Unverified1 source· Talk
  • metric
    Claude Sonnet 4.6: Solved the refactor task with one additional iteration
    “Sonnet 4.6 solved the task with one additional iteration”
    YouTube
    Unverified1 source· Talk
  • feature
    METR: Publishes evaluations of how long models can complete tasks at different success rates
    “This graph is commonly used to map how long models can complete tasks in different categories.”
    YouTube
    Unverified1 source· Talk
  • metric
    Wisedocs: Refactor consolidated 10 repositories into a monorepo
    “we had these 10 repositories, put them into a monorepo”
    YouTube
    Unverified1 source· Talk
  • metric
    Wisedocs: Refactor took six months to reach parity with the previous repositories
    “Within the first six months of the rebuild, when we reached the parity we had before”
    YouTube
    Unverified1 source· Talk
  • metric
    GPT-5.5: Completed the assigned goal in 10 minutes and 22 seconds but wrote only 2,000 lines of scaffolding without implementing the models
    “It completed its goal in 10 minutes and 22 seconds.”
    YouTube
    Unverified1 source· Talk
  • metric
    Wisedocs: Reduced the time required to ship some features from multiple months to under a week
    “features that would have taken multiple months in under a week”
    YouTube
    Unverified1 source· Talk

Related talks