Vibe coding gone wrong: what breaks and what to do

What vibe coding is, and why it goes wrong
In software development we have two main ways of creating things. The first is to speed towards an MVP (a minimum viable product) and break things. We take shortcuts and just try to get it out, then over time we go back and refine those things. Just ask anyone who plays modern computer games, especially on day one. The other option is to spend a lot of time planning, testing your plans and creating backup plans. Which one we choose is complex and depends on lots of factors. AI agents, on the other hand, choose the first path most of the time if left to it.
Sadly, this is where things often go wrong with vibe coded systems. When an individual or a team creates software, we put in a lot of planning. Often we work on one part of a system while prepping another to be addressed later, laying the groundwork. When an agent makes a change, there is no planning or consideration. The focus is on the task, and everything around it is just someone else's thing.
You started with the idea of a single system made up of parts, and now you have a system where every part needs its own type of screw, and managing it becomes a nightmare.
Signs your site needs help
You want to change how the buttons look on your site. You ask your AI agent, “You know all the buttons on the product page and the wider site? Can you make them orange and brown for autumn?” Most look perfect, but on some of the contact forms the background has changed but not the font, and on others the font has changed but not the background. Recently every change has been like this, and it feels like it's getting worse. Is it the AI model you are using? Are you getting lazy with your prompts?
It's not the agent and it's probably not your prompts, but keep an eye on them and on best practices. The more the agent takes the shortest path, the more it reuses part of some code and recreates the rest. It is building itself an ever more complex and tangled web of interconnected systems. The longer it's left, the worse it becomes. So when you prompt for changes and other things break, stop and ask whether the agent making more code changes will help or not.
What you can check yourself
It is possible to ask your agent to assess its own work, but this is something you need to be wary about. If you use chat based agents a lot, you start to see how at times they will say anything to please you. Every idea is amazing, and if you ask “but is this not maybe a tree?” it will pivot and tell you the dog it just carefully described is actually a tree. So when you ask “is this code good?”, it will tell you whatever it thinks you want to hear.
The answer is tests, right? Right? But I heard all you need is good tests and your code will be safe. The more tests you add the better. This has never been 100% accurate, but it was almost always correct. However, with the desire to please, we have seen agents remove failing tests and change them so they pass. So any method you use to assess how good your site's code is needs to be external, and set up in such a way that the agent cannot mark its own homework.
Thankfully, a whole range of third party systems, and testing methods such as mutation testing and coverage reports, can be used to make sure whatever systems you have in place are not only testing the code, but also testing what matters.
What we see when we look inside
We were asked to look at a website a friend had made for listing and finding fishing spots. It had a lot of sections, but when you step back and look at them, it was actually the same thing, just presented differently. However, in the code, the agent had written the same thing four times, in four different ways. To solve this we helped the agent through a mix of skills, filters and code examples to use.
It's not just the people we help either, a quick search online turns up plenty of stories. Jiawei Guan (opens in new tab) spent 10 days having an AI write 200,000 lines of code and 100,000 lines of tests, but the most basic part never really worked. So he deleted it, started again, and 48 hours later had something that worked with under 10,000 lines. Sometimes letting the agent fix its own mess just makes a bigger mess tomorrow.
When to get help
Sadly, many of us leave things until the last moment before we do anything about them. If your site is breaking on every change you make, it's best to stop and reach out for help. Prompting an agent when you are angry or panicking because your website is down can often lead to you asking in a way the AI picks up on, and it takes even more shortcuts to please you.
If you are making a site or app that will handle customer data or have access to your accounts, it is advisable to speak to someone who understands how web systems work. An expert can help vet your ideas and tell you about the common pitfalls we have all spent years falling into, and often they can help create a custom harness for you to use. If you would like to talk to us about your idea and hear some of our war stories, reach out.
Related services
Send us the link and we will tell you what we see, free.
Get in touch