C
ChaoBro

AI coding agent maintenance costs: when AI-written code starts piling up, should developers go back to hand-coding?

AI coding agent maintenance costs: when AI-written code starts piling up, should developers go back to hand-coding?

When AI coding tools launch, the PPT always shows one number: "10x productivity."

Nobody shows the second number: how much does maintenance cost increase?

A post on Hacker News went viral this week — "I'm going back to writing code by hand." The author isn't a Luddite — they're a developer who made this decision after using various AI coding tools. 121 points, 51 comments. The comment section split into two camps: one saying "finally someone speaks the truth," the other saying "you're using the tools wrong."

Both sides have a point.

AI writes code fast, but maintaining someone else's code — even AI's — has never been fast

This isn't a 2026 problem. The software engineering world has long known: reading code takes far more time than writing it. AI amplifies this inequality.

When Claude Code or Codex generates 500 lines of code in 30 seconds, you save writing time. But three months later, when that code has a bug and you need to understand why it was written that way, what implicit assumptions it depends on, whether changing a variable will affect something else — none of that time was saved.

Two overlooked costs

First: review cost. AI-generated code looks correct — syntax is right, logic is sound, tests pass. But it may introduce abstractions you don't need, over-engineered patterns, or a bug that only triggers under specific edge conditions. Reviewing 500 lines of AI code can take longer than writing 200 lines yourself.

Second: knowledge dilution cost. If you let AI write your core business logic and you haven't read it line by line — nobody on your team truly "understands" that code. When problems arise, nobody can intuitively locate the issue; they have to read from scratch.

But don't throw away AI tools yet

A top-voted reply in the HN comment section put it well: "The problem isn't AI writing code — it's 'mindlessly accepting AI output.'"

AI coding agents genuinely deliver 10x productivity in these scenarios:

  • Boilerplate: CRUD interfaces, data model definitions, config files
  • Known pattern refactoring: converting callbacks to async/await, class components to hooks
  • Test generation: creating unit test scaffolding based on existing code
  • Documentation and comments: supplementing complex functions with docs

But stay vigilant in these scenarios:

  • Core business logic: every judgment here has business meaning, AI doesn't understand your business
  • Performance-critical paths: AI tends to write "correct" code, not necessarily "fast" code
  • Security-sensitive code: AI may miss boundary condition checks or introduce unnecessary dependencies

A practical workflow

My approach on projects: AI generates, I review; AI suggests, I decide.

Let the agent write the first draft, but before every line merges to main, I go through it. Not line by line, but with questions: what problem does this code solve? Is there a simpler way? Will the colleague who takes over in six months curse at this?

If the answer is "not sure," rewrite it yourself.

The next phase of AI coding

Someone in the HN comments made a good point: the real question isn't "should AI write code," but "we haven't yet built engineering discipline for managing AI-generated code."

Code review processes need to adapt to the AI era. Maybe future PR templates need a field: "What percentage of this code is AI-generated? Which parts did you review?"

Maybe CI pipelines need AI code quality detection — not detecting "is this AI-written," but "how maintainable is this AI code."

This infrastructure isn't mature yet. But it will be, eventually.


Sources: