Tool · Coding · Operations
Codex
OpenAI's coding agent, available in your terminal, your IDE, the cloud and inside your pull requests.
- Maker
- OpenAI
- Price
- Freemium
- Level
- Beginner
- min read
- 10 min
- Updated
- Aug 18, 2026
- IS
- An OpenAI coding agent that runs the same task in four places: your terminal, an IDE extension, a cloud sandbox and automatic pull request review.
- Use when
- When you want to dispatch well-scoped tasks and go do something else — several in parallel — or when you want an automatic first review on every PR.
- Avoid when
- When the task needs back-and-forth with you at every step, or when nobody on the team has time to review what comes back from the cloud.
VerdictPick Codex when your bottleneck is a queue of small tasks and PR review — not when the bottleneck is understanding a system alongside someone.
The name Codex has meant three different things at OpenAI. First it was the model behind GitHub Copilot in 2021. Then it became a deprecated model. Since 2025 it is a software engineering product: an agent that carries programming tasks end to end.
The difference from a chat assistant is the same one that separates giving instructions from delegating work. You do not ask for code; you describe a task, and it comes back done — sometimes as a diff in your terminal, sometimes as a pull request opened while you were in another meeting.
The four surfaces
This is the defining characteristic of Codex and the source of nearly all confusion about it. Same agent, four places, very different working modes.
- 01
CLI
in your terminal, interactive, using your local environment
- 02
IDE
an extension that brings the agent into the editor
- 03
Cloud
an isolated sandbox that runs the task without you
- 04
PR review
comments automatically on every pull request
The question that settles which one to use is not technical, it is about attention: are you going to watch this task or not?
If you are, use the CLI or the IDE — you correct course early and save time. If you are not, use the cloud, and accept that you will spend the time reviewing later.
When cloud delegation pays off
Cloud tasks are seductive: you write a sentence and go to lunch. The catch is that the cost does not disappear, it moves. It leaves writing and lands in review.
Dispatch
- Bumping dependencies and fixing what breaks
- Applying the same tweak across twenty similar files
- Writing tests for a module that is already stable
- Clearing accumulated lint and type warnings
- Translating strings or generating docs from code
Keep close
- Deciding how a new feature will be modelled
- Touching auth, billing or anything with security impact
- Anything that depends on context living only in someone's head
- Tasks whose tests you do not trust
Automatic PR review
In my experience this is the most underrated part of the product, and the one with the best value-to-risk ratio.
The agent reads the diff of every pull request and comments on what looks wrong. It neither approves nor blocks; it raises a hand. It is a first pair of eyes that is never tired and never in a hurry to leave for lunch.
- 01
A PR is opened
by a person or by the agent itself
- 02
Codex reads the diff
with the context of the touched files
- 03
Comments are posted
the obvious and the mechanical get out of the way
- 04
A person reviews
with energy left for what needs judgement
The win is not finding deep bugs — it is clearing noise before human review. Unhandled nulls, forgotten edge cases, an inverted if, a leftover variable. Those are exactly the comments that drain a reviewer's patience and are never the reason anyone was hired.
The cost model changed
Until April 2026 billing was per message. Since then it is credits consumed in input and output tokens. That has one direct practical consequence.
Relative weight of consumption in a typical cloud task
- Reading the repository45%usually the largest item, and the easiest to shrink
- Agent reasoning30%
- Writing the code15%
- Running tests and rereading output10%
Reading context usually weighs more than writing. Pointing the task at a specific subdirectory costs less than turning the agent loose at the root of a monorepo — and, as a bonus, produces a better result, because less irrelevant context means less context rot.
Codex or Claude Code?
This is the most requested comparison, and the honest answer is that they solve differently shaped problems.
| Criterion | Codex | Claude Code |
|---|---|---|
| Dominant mode | Asynchronous delegation | Interactive work |
| Surfaces | CLI, IDE, cloud and PRs | Terminal, as the base of the workflow |
| Strongest at | Parallel task queues and PR review | Broad changes and code archaeology |
| Weakest at | Review becomes the bottleneck if nobody reviews | Needs you present to pay off |
| Best for | A team with a maintenance backlog | A person working in an unfamiliar system |
In practice many teams run both without conflict: the interactive agent for the hard change of the day, and the cloud for the maintenance queue nobody wants to pick up.
How to start without getting hurt
$ npm install -g @openai/codex$ cd my-project$ codexYour first task should not matter. Pick something you could review in two minutes — clearing lint warnings, writing tests for a pure function, bumping a minor dependency. The goal is calibrating your trust, not shipping value.
Then turn on PR review before turning on cloud tasks. That order creates the least friction: automatic review only adds comments, while cloud tasks add code someone has to audit.
Can your team review more PRs per week than it reviews today?
Cloud tasks will pay off
You have spare review capacity. Delegating the maintenance queue converts that capacity into delivery.
Start with automatic review only
It gives review time back instead of consuming it. Cloud tasks before that just grow the queue.
The rule that sums up Codex: it converts writing time into review time. That is a great trade if you have reviewers, and a terrible one if you do not.