Codex vs Cursor and Claude Code: strengths and trade-offs
PLOpenAI Codex is a coding agent reachable from a CLI, an IDE extension, a desktop app, cloud tasks, @codex review on GitHub and GitLab, @Codex in Linear and @ChatGPT in Slack, all under one account and one AGENTS.md. That reach is its edge over Cursor and Claude Code. Its cost is more surfaces to govern, and all three tools face the same verification gate.
Your product manager posts in Slack: “The auth tests are failing on main, can someone fix it before the release?” You can open your editor, find the failure and fix it. Or someone replies @ChatGPT fix the failing auth tests and, with Cloud delegation enabled, a Codex cloud task starts while you finish what you were doing. This page is for developers deciding where Codex fits next to Cursor or Claude Code, and for tech leads and CTOs who must make a third agent produce work of the same, provable quality.
What does this Codex comparison cover?
Section titled “What does this Codex comparison cover?”- A surface-by-surface map of Codex, Cursor and Claude Code, with every fact dated.
- A decision table that sends each kind of task to the tool that fits it.
- Five copy-paste prompts: the same delegated task in each tool, a pull request review, and a cross-agent review.
- A verification gate for Codex: review, structured evidence and CI.
- The failure modes of adding Codex to a team, with a recovery for each.
How is Codex different from Cursor and Claude Code?
Section titled “How is Codex different from Cursor and Claude Code?”All three are coding agents. Each reads the repository, plans, edits files, runs commands and iterates until its checks pass. The tool comparison overview explains that shared loop. They differ in where the loop runs and where you supervise it.
| Codex | Cursor | Claude Code | |
|---|---|---|---|
| Home surface | No single home: CLI (codex), IDE extension, desktop app, cloud tasks | A VS Code-based editor with Tab completions, inline edit and an Agent panel, plus an Agents Window | The terminal (claude), plus a desktop app, IDE extensions and a web version |
| Start work from a chat or tracker | @ChatGPT in Slack (with Cloud delegation, repository work goes to a Codex Cloud task) and @Codex in Linear; Codex cloud tasks you continue from the web, mobile or desktop app; @codex review on GitHub and, in beta, on GitLab | Automations triggered from Slack, Linear, source control, webhooks and schedules; @Cursor in Linear comments starts a Cloud Agent | Claude Tag (Public Beta; Team, Enterprise) or the earlier Slack app (Pro, Max; retired 2026-10-05 in workspaces paired with a Claude organization); GitHub via anthropics/claude-code-action@v1 |
| Remote execution | Codex cloud: codex cloud exec (experimental in CLI 0.157.1–0.162.1), then codex cloud apply to pull the diff locally | Cloud Agents in isolated VMs | Web sessions, background sessions (claude --bg), Routines (research preview) |
| Pull request review | @codex review on GitHub and, in beta, GitLab; @codex security review (research preview) on GitHub; codex review locally | Bugbot | /code-review in a session; managed Code Review (Team and Enterprise; generally available per Anthropic, checked 2026-10-16) |
| Parallel isolation | --worktree / /worktree: worktree support on since 0.156.0; a session uses one only when you pass --worktree or run /worktree; 0.162.0 added managed Git worktree tools (create and list worktrees from trusted projects) | Worktrees | --worktree (-w) |
| Hooks | 12 events; a hook runs only once it is trusted | JSON over stdio, before or after agent-loop stages | 33 events; command, http, mcp_tool, prompt and agent handlers |
| Project instructions | AGENTS.md | Rules; reads AGENTS.md and CLAUDE.md too | CLAUDE.md; reads AGENTS.md when there is no CLAUDE.md (v2.1.277+) |
| Default model | GPT-6.1 Sol (since 2026-09-29) | Pick per session; no single default (Hobby uses Auto; Cursor, checked 2026-10-12) | Claude Opus 5.5 (v2.1.280+) |
Codex and Claude Code facts are checked against codex --help 0.157.1, claude --help 2.1.283 and the vendors’ docs on 2026-09-26. Some cells were re-read on 2026-10-12: the Codex GitHub, GitLab, Slack and Linear rows against OpenAI’s Codex docs (OpenAI’s Slack page is now titled “Use ChatGPT in Slack”), the Codex cloud, worktree and hooks cells against codex --help 0.162.1 and OpenAI’s source for that release (the command list is identical to 0.157.1), and the Claude Code AGENTS.md fallback against Anthropic’s memory docs and the stable release (2.1.287). The Cursor column comes from Cursor’s docs, help pages and release notes, read on 2026-10-12 against Cursor 3.24. Three Cursor cells rest on pages read on 2026-10-13: the VS Code-based editor (Cursor’s VS Code migration page), Cloud Agents in isolated VMs (the Cloud Agents page) and hooks as JSON over stdio (the hooks page). The Codex desktop app launches with codex app on macOS and Windows; according to Neowin it became a Codex mode inside the ChatGPT desktop app on 2026-07-09.
Which tool should you use for each task?
Section titled “Which tool should you use for each task?”Pick by where the task starts and how much supervision it needs, not by which model is “smarter”.
| Task | Use | Why |
|---|---|---|
| Bug reported in a Slack thread or Linear issue | Codex | @ChatGPT in Slack (with Cloud delegation) or @Codex in Linear starts a cloud task from the thread; nobody changes tools |
| Review of every pull request | Codex or Cursor | @codex review with automatic reviews, or Bugbot. Run one bot per repository, not both |
| Small edit in the file you have open | Cursor | Tab and inline edit keep you in the file; there is nothing to delegate |
| UI change you judge by looking at it | Cursor | You accept or reject each change as the dev server reloads |
| Change across 10 or more files with tests as the oracle | Claude Code or Codex CLI | Both run long in a worktree; Claude Code’s richer hooks enforce the gate after every edit |
| Guardrails that must never be skipped | Claude Code, then Codex | Both run hooks and support managed policy; Claude Code has more events and handler types |
| Scripted job or CI step | Claude Code or Codex | claude -p --output-format json, or codex exec --output-schema for a typed result |
| Recurring maintenance (dependency checks, flaky-test triage) | Any | Codex automations, Cursor Automations, Claude Code Routines. Compare triggers, secrets and billing, not the feature name |
Models. Codex runs GPT-6.1 Sol by default at low effort (Codex’s label: “Latest workhorse model for coding and everyday work.”), you choose GPT-6 Astra (“Frontier intelligence for the most demanding work.”) by hand for the hardest work, and GPT-6 Luna (“Fast and affordable model for easier tasks”) covers cheaper, easier tasks. Claude Code runs Claude Opus 5.5 by default; you choose Claude Fable 5.1 by hand (/model fable) for the longest-horizon work. On the official Terminal-Bench 4.0 leaderboard (read 2026-10-12), Claude Opus 5.5 at max effort in Claude Code scores 64.8% ± 3.1 and GPT-6.1 Sol at max effort in Codex 58.2% ± 3.1; each runs in its own vendor’s harness. An earlier version of this page said that neither Astra nor Opus 5.5 had an entry on 2026-09-26; GPT-6 Astra had been on the board since 2026-09-03. Start on each tool’s default, raise effort before you switch model, and switch only when your own evals say so. Model prices and benchmarks live on the models hub; plan prices for all three tools live on the pricing analysis.
How does one delegated task look in each tool?
Section titled “How does one delegated task look in each tool?”The task: the auth tests fail on main and must be fixed before a release. The workflow differs; the acceptance criteria do not. Each prompt names the scope, the command that proves success and the report it must return.
Start the task in Codex cloud from your terminal, so it runs on a remote environment you have already configured. The codex cloud command is marked experimental in CLI 0.157.1–0.162.1, so check codex cloud --help after each upgrade. Codex takes the environment ID and, by default, your current branch.
Replace ENV_ID with an environment ID from codex cloud. Follow the task with codex cloud status TASK_ID, read the diff with codex cloud diff TASK_ID, and apply it locally with codex cloud apply TASK_ID only after the test output in the report is green. The same request works as an @ChatGPT mention in the Slack thread when your workspace has Cloud delegation enabled; OpenAI’s docs say ChatGPT then sends the repository work to a Codex Cloud task and returns the result to the thread. Cloud delegation requires a published environment shared with the workspace (OpenAI’s Slack page, read 2026-10-12).
Start a session in its own worktree so the fix cannot collide with your other work, and let your project hooks run the gate after every edit.
claude --worktree fix-auth-testsTo start the same work from Slack or GitHub instead, use Claude Tag or the Claude Code GitHub Action; see Claude Code Routines for scheduled runs.
Hand the task to a Cloud Agent, or run it in a worktree from the Agent panel if you want to watch it. The prompt is the same contract.
Cursor Automations can start the same agent from a Slack message or a Linear issue; see Cloud Agents and Automations.
What makes each result checkable is the shared contract: a scope boundary, one test command, a rule for when to stop, and a required report. See acceptance criteria an agent can verify for how to write it.
How do you verify Codex’s output without reading every line?
Section titled “How do you verify Codex’s output without reading every line?”Codex produces changes from places where nobody watches the run: a Slack thread, a Linear comment, a scheduled automation. Someone then turns the result into a pull request. So the gate has to work without a human in the loop. Use the same gate you use for Cursor and Claude Code.
-
Put the review rules in
AGENTS.md. Codex readsAGENTS.mdbefore it works, and OpenAI’s GitHub docs say custom review rules for@codex reviewgo in a## Code Review Rulessection there too (read 2026-10-12). One file then steers both the author and the reviewer. Since Codex 0.150.0, untrusted projects do not supply project-levelAGENTS.md, so trust the repository before you rely on it. -
Make Codex report evidence, not a summary. For scripted runs,
codex exec --output-schemaforces the final answer into a JSON shape that CI can check. Save this asevidence.schema.json:{"type": "object","additionalProperties": false,"required": ["criteria", "commands", "unverified"],"properties": {"criteria": { "type": "array", "items": { "type": "object","additionalProperties": false,"required": ["criterion", "test", "passed"],"properties": { "criterion": { "type": "string" }, "test": { "type": "string" }, "passed": { "type": "boolean" } } } },"commands": { "type": "array", "items": { "type": "object","additionalProperties": false,"required": ["command", "exit_code"],"properties": { "command": { "type": "string" }, "exit_code": { "type": "integer" } } } },"unverified": { "type": "array", "items": { "type": "string" } }}}Codex sends this schema to the API in strict mode, so every object needs
"additionalProperties": falseand every property must be listed inrequired. Without them the run fails with a schema error and writes noevidence.json.Then run the evidence pass on the branch, in the terminal, with a read-only permission profile (beta, Codex CLI 0.138.0 or later). The
:read-onlyprofile allows no network access and no file writes, so fetch the acceptance criteria first and hand them to Codex as a file:Terminal window gh pr view --json body -q .body > pr-criteria.mdcodex -c default_permissions=":read-only" exec \--output-schema evidence.schema.json -o evidence.json \"Compare this branch with origin/main. For each acceptance criterion inpr-criteria.md, name the test that proves it and whether it passed.List every command you ran with its exit code. If a check cannot runwithout network access or without writing files, put it underunverified. Do not report a check as passed unless you ran it."If your test runner writes caches or coverage files, those tests fail under
:read-only; run this pass with the:workspaceprofile instead.Then let CI check the report instead of a person:
Terminal window jq -e '(.criteria | length > 0) and ([.criteria[].passed] | all)' evidence.jsonjq -eexits non-zero when the list is empty or any criterion isfalse, so the job fails. The file is the agent’s own claim, though, and a pull request can edit it, so this check only catches a run that admits a failure; the gate is CI re-running the tests itself (step 4). A reviewer readsevidence.jsonand the files listed underunverified, not every hunk. -
Let a different agent review. A reviewer that did not write the change does not share its blind spots. When Cursor or Claude Code wrote the branch,
codex review --base maingives you that second opinion locally. When Codex wrote it, ask Claude Code or Cursor. -
Let CI decide. Tests, type check and lint run on every pull request, whichever agent opened it, and nothing merges on a red check. In CI, never run an agent on an untrusted contributor’s ref while secrets are in the environment; the safe pattern is in automated PR review.
Who signs off. The person who started the task, including from Slack or Linear, owns the pull request and reads the evidence, the flagged files and any high-risk finding. The tech lead owns the gate: which checks run, which reviewer bot is on, and which paths (auth, payments, migrations) always need a human. The evidence bundle defines a complete change manifest.
Where does each tool cost you?
Section titled “Where does each tool cost you?”Codex. More surfaces mean more places to configure and govern. A task started in Slack runs in a cloud environment with its own dependencies and secrets, which can differ from your laptop. Admins constrain the CLI through requirements.toml (for example allow_managed_hooks_only and permission_profile), so treat that file as part of your platform, not a personal setting. Plan allowances run on five-hour and weekly windows, and Pro plans currently have no five-hour limit (OpenAI’s Codex pricing page, read 2026-10-12).
Cursor. The editor is the centre, so unattended work goes through Cloud Agents and Automations, which you set up separately from interactive use. Cursor’s plan prices are in the pricing analysis (cursor.com/pricing, read 2026-10-12), and Bugbot bills by usage: an average run costs between $1.00 and $1.50, according to Cursor’s help (checked 2026-10-12).
Claude Code. It has the richest hook and policy model, and also the most concepts to learn: permission modes, Routines, background sessions, Claude Tag and plugins. Release channels matter: stable runs about a week behind latest (v2.1.292 against v2.1.302 on 2026-10-17), so a feature from v2.1.293 or later is on latest only.
For tech leads and CTOs deciding whether to add Codex, adopt this table as-is:
| Question | Adopt this answer |
|---|---|
| Do we add Codex as a third tool? | Only if work arrives in GitHub, Slack or Linear and your company already has ChatGPT plans that include Codex. Otherwise the extra surfaces cost more governance than they save. |
| What do we standardize? | The gate: AGENTS.md rules, CI checks, one review bot per repository, and the evidence format. Any tool that passes the gate is allowed. |
| What do we measure? | Cost per accepted change and revert rate per tool, not tasks started. See the economics of agent-built software. |
| Who controls permissions? | The platform team, through managed settings: requirements.toml for Codex, managed settings for Claude Code. See permissions and sandboxing. |
| How do we pick a winner? | Run the same 10 to 20 of your own closed issues through each tool against the same gate, then compare accepted changes and cost. The protocol is in the coding-agent landscape. |
What breaks when you add Codex next to Cursor or Claude Code?
Section titled “What breaks when you add Codex next to Cursor or Claude Code?”Two review bots comment on every pull request. Symptom: @codex review and Bugbot, or Claude Code’s action, post overlapping findings, and reviewers start ignoring both. Recovery: pick one PR review bot per repository and use the other tools for pre-PR review only.
A cloud task passes in the cloud and fails locally. Symptom: the report shows green tests, but codex cloud apply produces a branch that fails CI. Recovery: make the cloud environment install the same dependency versions as CI, and treat CI, not the task report, as the source of truth.
Instructions drift between AGENTS.md, CLAUDE.md and Cursor Rules. Symptom: each agent follows different conventions in the same repository. Recovery: keep AGENTS.md as the single source and let every tool read it: Cursor reads it natively (Cursor’s rules docs, checked 2026-10-12), and Claude Code reads it where there is no CLAUDE.md or through an @AGENTS.md import. See rules sync across tools.
A Codex hook never fires. Symptom: the lint hook you committed does nothing in Codex. Recovery: Codex runs a hook only after it is trusted; review and trust it in the session (/hooks). If your admins set allow_managed_hooks_only, project hooks are ignored by design and the hook belongs in managed policy.
A task from Slack changes more than it should. Symptom: a “fix the failing test” request edits the test to pass. Recovery: put “fix the code, not the tests” and the stop rule in AGENTS.md, and add a CI check that flags modified or deleted assertions in existing test files (new tests pass freely) and routes those pull requests to a required CODEOWNERS or human approval.
Someone enables full access to unblock a run. Symptom: --dangerously-bypass-approvals-and-sandbox appears in a script. Recovery: remove it. Use it only inside a disposable, network-restricted sandbox. For unattended local runs, use --approve-for-me (automatic review with the workspace-write sandbox) or a permission profile.
Where to go next after comparing Codex
Section titled “Where to go next after comparing Codex”Did this guide help you?
One tap, no sign-in.
What will you do with it?
How did it read?
What got in the way? Pick any that apply
Your role?
Thanks. I read every answer. Michał Jaskólski
Did this guide help?
One tap each. Close whenever you like.
no sign-in
Frequently asked questions
What makes Codex different from Cursor and Claude Code?
Codex spreads one agent across several surfaces: a CLI, an IDE extension, a desktop app, Codex cloud tasks, and mentions in GitHub and Linear (@ChatGPT in Slack). You can start work where the request arrives and pull the result back to your machine with codex cloud apply. Cursor centres on its editor and Claude Code on the terminal, though both now reach cloud agents and chat tools too.
Which model does Codex use by default?
GPT-6.1 Sol is Codex's bundled default since CLI 0.159.1 (2026-09-29), at low effort by default. GPT-6 Astra, GPT-6 Sol and GPT-6 Luna are in the picker. Claude Code defaults to Claude Opus 5.5 from v2.1.280, on both release channels. Prices and context windows are on the models hub.
Does Codex have hooks like Claude Code?
Yes. Codex CLI 0.162.1 supports hooks on 12 events, including PreToolUse, PostToolUse and Stop, and a hook runs only after you trust it. Claude Code has more events (33) and more handler types, so it remains the more programmable of the two.
How do I verify Codex's work without reading every line?
Hold Codex to the same gate as any other agent: tests, type check and lint in CI, a structured evidence report from codex exec --output-schema, and a review by a second agent that did not write the change. You then read the evidence and the files it flags.
When should I choose Codex over Cursor or Claude Code?
Choose Codex when work starts outside the editor, in a GitHub pull request, a Slack thread or a Linear issue, and your company already runs on ChatGPT plans. Choose Cursor for supervised editing inside the editor, and Claude Code for long, scripted, hook-guarded runs.