DIRTY STATIC / DISPATCH Tutorials02 DEC 2026 • 12 MIN READ
A monitor in a brutalist concrete room showing a web browser with a web app, a robotic cursor clicking a toggle glowing caution yellow, with hazard stripes on the floor
TutorialsINTELLIGENCE FOR THE MACHINE AGE

Let Codex Cloud Browser Test Built Web Apps

Codex Cloud gained a browser and a desktop on November 30, 2026, so a cloud task can start the web app it just built, open it, click through a flow and check the result. This tutorial sets up a task, writes a prompt that can be checked, watches the work in the Desktop view, tries the app through a private preview, and shows when a Playwright test is the better tool.

Start reading ↓

A coding agent can write a page that compiles and still ship a button that does nothing. Until now, a Codex Cloud task mostly judged its own work from code and test output. The browser that OpenAI added to Codex Cloud on November 30, 2026 changes that check. Codex can start the app inside its own cloud computer, open the page, work through a flow and report what the rendered page did.

That is the skill this tutorial builds. You will run one small and checkable browser test on an app of yours, watch it happen, and learn how to tell a real pass from a polite summary. The steps follow the Browser and Cloud environments pages in the Codex documentation, checked on December 2, 2026. This article does not claim a live run of its own.

What you will build or learn

You will end with a repeatable way to ask Codex Cloud to test a web app in a browser. The test has four parts that you can reuse on any project: a start command, a port, a flow written as steps a person could follow, and a pass condition that can be seen on the page.

You will also learn the limits that matter before you trust the result. OpenAI says Browser Use and Computer Use are not available in every cloud task, and access to the Desktop view can vary by app version and workspace. A missing Desktop panel is a rollout fact, not proof that you set the task up wrong.

Before you begin

Pick a flow that is safe to run and easy to judge. A settings toggle that should stay on after a reload is ideal, and it is the example OpenAI uses in its own docs. A signup flow that sends real mail, a checkout that charges a real card, and any flow that deletes real data are poor first tests.

Note two facts about the cloud computer before you start. Localhost in a cloud task means the cloud computer, not your laptop. And the size of that computer is set by your plan, so a large app with a dev server, a browser and a database can feel tight on the smallest plan size.

Step 1: Start a cloud task

  1. Open a new task on the web or in the desktop app.
  2. Choose Work in, then Cloud, then Default environment.
  3. Describe the task, or pick a saved environment if you have one for this repo.

Expected result: the task opens with its own workspace in the cloud. The Default environment needs no repo. You can start with no project at all, for example to have Codex write and test a script on sample data, and tell it later which repo to clone.

For a repo you will test often, build an environment once instead. Choose Create environment, select the GitHub or GitLab repos, and select Get started. Codex inspects the repos, installs what the project needs and tests the workflow. Review the setup report, then select Publish. On the desktop app, you can also open a running task, select Edit next to Cloud, and use Save for future chats to keep that setup under a name.

Codex records a tested setup in two fields. The install script holds the commands that install dependencies and prepare assets. The start skill holds the steps that start services and check that they are ready. Those two fields are why a saved environment starts faster and fails less than a fresh guess.

Step 2: Give Codex a start command and a port

A browser test fails in a dull way when the agent cannot start the app. Say the start command and the port in the prompt itself, even when the environment should know them. Use the command your project really uses. For many JavaScript projects that looks like this in the task chat:

Terminal

Start the app with npm run dev. It listens on port 3000. Wait until http://localhost:3000 answers before you open it in the browser.

Expected result: Codex starts the dev server inside the cloud computer and confirms the page answers. If the server needs values such as a mode flag or a test key, supply them as environment variables in the environment settings. Use a network secret instead for a credential that goes to one HTTPS service, so the program gets a placeholder and the proxy swaps in the real value only for allowed domains. Never paste a real token into the prompt.

Illustration of a screen split between code on one side and a live desktop view of a web app on the other, in a brutalist concrete office
The shape of the work: code on one side, the rendered app on the other, with a person able to watch and step in. It is artwork for this article, not a screenshot of Codex Cloud. Illustration: Dirty Static

Step 3: Write a flow that can be checked

Vague prompts get vague reports. Write the flow as numbered actions, name the page and the state you care about, and state the pass condition last. The docs example, adapted here, turns on email reminders and then reloads to see if the setting stayed on:

Terminal

Use the browser to open http://localhost:3000. Go to Settings. Turn on email reminders. Reload the page. Report whether email reminders are still on after the reload, and quote the exact state you saw on the page.

Expected result: Codex opens the URL in the cloud browser, works through the steps, and reports the state it saw after the reload. Browser Use needs no Playwright install, and Computer Use, when a task has it, can work with other apps on the same cloud computer.

Keep each test small enough to review in one pass. One flow, one pass condition. If you need five flows checked, run them as five clear requests, so a failure points at one flow and not at a pile.

Step 4: Watch, take over, then hand control back

If Desktop appears in the side panel of the task, open it to watch Codex work in the browser or on the desktop. This is the moment the feature earns its keep. You can see a misclick, a slow page or a wrong screen as it happens, instead of guessing from a summary later.

Select Take over when you need to act yourself, for example at a sign in screen you do not want the agent to handle. Use the mouse and keyboard, finish the step, then select Return control to hand the session back. The task keeps its files and state while you do this.

Expected result: the same task continues after you hand control back. Nothing restarts, and Codex can pick up the flow from the state you left it in.

Step 5: Try the app yourself through a private preview

A watched run is good evidence. Your own click is better. HTTP Previews let you open the running app in your own browser through a private link:

  1. Ask Codex to start the server and tell you which port it uses.
  2. If the port is not listed, edit the environment of the task. Under HTTP Previews, add the port, press Enter, select Apply, then select Apply to this chat.
  3. Open the port under HTTP Previews in the task.

Expected result: a private HTTPS link opens the app. Only you can access that link, per the docs. Remove the port when you are done, and new requests to the link are blocked. Run the same flow by hand and compare your result with the one Codex reported.

Step 6: Use Playwright when the test must repeat

Browser Use suits a check you want to watch and judge. It is a poor home for a test suite. For a test that must run the same way each time, ask Codex to run Playwright in headless mode instead. The docs are plain on the split: Playwright tests run without an open browser window and do not use Browser Use or Computer Use.

That route has setup costs the browser route does not. Install Playwright in the cloud environment along with its browser binaries, its system dependencies and the dependencies of your app. If the test needs an outside service, check the network settings of the environment or use local test data.

Terminal

Run a Playwright test in headless mode. Start the app on port 3000 first. In the test, open Settings, turn on email reminders, reload the page, and assert that email reminders are still on. Report the test name, the result, and any error output in full.

Expected result: a pass or fail you can rerun after the next change, with error output you can act on. Save that prompt, or the test file Codex writes, with the repo. That is the asset that keeps paying you back.

Verification

Do not accept the word done on its own. A browser test has passed when all three of these hold:

  1. The report names the flow, the steps it took and the exact state it saw at the end.
  2. The Desktop view, when you had it, showed the same flow and the same end state.
  3. Your own run through the private preview reached the same end state.

If Codex fixed code during the test, review the diff before you commit or open a pull request, and rerun the flow once after the fix. A fix that was never retested in the browser is a claim, not a result. Our coverage of Codex CLI tabs that survive restarts covers the local side of the same tool family, and it is a useful contrast in what runs on your machine and what runs in the cloud.

Troubleshooting

ProblemLikely causeFix
No Desktop panel in the taskBrowser Use or Computer Use is not available in that task, or the app version or workspace limits the viewStart a new task, check for app updates, and ask an admin about workspace settings; the docs say this varies and is not always a fault
The browser opens a blank pageThe dev server is not up yet, or the port in the prompt is wrongAsk Codex to start the server, name the port, and confirm localhost answers before opening the page
The app runs on your laptop but not in the taskLocalhost in the task points at the cloud computer, where the app may not be installedUse a saved environment for the repo, or tell Codex which repo to clone and how to install it
A package download fails in the taskThe host is not allowed by the network settings of the environmentAdd the exact host under Additional allowed domains, save, publish again, and test in a new task
A login blocks the flowThe browser profile in the cloud has no session for that serviceTake over in the Desktop view and sign in yourself, or restate the test with test data that needs no login
The same test passes once and fails onceThe flow depends on timing, state or an outside serviceMove that flow to a Playwright test with local test data and a stated wait or assertion

Next steps

Save the environment once a test runs clean, so the next task starts from a setup that is known to work. Then grow the suite in the order that hurts most: the flow users touch first, the flow that broke last, and the flow you change most often. Keep Browser Use for new flows and for bug reports where seeing the page matters, and move each proven flow into Playwright as it settles.

One last habit is worth forming. When you report a bug to Codex, paste the steps a person used, in order. OpenAI showed the feature doing exactly that work, taking the steps from a support ticket and using them to reproduce a fault. A bug report written as steps is now both a report for a person and a test script for an agent.

Sources

■

END OF TRANSMISSION

Stay curious. Question everything.

CONTINUE THE DESCENT

MORE FROM DIRTY STATIC ↘