← Writing

What actually goes wrong in AI-built code

6 December 2026 · Engineering · 7 min read

The apps work. That is the first thing to understand. People ship AI-assisted software, it takes payments, it gets users, and nothing catches fire. The problem shows up later, when the second year of changes costs three times what the first year did.

We read a lot of these codebases. One pass covered 145 of them across our own ventures, a partner organisation, and personal projects. The reading was read-only and the method is documented, so the claim is checkable. What follows is not a statistical survey. It is the list of faults we keep meeting, roughly in the order they cost money.

Nothing here is exotic

None of these are clever bugs. They are ordinary neglect that one person could fix, and that nobody fixes because the app still loads.

1. Tests that do not exist, or do not run

A test suite you cannot run is worse than no suite. It looks like safety. The common version is a suite that fails to load because of a config problem nobody noticed, so the count reads as passing.

Cost: every later change is a coin toss. You cannot refactor, because you cannot tell what you broke. Check it by running the tests yourself and reading the exit code, not the summary line.

2. The type checker is switched off

Count the `@ts-ignore`, `@ts-expect-error` and `as any` lines. Then look at whether strict mode is on. In a fast build, turning strict off is a reasonable trade. Leaving it off after launch is not, because it removes the one tool that catches a change before your users do.

grep -rn "@ts-ignore\|@ts-expect-error\|: any" src | wc -l

3. A committed .env file

This is the one to check tonight. A file named `.env` in the repository usually means a live key spent time in git history. Rotating the key is the fix. Deleting the file is not, because the history keeps it.

4. Build output in the tree

`node_modules`, `dist`, `.next` and `build` committed to git make every clone slow and every merge noisy. They also hide which dependency was actually used, because the lockfile usually went missing at the same time.

5. No lockfile, or two of them

No lockfile means the next install can bring a different tree than the one that works. Two lockfiles means two package managers disagree and nobody knows which one built the current deploy. Both are cheap to fix now and expensive to fix during an incident.

6. One file that holds the app

We sample for files over 900 lines. The pattern is a single component that owns state, layout, data fetching and formatting. It is not a style problem. It means every two people who work on it conflict, and every test of it needs the whole app.

7. Raw HTML injection

`dangerouslySetInnerHTML`, direct `innerHTML` assignment and their equivalents. Sometimes there is a real reason. Often the reason is that a string was pasted in and it worked. Whether it is a vulnerability depends on where the string comes from, and that is worth ten minutes of tracing.

8. eval and new Function

Rare in production code, common in code that was generated to solve a parsing problem quickly. It defeats bundling, breaks analysis tools, and turns any input that reaches it into executable code.

9. Screens that only work with the demo data

The dashboard is beautiful and every number is seeded. The empty state was never built, so the first real user sees a blank page or a crash. This fault survives every code review because reviewers run the demo.

Check it by signing up as a new user in an incognito window and going nowhere near the sample data.

10. No path for a failure

Every fetch assumes success. There is a loading state and a success state, and nothing else. Then the third party rate limits you, the promise rejects, and the screen stays on the spinner forever. A user cannot tell that apart from a slow network, so they refresh and try again.

What this list is not

It is not a security audit. We read at most 40 files per repository, and we cannot see what we did not sample. A clean result means we found nothing in the part we read. It does not mean the app is safe, and any tool that tells you otherwise is overstating what a scan can know.

It is also not an argument against AI-assisted development. Building with these tools is how a single person ships a working product at all. The list exists because the same shortcuts recur, they are findable, and the cost of finding them early is measured in hours rather than quarters.

The bill arrives as a decision

The expensive part is rarely a crash. It is the feature you keep postponing because touching the code that would hold it feels risky. That is when a working app starts to feel like a liability, and it happens months after the decisions that caused it.

If you want the first seven of these checked on your own repository, SlopCheck runs a free structural scan and shows you the exact lines it found. No account, and it reads only what you make public.

Axion Ventures is a software studio in Melbourne. We read AI-built codebases and tell you what it will cost to own them.

Get a structural read of your repository →