Overview
Have Codex build a small browser racing game with several tracks, computer-controlled rivals and pickups, then drive it in its built-in browser to hunt for bugs before you playtest it yourself.
Problem or Objective
- Which agents help create, run and debug games?
- Which agents write or run tests against an application?
More in Coding and Code Review
AI Agents and Models
Tools and Integrations
- Tools
- Codex
- Prerequisites
- A ChatGPT plan that includes Codex, the ChatGPT desktop app for the in-app browser, and a repository for the game.
How It Works
Write a one-page design: the controls, how many tracks, how rival cars behave, which pickups exist and what ends a race. Ask Codex to build it as a web game in a new repository, one milestone at a time: a single track and car first, then rivals, then pickups, then the remaining tracks. After each milestone, ask Codex to run the game locally, open it in its built-in browser, drive a lap and report console errors, stuck cars, broken collisions and slow frames, then fix what it found. Review every diff, play the game yourself after each milestone, and commit once it holds up. Use only art and sound you made or have a licence for.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Codex CLI.
- Connect the toolsConnect the tools this workflow relies on: Codex.
- Check the prerequisitesA ChatGPT plan that includes Codex, the ChatGPT desktop app for the in-app browser, and a repository for the game.
- Gather your detailsCollect what the prompt asks for: Repository, Design notes file, Number of rival cars.
- Run the starter promptPaste the starter prompt below into Codex CLI and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at developers.openai.com before you rely on it.
Practical Starter Prompt: Build a lap, then playtest it
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
In [Repository], build a browser racing game following [Design notes file]. Work in milestones: one track with the player car, then [Number of rival cars] computer rivals, then pickups, then the remaining tracks. After each milestone, run the game locally, open it in your built-in browser, drive at least one lap, report console errors, stuck cars, collision bugs and slow frames, and fix them. Stop at each milestone and ask me to review the diff and play it before you continue.Play each milestone yourself and approve it before Codex moves on.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. OpenAI's pages say Codex writes and tests code in cloud or local environments, that its in-app browser can inspect console output, page state and JavaScript performance, and that testing an app it is building is a good fit for Computer Use. They do not show how well Codex plays or judges a game, so your own playtesting decides.
Limitations and Considerations
An agent driving a game can miss what a person notices at once, such as controls that feel wrong or a track that is too hard, so treat its pass as a first check. Repeated build-and-play loops use a lot of Codex usage, and a long-running task can use substantially more than a short request. Full CDP access in developer mode lets Codex inspect sensitive browser internals, and Codex asks for explicit approval before using it. Check the licence of every sprite, sound and font before you publish. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
AI Agent Repository
Source code of the agent that does the work.
Official Website
The official site of the main tool or project in this use case.
Visit Website (opens in a new tab)developers.openai.com
Related Videos
About openai/codex
Meet the New Codex CLI (opens in a new tab)
Published by the project’s official channel.
Watch on YouTube (opens in a new tab)Independent creators. Listing a video implies no endorsement, sponsorship or partnership.
Sources
- Codex Cloud | ChatGPT Learn (opens in a new tab)
Project documentation · developers.openai.com · Undated · Source checked 25 Nov 2026, 12:11 UTC
What this source supports
- Codex Cloud runs coding tasks in cloud environments, then lets the user review the changes and commit or open a pull request.
- Using Codex with your ChatGPT plan | OpenAI Help Center (opens in a new tab)
Project documentation · help.openai.com · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- Developer mode works with Browser use in Chrome and the Codex in-app browser, giving Codex controlled access to the Chrome DevTools Protocol to inspect console output, network traffic, page state and JavaScript performance; Codex asks for explicit approval before using full CDP access.
- A long-running task can use substantially more of the shared allowance than a short request.
- Computer Use | ChatGPT Learn (opens in a new tab)
Project documentation · developers.openai.com · Undated · Source checked 26 Nov 2026, 17:51 UTC
What this source supports
- Good fits for Computer Use include testing an app that ChatGPT is building; for web apps built locally, the built-in browser should be used first.
