It Looks Like It Works, So They Commit It
The AI gives you code. You run it. It works. You commit it. Nobody read a single line of what just went in. Do that a few hundred times across a team and you've built a codebase nobody understands. And now there's a new bill attached to that mess: tokens.
Heartbyte Team
Engineering & Strategy
Here's how a lot of code gets written now. A developer has a task. They describe it to an AI. The AI spits out forty lines. They paste it in, hit run, and it works. The page loads, the test goes green, the bug seems gone. So they commit it and move to the next ticket. Total time they spent actually understanding what the AI wrote: zero.
On its own, one commit like that is harmless. The trouble is it's not one commit. It's the default mode for a whole team, all day, for months. And "it ran on my machine" is about the lowest bar in software.
"AI is very good at producing code that looks right. Looking right and being right are two different things, and only one of them shows up when you press run."
"It works" tells you almost nothing
When you write code yourself, you carry a model of it in your head. You know why you put the check there, what happens when the input is empty, which part is fragile. When you paste AI code you skipped all of that. You got the answer without the thinking that's supposed to come with it.
And the AI's job, the way most people use it, is to make something that passes the quick look. It will happily write code that handles the one case you tested and quietly breaks on the five you didn't. It'll add a library you don't need. It'll catch an error and swallow it so nothing crashes, which feels great until that hidden failure becomes a support ticket three weeks later. None of that shows up when "it works" on the first try.
So the team keeps shipping. Every commit looks fine. The demo runs. Everyone feels fast. Under the surface, nobody can tell you how half the system actually behaves, because nobody wrote it. The machine did, and the machine doesn't remember.
This is technical debt, just faster
We've written before about technical debt and how it quietly eats a business. Committing code you don't understand is the same disease, sped up. You used to take on debt slowly, one rushed deadline at a time. Now you can take on a year's worth in a month, because the typing is no longer the slow part. The understanding was always the slow part, and that's exactly the step everyone's skipping.
It's the same thing we said about vibe coding letting people ship software they can't explain. Feels amazing for the first few weeks. Then you hit the wall every team hits: something breaks in production, and nobody knows why, because nobody knows how it works. You ask the AI to fix it, but the AI doesn't know your system either. It just writes more code that looks right on top of the pile that already nobody understands.
What "looks like it works" hides
- ▸ The cases you didn't test. Empty inputs, two users at once, the slow network. The AI handled the happy path and nothing else.
- ▸ Errors that got swallowed. Nothing crashes, so it feels safe. The failure just moved somewhere you can't see it yet.
- ▸ Five ways to do the same thing. Each commit solves it a different way, because the AI has no memory of the last one. The codebase has no single shape.
- ▸ Nobody who can explain it. When it breaks, there's no person to ask. The author was a model that's already forgotten the conversation.
The new part: a messy codebase now bills you by the token
Here's the bit that's genuinely new. Messy code used to cost you in slow developers and late nights. It still does. But now you also pay for it in a way you can measure straight off an invoice: tokens.
Think about how the AI works. To change anything, it first has to read the surrounding code and load it into its context. Every line it reads is tokens, and tokens are money. A clean, well-named, well-organised module is small and clear, so the AI reads a little, understands it fast, and gets the change right the first time. A tangled file where everything touches everything forces the AI to drag in half the project just to make sense of one function. More tokens, every single time, for the same job.
Then there's the retry tax. When the structure is bad, the AI guesses wrong. So you prompt again. And again. "No, not like that." "You broke the other thing." "Try again." Each of those rounds is another full read of the context and another generation. You're paying three or four times over to get one change that a clean codebase would've given you on the first ask.
"A clean codebase is cheaper to run with AI for the same reason it's cheaper for a human: less to read, less to guess, fewer wrong turns. The mess doesn't just slow you down anymore. It shows up on the bill."
And it compounds. The more code you commit without understanding it, the messier the structure gets. The messier it gets, the more the AI has to read and the more often it guesses wrong, so your token cost per change climbs month after month. You're not imagining it getting more expensive to ship small things. The debt you took on by not reading your own commits is now charging you interest, in tokens.
The loop that quietly drains the budget
Put it together and you get a nasty little cycle. It's slow enough that nobody notices until the numbers are ugly.
How the cost creeps up
- ▸ Commit AI code nobody reads → structure drifts, no single way of doing anything.
- ▸ Messy structure → the AI must read more to change anything → more tokens per task.
- ▸ More confusion → the AI guesses wrong → you re-prompt the same thing three times to get it right.
- ▸ To go fast again, people paste in even more code they don't read → back to the top, worse than before.
Every turn of that loop, your cost per change goes up and your understanding of your own system goes down. That's the opposite of what AI was supposed to buy you.
Good structure is the cheat code
The fix isn't to use less AI. We use a lot of it. The fix is to keep the thing the AI works on clean, because a well-structured project is cheaper and faster to work with, for both the human and the machine.
When files are small and do one job, the AI only needs to read that one file. When names say what they mean, the AI doesn't have to guess what handleData2 actually does. When there's one clear way to add a feature, the AI follows the pattern instead of inventing a new one every time. All of that means less context to load, fewer wrong guesses, and far fewer "no, try again" rounds. Same work, a fraction of the tokens, and you get the right answer sooner.
This is just the old truth that coding was never the hard part, showing up with a price tag. Structure, naming, and knowing how the pieces fit was always what separated a maintainable system from a swamp. Now that same discipline directly lowers your running costs. A clean project is the difference between the AI being a sharp junior who reads the room and one who needs everything explained from scratch every time.
"You can't keep a codebase clean if nobody reads what goes into it. The first habit that saves you tokens is the cheapest one: read the commit before you make it."
So what does a sane team do?
None of this means slowing down or banning AI. It means putting back the one step everyone deleted: actually understanding what you commit. That step is what keeps the structure clean, and the clean structure is what keeps the AI cheap and accurate. It all hangs together.
Habits that keep AI fast, cheap, and honest:
- ✓ Read what the AI wrote before you commit it. If you can't explain why it works, you can't fix it when it breaks. Treat the output like a junior's pull request, not a finished answer.
- ✓ Keep files small and one job each. The AI only has to read what's relevant, so each change costs fewer tokens and lands right more often.
- ✓ Pick one way to do things and stick to it. A consistent pattern means the AI copies it instead of inventing a fifth variant you'll have to untangle later.
- ✓ Watch the retries. If you're prompting the same thing three times to get one change, that's not the AI being dumb. It's your structure telling you it's confusing.
- ✓ Refactor the mess on purpose. Cleaning up a tangled area pays for itself in every future change, in both developer time and tokens.
This is how we run things at Heartbyte. We lean on AI hard, but we read what it gives us, and we spend real effort keeping the structure clean. Not because it's tidy and nice, but because it's the cheapest way to move fast and keep moving fast. A clean project lets us aim AI at the right spot and get the right answer on the first try, which is exactly where AI rewards the people who actually understand the problem.
The honest version
"It looks like it works, so I'll commit it" feels productive in the moment. You closed the ticket, the demo ran, the day moved. But you didn't actually finish the work. You handed it to your future self with the understanding stripped out, and now your future self pays for it twice: once in the bug nobody can trace, and again in the tokens it takes to wade through a mess to fix anything.
AI made the typing free. It didn't make the thinking free. The teams that win with it are the ones who kept reading their own code, kept their structure clean, and used the speed to ship things they still understand. Everyone else is just running up a tab they'll be paying off, by the token, for a long time.
Want software you can actually understand and afford to change?
We use AI to move fast and keep the structure clean enough that the next change is cheap, not a fight. If your codebase has turned into a mess nobody can explain, let's talk about getting it back under control.
Talk to Us About Your ProjectHeartbyte Team
Heartbyte is a bespoke software development company based in Malaysia. We build web, mobile, and custom software for ambitious businesses, using AI heavily and keeping our code clean enough to understand and cheap to change.