Codex (OpenAI)

Codex (OpenAI)

Codex is OpenAI's AI coding agent. It reads a repository and carries a task through implementation, testing and pull request creation, running either in parallel in the cloud or locally through the CLI.

Codex is OpenAI's AI coding agent. Give it a task such as "fix this bug" or "add tests," and it reads the repository, changes the code, runs the tests and returns the result as a pull request.

It is not the same thing as the earlier code-generation model of the same name that OpenAI released (the one behind the first version of GitHub Copilot). Today, Codex refers to a product that works as an agent.

Where you can use it

SurfaceHow it works
Web (cloud)Connect a GitHub repository from ChatGPT and run tasks in isolated environments on OpenAI's servers; several tasks can run in parallel
CLIStart it in a terminal and work interactively on a local project
IDE extensionAssign tasks and review diffs from inside the editor
Mobile appSend tasks and check results while away from your desk

If you document your conventions and how to run tests in an AGENTS.md file in the repository, Codex follows them.

How it differs from Claude Code

CodexClaude Code
Where it mainly runsCloud sandboxes (local via the CLI)The developer's machine
Best suited toSending tasks in parallel and receiving PRsWorking interactively with local tools, databases and the browser
GuardrailsEnvironment setup and AGENTS.mdCLAUDE.md, hooks and MCP

Many teams use both: Codex for batches of routine fixes, Claude Code for implementation that needs investigation. We compared them inside our own development team in our Claude Code vs Codex article.

Pricing

Codex is included in ChatGPT plans and is fully usable on paid plans (Plus / Pro / Business / Enterprise and others), with limited access on the free plans. Usage is now counted in credits based on tokens, with limits that vary by plan. The CLI can also be billed per token with an API key. Terms change, so check the official pricing page.

Cautions

Passing tests do not guarantee the implementation matches the specification, so keep diff reviews and CI in place. When running in the cloud, set up the environment, including dependency installation, first, or the tests will not run. Decide which repositories to connect and how secrets (environment variables) are handled.

Rather than relying on instructions alone, design verification and stop conditions using harness engineering to reduce agent failures structurally. We help teams adopt AI coding agents and design the controls around them through our AI & DX services.