ykononov.com / Vibe coding from scratch: bb, Claude Code, Codex, and OpenCode / Module 07
Build your first app with an AI agent: stages, fixes, errors
Run the plan, look at the result in a browser, ask for changes in plain language, and fix what breaks.
Run the work one stage at a time and check the result in the browser. Ask for one change at a time, describing what you see now and what you want instead, ideally with a screenshot. Give the agent the whole error message; if two attempts don’t fix it, roll back to the last commit, start a new thread, or switch to another agent.
Run the plan one stage at a time
The plan is approved and the agent is ready. This is where beginners make their second classic mistake: they say “do all of it” and go make coffee. Sometimes that works. More often you come back to an app with something wrong in it and no way of telling which of the six stages broke it.
It’s more reliable to go one stage at a time and look at the result yourself after each one.
Do the first stage of the plan, then stop. When you're done: 1) start the app in the bb terminal so I can open it; 2) tell me the address where I can see it; 3) list exactly what I should check on the screen. Don't start the second stage until I confirm.
While the agent works, take a look at the thread. You’ll see a running feed of steps: created a file, installed dependencies, ran a command, hit an error, fixed it. You don’t need to follow every step, but it helps to get used to the rhythm. The first stage of a new project usually takes between two and ten minutes.
Sometimes the agent stops and asks for permission: to install a package, or to run a command outside the project folder. Read what it’s asking for. Installing dependencies and starting the app are normal, so approve those. If it wants to delete something outside the project, or run a command you can’t make sense of, ask first: “Why is this needed, and can we do without it?”
Look at the result
The agent says the stage is done and gives you an address, something like http://localhost:5173. Here’s what that means and where to look.
Right now your app is being served by a small program called a dev server. It runs in the terminal in bb’s right panel. You can see it running there, and that’s also where its messages appear. localhost means “this computer.” Only you can see the app; it isn’t on the internet.

There are two ways to open the app:
- bb’s built-in browser, a tab in the right panel. The app and your conversation with the agent sit side by side, so you don’t have to switch windows. Available in the desktop app
- Your regular browser. Copy the address into Chrome or Safari. This always works
Now test it as a user would, not as its author. Go through the list the agent gave you and add checks of your own:
- Do the main action three times in a row: add three habits, check one off, uncheck it
- Reload the page. Is your data still there?
- Do something “wrong”: leave the name empty, type a very long one, double-click a button
- Narrow the window to the width of a phone. Is everything still readable?
Write down everything that’s off, as a list. Don’t stop in the middle of testing to send a message about each small thing. Collect your notes first; the next step covers how to hand them over.
Ask for changes in plain language
You have a list of things to fix. How you word them affects the result at least as much as which model you picked.
One task, one message. The agent will carry out five changes sent in a single message, but if one of them breaks something, you won’t know which. The exception is small changes of the same kind: “change these three labels” is fine as one list.
Describe what you see and what you want to see. The agent can’t see your screen until you show it.
| Bad | Good |
|---|---|
| The button looks kind of off | The Add button is too small and blends into the background. Make it stand out: bigger, and in a contrasting color |
| It doesn’t work | When I click Add with the name left empty, a blank row shows up in the list. Nothing should be added, and I should see a hint saying “Enter a name” |
| Make it look nice | Right now it looks like a spreadsheet from 2005. I want a calm, modern look: more white space, rounded cards, one accent color |
Show it. You can drag a screenshot straight into the prompt box. Circle the problem area and you’ll need a third as many words. If you like someone else’s site, attach a screenshot of it: “I want something along these lines.”
Ask for options before you ask for changes. Not sure what would work best? “Suggest three ways to show weekly stats, with pros and cons. Don’t change anything yet.” The agent is also a consultant, and its advice is often better than its execution.
When you’re done with the changes to the first stage, save your progress and move on:
Stage one looks good. Commit it with a clear message, then move on to the second stage of the plan. Same deal as before: do it, stop, and tell me what to check.
Work through the whole plan this way, stage by stage. By the third stage you’ll probably have ideas that weren’t in the spec. That’s normal. Do the small ones right away. Add the big ones to the “Later” section at the end of SPEC.md and get back to the plan.
When something breaks
Something will break. A blank white screen, red text in the terminal, a button that worked yesterday. It doesn’t mean you did anything wrong. It’s the normal state of software development, and professionals live with it too. The only difference is that it doesn’t rattle them.
The routine is always the same.
- Show the agent the whole error. Copy the red text from the terminal or the page and paste it as is, without paraphrasing. Add what you were doing just before.
After the last change, the page is just a blank white screen. Here's what the terminal says: [paste the error text] First explain in plain language what's causing it, then fix it and make sure the page opens.
- If there’s no visible error but the app is misbehaving, describe three things: what you did, what you expected, and what happened. Attach a screenshot.
- If two attempts haven’t fixed it, stop. An agent that has “found the cause” for the third time is most likely going in circles and tangling the code a little more with each attempt.
What to do when the agent is stuck:
- Roll back. “Roll back all changes to the last commit.” You’re back to a state that worked and can try the same task again, worded differently or cut into a smaller piece. This is exactly why we commit after every successful step
- Open a new thread. In a long conversation the agent drags every failed attempt along with it. A fresh thread with a precise description of the problem often solves it right away
- Bring in a different agent. In a new thread, pick a different agent in the prompt box and describe the problem to it. A second look from another company’s model is one of the main reasons to keep several agents around
- Turn up the power. Switch to the strongest model and set the reasoning level to High, for this task only
- The app opens in a browser and the main action works
- I’ve made at least three changes, each in its own message
- I’ve explained at least one change with a screenshot
- There’s a commit after every stage I approved
- I’ve given the agent the full text of an error at least once, or I know where to find it
Review questions
Why is it better to run the plan one stage at a time?
After each stage you can check the result and see where a problem came from. Technically the agent can do everything in one go. But if the result isn’t what you wanted, you won’t know at which stage it went wrong. Small steps with a check after each one pin the problem down.
What does an address like http://localhost:5173 mean?
The app is running on your computer and can only be seen from it. localhost means “this computer.” The app is served by a dev server running in the bb terminal; it can’t be reached from the internet.
Which way of asking for a change will work best?
“The Add button blends into the background. Make it bigger and give it a contrasting color”. The agent can’t see your screen and doesn’t know your taste. What works is describing what’s there now and what should be there instead. A screenshot is better still.
The agent has tried twice to fix an error and failed. What’s your next step?
Roll back to the last commit and try another way: a new thread or a different agent. After two failures, the agent is usually going in circles and tangling the code. Rolling back gets you to a working state; a fresh thread or a different agent brings a new perspective. Permissions are almost never the cause.
This page covers a single module. The interactive version of the course has steps, quizzes, and checklists that save your progress.
Open this module in the course →By Yury Kononov, Chief Technology Officer. The course is free and licensed under CC BY 4.0. Updated 2026-11-28. Contact the author: @ykononov.