How to run an app Claude Code, Codex or Cursor built for you
To run an app built with Claude Code, Codex or Cursor, ask the agent to start it and give you the address. It will start a small local server and print something like http://localhost:3000. Open that address in your browser and keep the window where the server is running open: close it, and the app disappears. Most “it doesn’t work” moments come from that last part.
Below: what that address actually is, why it breaks, and the exact sentences to send your agent when it does.
What “localhost:3000” means
localhost is your own computer pretending to be a website. When your agent “runs” the app, it starts a little program, a server, that waits for your browser to ask for pages.
The number after the colon is the port: think of it as a door number. Your app lives behind door 3000 (or 5173, or 8000, depending on what the agent used). Two apps can’t use the same door at the same time.
Three things follow from this, and they explain almost every problem:
- The app only exists while the server is running.
localhostonly works on your computer. A friend who opens the same link is asking their computer, which has nothing there.- If the app needs a database, the database has to be running too, not just the app.
How to run an app built with Claude Code, step by step
- Ask the agent to start the app. Paste this:
Start this project so I can see it in my browser. Tell me the exact address to open, and tell me if anything else (like a database) needs to be running.
- Leave the window open. The agent usually starts the server in a terminal or a background task. Closing it, closing the agent, or restarting your computer stops the app.
- Open the address the agent gave you, including the port number.
- When you come back tomorrow, the app won’t be running anymore. Ask the agent to start it again, same as step 1.
Why it stops working, and what to tell your agent
| What you see | What’s going on | Send your agent |
|---|---|---|
| “This site can’t be reached” / “refused to connect” | The server isn’t running | “Start the project again and give me the address.” |
| “Port 3000 is already in use” | An old copy is still running, or another app took the door | “Something is already using the port. Stop the old process or use another port.” |
| It worked yesterday, not today | You restarted, or closed the window, so nothing is running | “Start the project again.” |
| A blank white page | The app crashed while loading | “The page is blank. Check the browser console and the server log and fix the error.” |
| Errors about a database | The database isn’t installed or isn’t running | “Does this project need a database? Set it up and start it, then start the app.” |
| A friend can’t open your link | localhost only means your computer |
You need a public link or a deploy (see below). |
| Works on your laptop, not on your phone | Same reason: your phone isn’t your laptop | Same as above. |
Two habits that save a lot of time:
- Ask for one way to start everything. “Create a single command that starts the app and everything it needs, and write it at the top of the README.” Next time you just say “start it the way the README says.”
- Say what you see, not what you think is wrong. Paste the error text or describe the screen. Agents are good at diagnosing; they’re worse at guessing what “it’s broken” means.
When the manual way gets painful
It’s fine for one small project. It starts to hurt when:
- you have several projects and keep forgetting which one runs on which port;
- a project needs a database or other services that have to be installed and started in the right order;
- you want to show it to someone without learning hosting first;
- you’re on Windows, where tools written for Mac and Linux often need extra setup (see Claude Code and Codex on Windows).
The easier way: let Eggie run it
Eggie gives your agent a ready-made workspace on your computer. Your agent writes the code as usual; Eggie handles running it:
- Every project gets its own address, so there’s no juggling ports.
- Start and Stop are buttons, with an Open in browser next to them.
- Projects come back on their own after you restart the computer.
- Need to show someone? Share a public link for 8 hours on the free plan. Friends open it on their phone with nothing to install.
You still use the agent you already pay for: Claude Code, Codex or Cursor.
FAQ
Do I have to keep the terminal open?
If you run the app yourself, yes. The app is a running program; closing its window stops it. You can ask your agent to run it in the background, but it will still stop when you restart your computer.
Why can’t my friend open my localhost link?
Because localhost always means “this computer”. On your friend’s device it points to their device, where your app doesn’t exist. To share, you need a public link (a tunnel) or to deploy the app to a server.
Can I run two projects at the same time?
Yes, as long as each one uses a different port. If you see “port already in use”, that’s the conflict. Ask your agent to move one of them to another port.
Do I need to install anything to run what the agent built?
Usually something, yes: the runtime the project uses (Node.js or Python, for example) and sometimes a database. A good agent installs what’s missing if you ask, but on your own computer you’ll want to approve each install. See Is it safe to let an AI coding agent run commands on your computer?