Codex by OpenAI is a cloud-based coding agent. Give it a task, and it writes code, runs tests, and commits to your GitHub repo in the background — like having a developer on your team.
What makes Codex different
Codex works asynchronously — you assign a task and it works in the background, then opens a pull request for you to review. It's the only AI tool that creates proper Git branches and PRs, making it great for teams and real projects.
Go to chatgpt.com/codex (requires a ChatGPT Pro or Team plan). Codex runs in its own tab within ChatGPT.
Link your GitHub account and select the repository you want Codex to work on. Codex needs access to read and write to your repo.
Describe what you want built. Codex creates a new branch, writes the code, runs tests, and opens a pull request for you to review.
1. Add a new feature
"Add a dark mode toggle to the site. Use next-themes, add a button in the header, and make sure all components respect the theme. Create the PR when done."
2. Fix a bug
"The contact form on /contact doesn't show a success message after submission. Add a success toast that appears after the form is submitted, then clear the form fields."
3. Write tests
"Write unit tests for the utility functions in src/lib/utils.ts using Vitest. Cover all edge cases and aim for 100% coverage."
Give clear, specific instructions. 'Add a footer with 4 columns of links' works better than 'improve the page layout'.
Codex creates pull requests for you to review. Read the changes before merging — it's good practice and catches issues early.
Codex works best with focused tasks. 'Add search to the blog' is better than 'add search, fix the nav, and update the footer'.
Codex shines at repetitive tasks: writing tests, adding types, fixing lint errors, updating dependencies, and documentation.
Use Codex for background tasks while you work on the fun parts in Cursor or Claude Code.
Codex works on GitHub repos, not from scratch. Create a repo first (even an empty one) before assigning tasks.
Codex sometimes makes extra changes you didn't ask for. Always review the diff before merging.
Codex works on what's pushed to GitHub. Make sure your latest code is pushed before assigning a task.