AI coding assistants produce code that ships fast but becomes expensive to change sooner than hand-written code does. That is the core argument of Evan Merz's essay, and it holds up: the code works, but it lacks the architectural coherence that makes later changes cheap.
The catch is timing. The fragility is invisible on day one. It builds quietly, and most teams find it during the sprint where every change breaks something else.
Small teams, solo founders, and agencies are the most exposed. They adopted these tools aggressively, often without the code review that larger organisations use to catch structural problems early.
What AI-generated fragility actually means
Merz isn't saying AI writes buggy code. His point is narrower. AI writes brittle code, which works until you need to change it. Then the missing architecture starts costing you.
The mechanism comes from how these tools work. GitHub Copilot, Cursor, and Claude Code generate code by pattern completion. They predict what should follow from the context they're shown.
That produces locally coherent code: a clean function, a tidy component. It does not produce globally coherent architecture. The AI sees what you show it and infers patterns from nearby files. It has none of the long-term mental model the original developer carries.
The failures fall into five recognisable patterns.
Duplication. Each prompt is roughly independent. Ask for user validation in one session and input sanitisation in another, and you may get two overlapping functions. They aren't exact duplicates. They're cousins that drift apart over time. A reviewer would catch this, but a solo project moving fast often has no reviewer.
Generic error handling. AI-generated code tends to catch broad exceptions, log them, and return a safe default. The code rarely crashes, but it often fails silently. Silent failures are the hardest to debug because there's nothing to trace.
Prompt-shaped architecture. This one does the most damage and is the hardest to see. Build incrementally through prompts and the structure mirrors your prompts, not your domain.
Ask for "a user system", then "order management", then "notifications", and you get three separate systems where shared infrastructure belonged. The seams between them become the brittle joints, and nobody planned them.
Missing tests. AI tools write tests when asked, but fast-moving developers skip the step. When tests do get written, they usually cover only the happy path. Speed creates the illusion that you'll refactor later. With no tests to prove a refactor is safe, refactoring actually gets harder.
Lost domain meaning. A function named computeAdjustedRetentionScore encodes real understanding of the business. AI-generated names are locally descriptive but carry no larger domain model. You can read the code line by line and still not understand the system.
The trajectory Merz describes is a familiar one. The early months feel like a superpower, with high velocity and impressive demos. Later, features take longer than expected, changes ripple unpredictably, and nobody can say with confidence what a module depends on.
AI doesn't necessarily write worse code than an average developer. It writes code faster than most teams can apply the architectural discipline needed to absorb it.
Why AI coding fragility is a bigger risk now
Three shifts made this practical rather than theoretical.
The tools now make architectural choices. Multi-file editing and larger context windows mean AI can scaffold whole features across several files. When it only autocompleted a few lines, humans still owned the architecture. Once it generates entire modules, it starts making structural decisions, and those may not fit the rest of the system.
The users changed. Early adopters were senior engineers who could judge what came back. Usage now includes junior developers, non-technical founders building MVPs in tools like Cursor or Bolt, and freelancers stretching past their experience on client work. These users are less able to spot structural problems as they accumulate.
Vendor incentives point one way. Tool vendors have every reason to stress velocity and say little about maintenance. That's not sinister. It just means the maintenance side of the trade-off is yours to account for.
How fragile AI codebases hurt small teams
A few scenarios show where the cost lands.
The solo founder's MVP. A technical founder builds an MVP in a few months, mostly through iterative prompting in Cursor. It gets traction, so they hire a first engineer. That engineer can't form a mental model of the code. The abstractions are inconsistent, nothing maps to a recognisable pattern, and there's no documentation because the founder never needed any.
If your MVP was built mostly through unconstrained prompting, budget time for architectural consolidation before you hire. Otherwise you're paying senior rates for archaeology.
The agency on retainer. A three-person agency uses AI to raise throughput, and delivery speeds up. Then the client returns with change requests, and modifications take far longer than estimated. The AI had written database queries directly into view logic because the prompt implied it, so there's no abstraction layer to absorb changes.
On a retainer, every hour spent untangling that is lost margin. If the client later takes the code in-house, they'll form opinions about what they inherited.
The freelancer inheriting someone else's code. A freelancer takes on an extension project and finds four versions of the same validation logic, inconsistent error handling, and no tests. Changing anything feels risky. The choice is between unpaid hours learning the code and wrapping new code around the fragile parts, which makes things worse. Inherited AI codebases are common enough now to justify a paid discovery phase.
Two developers, no owner. In a small startup where both developers prompt heavily, each "owns" only the features they generated. The person who prompted a feature may know what it does but not how it does it. That gap is where fragility lives.
The operator who codes a little. A founder builds internal tools with Claude Code, and they work. Then a requirement changes, say a new user role, and the feature needs an effective rewrite. The founder can't see why, can't fix it reliably, and can't hand it off. The tools gave them real capability. They just didn't show where it ran out.
Workflow habits that keep AI-generated code maintainable
None of this argues against AI coding tools. It argues for using them differently.
Write the architecture first. Before prompting for implementation, spend about 30 minutes describing your data model, main components, and how they interact. A Markdown file in the repo is enough. Include it as context in every prompt, and reject generated code that doesn't fit it.
Set naming conventions and put them in the prompt. Inconsistent naming is one of the clearest signs of AI-generated fragility. A short conventions document included in each session prevents a whole category of drift. These tools follow explicit constraints well when you actually give them.
Keep prompts bounded. "Write a function that validates an email address according to RFC 5321" yields better code than "build me a user authentication system". The bigger the prompt, the more architectural decisions you hand over. Break large tasks into small pieces you understand before moving on. It's slower to prompt and faster to maintain.
Ask for tests first. Have the AI write tests for the behaviour you need, then prompt for an implementation that passes them. This forces a precise specification and leaves a safety net for future changes. It adds roughly 20% to generation time. If I could keep only one of these habits, it would be this one, because every later fix depends on it.
Make the AI explain itself. Don't stop at "does it run". Ask why it chose this structure, what alternatives it considered, and which edge cases it ignores. That surfaces hidden assumptions, and it's also the fastest way to build your own mental model of the code.
Review the architecture on a schedule. Every four to six weeks, spend a day looking at structure rather than individual lines. Check whether modules sit where you expected, whether the dependencies are the ones you intended, and whether similar patterns have spread to several places. The aim is to stop compounding, not to fix everything.
Which AI coding tools carry more fragility risk
Fragility risk tracks how many structural decisions the tool makes on your behalf.
| Tool | Working style | Best for | Fragility risk |
|---|---|---|---|
| GitHub Copilot | Inline autocomplete in existing IDEs | Line-level generation | Lower: humans still write the structure |
| Cursor | AI-native IDE with multi-file editing | Iterative feature work | Moderate: depends heavily on prompting discipline |
| Windsurf | Agentic "Cascade" mode for longer sequences | Faster autonomous iteration | Higher: more decisions made without you |
| Claude Code | Reasoning-heavy assistant | Architecture discussion, explaining choices | Moderate: follows architectural constraints when given them |
| Aider | CLI-first, Git-native, any backend LLM | Developers who want maximum control | Lower: human stays in the loop |
| Devin | Fully autonomous agent loop | Well-specified, isolated tasks | Highest on anything not tightly scoped |
Cursor or Aider with deliberate prompting gives most small teams the best balance of speed and maintainability. Still, discipline matters more than the tool. Switching to a smarter model won't rescue an undisciplined workflow.
A few risks deserve their own mention. Bigger context windows reduce duplication, but they don't fix prompt-shaped architecture or lost domain meaning. Junior developers using AI need senior review, and many small teams have no senior reviewer at all. Code tuned to the scenario in the prompt can pass in development and break on real data or concurrent load, so integration testing matters. And if your velocity depends on one specific tool, a pricing change or acquisition will hit you directly. Keep your core practices tool-agnostic.
When to act on AI codebase fragility
The default loop of prompt, accept, ship, repeat trades future architectural cost for speed now. Sometimes that's the right trade. MVPs, throwaway prototypes, and short-lived internal tools are reasonable places to make it. The problem starts when nobody chose the trade on purpose.
If your AI-assisted codebase has been in production for more than six months, run three checks. Can you predict every file that changes when you modify a core data model? Could a new developer form an accurate picture of the architecture from the code itself? Do your critical paths have tests? Three "no" answers means fragility has accumulated, and a one-week consolidation sprint now costs far less than months of drag later.
Treat these tools like a skilled contractor with no long-term memory. They're excellent at executing clear specifications and unreliable at architectural decisions you haven't thought through yourself.
Frequently asked questions
Is AI-generated code worse than code from an average developer? Not on day one. It's often syntactically cleaner and well commented. The gap shows up in structural quality as the codebase ages, because human developers bring domain knowledge and consistency the tools don't supply on their own.
Should agencies tell clients their deliverables were AI-assisted? Yes. It affects the client's future maintenance costs and hiring needs. Build a consolidation week into each major deliverable and list it as a line item in the contract rather than absorbing it as overhead.
Can AI tools fix the fragility they created? Often, yes. Give the tool the current structure, the target structure, and your constraints, and it can refactor well. Put a test suite in place first, though, because AI refactors can be locally better while introducing new fragility.
Which tasks are safest to hand to an AI coding tool? Bounded, well-specified work: a defined algorithm, a function with explicit inputs and outputs, boilerplate for a known pattern, or tests for an existing interface. Data model design, service boundaries, and shared infrastructure deserve more human judgement before you accept anything.