Codex is included with ChatGPT plans from $20/mo and confines itself with an operating-system sandbox: Seatbelt on macOS, bubblewrap on Linux. Cursor Pro is $20/mo and owns predictive editing with Tab, plus an Agents Window that runs parallel agents in git worktrees. Both now have a headless CLI, so CI is no longer a Codex-only column. Pick Codex for enforced isolation and scripting, Cursor for editing and review, and note that Codex runs inside Cursor if you want both.
- Codex comes with a ChatGPT plan you may already have, from $20/mo.
- Cursor Pro is $20/mo, and Tab is still the only reason to pay for it.
- Only Codex has an OS-enforced sandbox: Seatbelt, bubblewrap, Windows sandbox.
- Both run headless now. "Cursor does not work in CI" is out of date.
- At the limit they fail in opposite directions: Codex pauses, Cursor bills you.
- The Codex IDE extension installs inside Cursor, so this is not either/or.
Side by side
From both vendors’ own pricing and documentation pages, checked August 2026.
| Codex | Cursor | |
|---|---|---|
| Shape | Terminal agent, plus a desktop app, an IDE extension and a cloud surface | AI editor, plus a CLI and cloud agents |
| Entry price | Included with ChatGPT Plus, $20/mo | $20/mo Pro |
| Free tier | Small amounts on ChatGPT Free and Go | Yes, Hobby |
| Middle tier | No separate published ChatGPT rung | Pro+, not published (3x Pro limits) |
| Top individual tier | $200/mo ChatGPT Pro, maximum Codex tasks | Ultra, not published (20x Pro limits) |
| Predictive editing | No | Tab, multi-line and multi-location |
| Multi-file agent work | Yes, natively | Yes, Agent |
| OS-enforced sandbox | Yes: Seatbelt, bubblewrap, Windows sandbox | No |
| Headless | Yes, codex exec | Yes, agent -p |
| Parallel sessions | One git worktree or cloud task per lane | Agents Window with /worktree |
| Runs inside the other | Yes, the IDE extension installs in Cursor | No |
| Diff review surface | Terminal, or the IDE extension | Native editor diff |
| At the limit | Window resets, or you buy credits | On-demand usage, billed in arrears |
| Models | OpenAI models | Several vendors |
Both crossed into the other’s lane
Comparison articles for this pair are mostly a year out of date, and the two stalest claims are that Cursor cannot run without a GUI and that Codex cannot help you while you are reading code. Neither is true now.
- Cursor has a command-line agent. The binary is
agent, it takes a prompt with-p, and Cursor documents print mode explicitly for scripts and CI pipelines. - Codex has an IDE extension that runs beside your editor, including inside Cursor, Windsurf, VS Code, Xcode and JetBrains. It is the same agent with your open files and your selection.
- Both have a cloud surface. Codex web runs a task in an OpenAI-managed container against a clone of your repository; Cursor runs cloud agents on paid plans.
- Both parallelise with git worktrees. Cursor built it into the product; Codex expects you to create the worktree, or to hand the task to the cloud.
# Codex CLI. A Rust binary, so Node is not required.
curl -fsSL https://chatgpt.com/codex/install.sh | sh
codex # then sign in with your ChatGPT account
# Cursor CLI. The binary is called agent, not cursor.
curl https://cursor.com/install -fsS | bash
agent -p "explain how sessions are authenticated" --output-format text
The sandbox is the difference that did not close
Codex confines itself with facilities provided by the operating system, outside the agent loop. That is a categorically different guarantee from a permission prompt: a read-only session cannot write, no matter what the model decides, what a file it reads tells it to do, or how tired you were when the dialog appeared.
What actually enforces the Codex sandbox, by platform.
| Platform | Mechanism | Cursor equivalent |
|---|---|---|
| macOS | Seatbelt, the same facility macOS uses on its own apps | None. The agent asks you |
| Linux and WSL2 | bubblewrap, using unprivileged user namespaces | None |
| Windows, PowerShell | Native Windows sandbox | None |
Codex splits capability from interruption. -s sets what the agent can do at all, with three values: read-only, workspace-write, and danger-full-access. -a sets when it stops to ask, with untrusted, on-request, or never. They are independent, which is why the most useful configuration is one many people never try: a tight sandbox that never interrupts.
# exploration that genuinely cannot write, and never interrupts you
codex exec -s read-only -a never "map how sessions are authenticated"
# may write inside the repository, asks before it wants more
codex -s workspace-write -a on-request
# scriptable review with a machine-readable event stream
codex exec -s read-only -a never --json "review the diff on this branch"
Tab is the other one
Ordinary completion predicts the next tokens where your cursor is. Cursor Tab predicts your next edit, which is usually somewhere else in the file and is usually the mechanical consequence of the change you just made. Codex has no equivalent, and no plausible route to one, because it is not watching your keystrokes.
you edit: function send(msg: string)
^ add a second argument, opts
Tab suggests: line 31 send(text) -> send(text, {})
Tab suggests: line 88 send(body) -> send(body, {})
Tab suggests: line 154 send(payload) -> send(payload, { retry: true })
Parallel agents: two real answers now
Two agents editing the same working tree overwrite each other. Both products solve it the same way, with git worktrees, and the difference is how much of it you assemble yourself.
| Codex | Cursor | |
|---|---|---|
| How a lane is isolated | A worktree you create, or a cloud task | /worktree, inside the Agents Window |
| Where lanes run | Terminals on your machine, or Codex web | Local, worktrees, cloud, remote SSH |
| Setup for a fresh checkout | Your own script | .cursor/worktrees.json |
| Ceiling | Whatever your machine tolerates | cursor.worktreeMaxCount, default 25 per machine |
| Same task, several models | Run it twice and compare | /best-of-n |
| Merging back | git merge from the worktree | /apply-worktree, or commit in place |
The setup row is the one that decides whether parallel agents work or fail identically. A fresh worktree is a clean checkout: no installed dependencies, no untracked environment file, no build cache. Without a setup step every agent you spawn spends its first three turns rediscovering that, badly, in parallel.
{
"setup-worktree-unix": [
"pnpm install --frozen-lockfile",
"cp ../.env.local .env.local"
],
"setup-worktree-windows": "scripts/setup-worktree.ps1"
}
The cost picture, and what happens at the limit
Both ladders, list monthly prices, August 2026.
| Tier | Codex, via ChatGPT | Cursor |
|---|---|---|
| Free | $0, small amounts on Free and Go | $0 Hobby |
| Entry | $20/mo Plus | $20/mo Pro |
| Middle | No separate published rung | Pro+, not published (3x Pro limits) |
| Top individual | $200/mo Pro, maximum Codex tasks | Ultra, not published (20x Pro limits) |
| Team seat | $20/user/mo Business, annual billing | $40/user/mo Teams Standard |
At the entry tier they cost the same, and the pairing is $40 a month. That is the number most heavy users land on, and it is worth noting that half of it is often already being paid: a great many people asking this question hold ChatGPT Plus and have never run codex.
| Codex | Cursor | |
|---|---|---|
| Meter | A rolling five-hour window, with weekly limits on top | Included model usage per plan, monthly |
| When it runs out | Work pauses until the window resets, or you buy credits | On-demand usage continues, billed in arrears |
| What you risk | Your afternoon stops | Your invoice grows |
| Where to check | /usage in the CLI | The Cursor dashboard |
Which for which hour
| Task | Winner | Why |
|---|---|---|
| Editing code you are reading | Cursor | Tab, and the editor diff |
| "Fix this failing test" | Codex | Runs it, reads the failure, iterates |
| Exploring an unfamiliar repository safely | Codex | -s read-only cannot write, and asks nothing |
| Six lanes on one repository | Cursor | Agents Window plus /worktree |
| One lane inside a pipeline | Codex | codex exec runs once and exits |
| Reviewing a large agent-written diff | Cursor | The editor diff is easier to read |
| Output a script has to parse | Codex | --json and --output-schema |
| A ticket to run with the laptop shut | Either | Codex web, or a Cursor cloud agent |
| Running something you half trust | Codex | codex sandbox confines any command |
Running both, which is what most people do
Because the Codex extension installs inside Cursor, this is one of the few comparisons where the answer can genuinely be "both, in the same window". A setup that takes ten minutes:
Start with the one you already pay for
If you hold ChatGPT Plus, the marginal cost of trying Codex this afternoon is zero. Install the CLI, run codex in a repository, and sign in with the ChatGPT account rather than an API key.
Put Codex inside Cursor
Install the Codex IDE extension from the marketplace in Cursor. You get the agent with your open files and selection as context, without leaving the editor you are reading in.
Give every parallel lane its own checkout
Use /worktree in Cursor, and commit a .cursor/worktrees.json so a new lane installs dependencies instead of failing on them. For Codex, create the worktree yourself or send the task to Codex web.
Keep pipelines on codex exec
Both CLIs run headless, but codex exec -s read-only -a never is the combination worth standardising on for CI: the sandbox is enforced by the kernel rather than promised, and it cannot hang waiting for an approval nobody will give.
Watch two meters, not one
You now have a five-hour ChatGPT window with weekly limits, and a Cursor allowance that silently becomes on-demand spend. They live in different dashboards and neither knows about the other.
Questions people ask
For work you hand over, for anything that runs unattended, and for scripting, yes. Codex confines itself with an operating-system sandbox and codex exec runs once and exits. For editing code you are actively reading, Cursor is better, and Tab is the reason.
Yes, and more directly than most pairings. The Codex IDE extension installs inside Cursor, so the agent and the editor share one window. At entry tiers the pairing is about $40 a month, and half of it is often already on your card as ChatGPT Plus.
Both are $20 a month at the entry tier as of August 2026. Codex comes with ChatGPT Plus, so if you already pay for that the marginal cost is zero. Higher up they diverge: Cursor does not publicly publish Pro+ or Ultra prices, while ChatGPT publishes Pro at $200 a month.
Not in the same sense. Codex is confined by Seatbelt on macOS, bubblewrap on Linux and WSL2, and the native Windows sandbox in PowerShell. Those are kernel-level, so a read-only session cannot write regardless of what it is told. Cursor relies on you approving actions, which is a weaker guarantee exactly when you stop reading the prompts.
Yes. Cursor installs a CLI whose binary is agent, and Cursor documents print mode with -p for scripts, CI pipelines and automation. The claim that only Codex works headless is out of date, though codex exec is still the better default for a pipeline because of the enforced sandbox.
Cursor, if you want it built in. The Agents Window runs many agents in parallel and /worktree isolates each one, with setup commands in .cursor/worktrees.json and a default ceiling of 25 worktrees per machine. Codex parallelises just as well, but you create the worktrees yourself or delegate to Codex web.
They fail in opposite directions. Codex pauses until the rolling five-hour window resets, or you buy credits. Cursor keeps working on on-demand usage and bills it in arrears. One costs you an afternoon, the other costs you money, and which is worse depends entirely on your week.
If you already pay for ChatGPT, start with Codex, because it costs nothing extra and you can decide with real evidence in a fortnight. If you spend most of your day inside existing code and want the typing itself to be faster, Cursor, and Tab is the whole argument.
Sources
Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.