Agentic Research

What Is Vibe Coding: Fast, but Fragile

2026/09/2913 min readBryan Chan閱讀中文原文
TopicsVibe CodingAI DevelopmentPrototypingSoftware EngineeringAI App Development

Conclusion First

You tell AI in natural language, "Help me write a bookkeeping App," and ten minutes later it actually produces a runnable webpage. You add a few more sentences of description, and it connects the database and builds a login feature for you. The whole process feels like talking to an engineer who is always available on demand, and this engineer never complains about changing requirements.

This is Vibe Coding: development driven by intuition and conversation, without writing specs, drawing architecture diagrams, or running tests. As long as it "feels right," you keep stacking on features.

The problem lies in the phrase "it feels right."

Vibe Coding is essentially a rapid prototyping tool, not a production-grade engineering method. It is very well suited to validating ideas, building a Demo, and handing it to friends to try. But if you push code produced by Vibe Coding directly to production, it is like using a sketch as a construction blueprint: the workers are fast, but the house can collapse at any moment.

Vibe Coding is a rapid prototyping tool, not a production-grade engineering method

A Scenario You Have Likely Encountered

Suppose you need to build an e-commerce admin backend for your company. You open the AI editor and type: "Help me build a product management page with list, search, add, and edit features." Within thirty seconds, the AI generates a React frontend plus a Node.js backend, and it even builds the database Schema for you.

You take a look: the interface is beautiful, and all functionality works, so you keep adding requirements: "Add discount logic," "support multiple currencies," "integrate payment processing." The AI completes them one by one, and each time you think, "so fast, so amazing."

Then on day one of launch, customer service reports: customer order amounts are occasionally off by a few cents. You check and find that the AI used floating point numbers to handle amounts and did not consider precision at all. On further inspection, the discount logic only handles the 20% off case, and it calculates incorrectly when threshold discounts and limited-time discounts stack. On even further inspection, product search has no index, so after data exceeds five thousand records, search takes eight seconds.

This is like using fast food restaurant standards to host a banquet: the dishes look rich, but the first table of guests tastes something off. The problem is not that the chef lacks skill, but that from the start you never intended to cook seriously.

The failure scene from prototype to launch

Why Vibe Coding Is So Fast

Let us be fair first: Vibe Coding is fast because it skips the three most time-consuming steps in conventional engineering: thinking through requirements, designing data structures and system architecture, and anticipating boundary conditions and error handling.

These steps look like they are "slowing down progress," but they are actually saving time for your future self. It is like renovating a house: painting directly looks fastest, but if you do not first handle plumbing, electrical work, and waterproofing, six months later the walls will bubble, and by then you will have to tear everything out and start over.

The reason an AI model can quickly produce code is that it only does "generation," not "verification." It will not ask you, "Will this discount logic conflict with other promotions?" nor will it proactively write tests for you to confirm whether the amount calculation is correct. It is like an extremely fast typist: whatever you say, it types, but it will not check your typos for you.

Another metaphor: Vibe Coding is like sketching with a pencil; with a few strokes, you can outline what a house looks like. But a sketch cannot be handed to a construction site to start work, because the workers do not know how thick the walls should be, how densely the rebar should be tied, or where the pipes should run. A sketch is a starting point, not an endpoint.

There is an even more fitting metaphor: Vibe Coding is like building a house with prefabricated panels. The factory makes all the wall panels, floor slabs, and roof, and on-site assembly takes only a few days. But how long a prefabricated-panel house can remain habitable and how many stories it can be built to depend on the materials you use and the structural design. If you have not even laid a good foundation, no matter how fast prefabricated construction is, it will only put up a temporary structure that could collapse at any moment.

Vibe Coding skips the most time-consuming steps in conventional engineering


Three Failure Modes

Vibe Coding's problem is not that it "makes mistakes," but that "when it makes mistakes, you do not know." The three failure modes below are pitfalls that countless teams have stepped into.

Failure Mode 1: Limited Context Window, Inconsistent Code

No matter how large an AI model's context window is, it is not infinite. When your project exceeds several dozen files, the AI cannot see everything at once. It may forget the data format you changed three days ago while writing a new feature. It may also not know that another file contains dependent code when refactoring a piece of logic.

This is like a library with a borrowing limit of one hundred books. If you have checked out the most important reference books, the librarian cannot help other patrons find materials at the same time. The larger the project, the more easily the AI "cannot see the forest for the trees."

More troublesome, the AI will not proactively tell you what it has "forgotten." It will continue generating based on fragments remaining in the context, appearing coherent while actually having possibly deviated from the original design. If you do not carefully review it, it is difficult to spot inconsistencies.

Failure Mode 2: No Verification Mechanism, Running Does Not Mean Correct

After AI writes code, it will not run unit tests on its own, will not check boundary conditions, and will not consider concurrency scenarios. It considers the task complete once the code "looks like it runs." This is like a factory shipping goods without a quality control department: if the product's appearance is fine, it gets boxed. After the customer receives it and uses it, they find that pressing three buttons causes two to crash.

With untested code, you never know when it will break. It may run perfectly on your computer but fail as soon as it is deployed to a server. It may work normally on ordinary days but crash when it hits a holiday traffic peak. It may be fine under normal user operations but throw an error immediately when it encounters a special input format.

This is why professional engineers spend so much time writing tests. Tests are not meant to prove that code runs, but to prove that code works correctly under various conditions.

Failure Mode 3: Technical Debt Accumulates Quickly, Until You Can No Longer Change It

Code produced by Vibe Coding usually adopts the "most direct" approach. For example, it uses one large array to store all orders and scans through the entire thing on every query. When the data volume is small, there is no problem. Six months later, when the data volume has grown tenfold, the system starts to slow down. You want to optimize it, only to find that the entire data structure needs to be rewritten.

This is like hiding all the electrical wiring behind the walls during renovation. The surface looks clean and beautiful, but one day when you want to replace a light fixture, you discover that no wiring was reserved inside the wall, and moving one wire requires tearing down half the wall. Technical debt is like this: it feels great when you borrow it, and it hurts when you repay it.

Three Failure Modes: Context Limits, Lack of Verification, Technical Debt Accumulation

When It Applies and When It Does Not Apply

Scenarios suitable for Vibe Coding:

  • Validate a new idea and confirm whether the direction is viable
  • Write a one-off data processing script that is discarded after use
  • Quickly get hands-on when learning a new technology or framework
  • Internal tools or hackathon projects where you are the only user

Scenarios not suitable for Vibe Coding:

  • Transaction systems or payment flows involving money
  • Projects with multiple collaborators that require long-term maintenance
  • User systems or data processing with security requirements
  • Products that need to go live and run continuously

The criterion is simple: if something is "disposable after use," Vibe Coding is completely sufficient. If something is "to be used long term" or "to be used by others," you need a more rigorous engineering approach.

Vibe Coding is like fast food: it can quickly satisfy hunger, but you cannot live on fast food forever. Proper engineering is like slow cooking: it takes time, but it is nutritionally balanced and stands the test of time. The best strategy is to combine both: use Vibe Coding to quickly validate an idea, and after confirming the direction is correct, rebuild it using proper engineering methods. This is like first drawing a sketch on a sticky note to confirm the design direction, then asking an architect to draw formal construction blueprints.

How to Add Guardrails: Five Lines of Defense

If you want the speed of Vibe Coding but do not want to bear the risk of failure, you can add these five guardrails.

First: Enforce Type Checking. Use TypeScript instead of JavaScript, and let the compiler catch type errors for you. Code written by AI often has type problems, such as mixing strings and numbers in operations; type checking can catch these problems at compile time.

Second: Require AI to Produce Tests at the Same Time. Every time AI finishes writing a feature, immediately ask it to add corresponding tests. Code without tests is considered "incomplete." This is like requiring a factory to have every product pass basic inspection before shipping, not just look at its appearance.

// ❌ Common Vibe Coding money calculation: using floating point, no precision control
function calculateDiscount(price: number, discount: number): number {
  return price * discount;
}

// ✅ After adding types and tests: use integer arithmetic to avoid floating point errors
function calculateDiscount(priceInCents: number, discountRate: number): number {
  return Math.round(priceInCents * discountRate);
}

// Test: ensure 85.5 yuan at 20% off = 68.4 yuan (in cents)
// calculateDiscount(8550, 0.8) === 6840

Third safeguard: Limit AI's tool permissions. Do not let AI directly modify core business logic, do not let it delete test files, and do not let it access production environment keys. It is like inviting a renovation worker into your home: you put valuables away and let him work only in specific areas.

Fourth safeguard: All changes must go through a Pull Request. After AI finishes modifying the code, it cannot merge directly into the main branch. It must submit a PR, and it can be merged only after a human reviews and confirms it. This is like a construction crew changing your home's pipes; it must be signed off by an architect before it can proceed to the next step.

Fifth safeguard: Run automated checks regularly. Set up a CI process so that every code change automatically runs lint, type checking, and all tests. Code produced by AI must also pass this gate. This is like a building's safety inspection system: no matter who moves in, it must be inspected at regular intervals.

Below is a minimal viable CI configuration example to ensure that every code change automatically runs checks:


# .github/workflows/ci.yml
name: CI
on: [push, pull_request]
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npm run lint        # Code style check
      - run: npm run typecheck   # Type check
      - run: npm test            # Run all tests

These four commands are the most basic quality control process. If AI-written code cannot pass lint, type checking, or tests, it should not be merged.

Five guardrails make Vibe Coding safer

Four common misconceptions

Misconception 1: Vibe Coding equals prototype validation. Not entirely true. Prototype validation uses minimal cost to confirm whether the direction is correct, and prototypes are usually discarded after completion. But many people push Vibe Coding output directly into production. This is like trying on a sample garment, feeling it fits, and wearing it straight to hike, only to find the sample garment is not suitable for outdoor activities at all. Prototypes are for learning, not for production.

Misconception 2: If AI-written code runs, it is correct. This is the most dangerous idea. AI-written code may run under the few inputs you tested, but with a different set of boundary values, a concurrency scenario, or an input in an abnormal format, it may collapse completely. Being runnable does not mean it is correct. It is like a car that looks perfect in a showroom, but without crash testing, you do not know whether it is safe.

Misconception 3: Adding tests and documentation slows things down. In the short term, it does. But in the long term, the cost of not adding tests is far higher than the cost of adding them. You spend thirty minutes writing tests, and it may save you three days of debugging time in the future. It is like buying insurance: normally you feel it is a waste, but when something goes wrong, you discover that the premium is much cheaper than the payout. True efficiency is not "the speed of writing code," but "the total time from idea to stable production."

Misconception 4: Once AI models are upgraded, these problems will disappear. Models are indeed getting stronger, but "generating code" and "verifying code" are two different things. No matter how smart a model is, it will not proactively run tests for you, check boundary conditions, or consider concurrency scenarios. The more powerful the tool, the more users need to know where the tool's boundaries are. Just as a car may have excellent performance, the driver still needs to obey traffic rules.


Three Key Takeaways

  1. Vibe Coding is a rapid prototyping tool, not a production tool. Use it to validate ideas, build demos, and learn new technologies, but do not use it to build a house people will live in. No matter how quickly you draw a sketch, you still need to turn it into construction drawings before work can begin.
  2. Code that lacks verification mechanisms is not correct just because it runs. Type checking, unit testing, and PR review are not redundant steps; they are basic defenses for ensuring code quality. A factory without quality control ships faster but receives more customer complaints.
  3. True efficiency is not writing fast; it is reworking less. Vibe Coding makes the first half fast, but the second half may take more time debugging and refactoring. Fill in the verification mechanisms: the first half is slightly slower, but the second half can proceed smoothly.

下一步

If you want to go deeper, you can first learn the complete foundations of Agent frameworks (LangChain Complete Tutorial 2026), then see how tools are integrated in a standardized way (MCP Protocol Explained), and finally learn how to evaluate and choose AI tools (Agent Capability Matrix).