Models that write clean demos but break my repo — I needed one that reads before it touches

Hot take: most "coding models" are optimized for greenfield toy projects. Give them a blank file and a 3-line prompt, they'll produce beautiful code. Drop them into a real 3-year-old codebase with accumulated technical debt and implicit constraints, and they start making changes that break edge cases from 2019.

I've been through this cycle with a LangGraph project (~18K lines). The pattern:

Ask a model to refactor the chain router

It produces clean code that ignores the existing retry middleware

Deploy passes, but 40% of requests now fail silently because the retry logic was "optimized away"

Fix it manually. Repeat.

Someone on a coding agent forum put it perfectly: "The test isn't whether a model writes clean code from scratch. The test is whether it respects the code that's already there."

So what actually worked:

I tried using a model with a genuinely large context window for incremental development on real repos. Ling 2.6 1T has a 1M token context window, which meant I could actually feed it the entire relevant project context — not just the 3-5 files near the bug, but the middleware config, the error handler, the integration test suite, and the known edge case documentation.

It reads the whole thing before touching a line. That's the difference.

Here's my workflow with Ling 2.6 1T now:

Dump context (not code fragments). I give it the PRD, the error logs, the relevant source files, and the existing test results. The 1M context window handles this without me having to cherry-pick "important" files — I just dump the mess and let it sort it out.

Plan-first, then patch. Ling 2.6 1T doesn't auto-generate code. It's a non-thinking model with plan-first execution, so it reads the context, identifies what needs to change, outputs the plan ("here's the root cause, here's the affected files, here's the change order"), and then — and only then — it generates the patches. This means I can review the plan before any code changes.

Small, reviewable diffs. Instead of a 40-file monster PR, I get focused patches targeting specific files. Because it understands the full context, it doesn't need to "re-generate" unrelated files to make changes.

The results weren't dramatic benchmarks. They were practical:

Fewer regression bugs on incremental changes (went from ~30% of PRs introducing regressions to ~8%)

Actually respects existing patterns — it follows established conventions instead of "improving" them

Works well for the boring stuff: fixing bug fixes, patch generation, small refactors

Ling 2.6 1T isn't the flashy "generate an entire game in one shot" model. And that's exactly why it works on real repos. It reads before it writes. It plans before it patches. And the 1T parameter size means it actually comprehends the full context instead of just pattern-matching the nearest file.

Question for people working on real codebases: what's your approach to giving a model "enough" context without exceeding its window? I've been using the 1M window of Ling 2.6 1T to just dump everything, but I'm wondering if that's overkill for smaller repos.

Posted May 10, 2026, 2:10 PM UTC

10
Loading comments…