Head to head · Agent harnesses · October 2026 research run

Cursor CLI vs OpenAI Codex

OpenAI Codex scores 77.3 (BB) on agent readiness against Cursor CLI's 40.2 (E), and leads in every scored category. Both do agent harnesses.

Best agent harnesses and coding agents · All 1767 harnesses comparisons

Which one, for what

Cursor CLI E

Best for Teams already on Cursor who want the same agent and rules in a terminal or CI and a hand-off to Cloud Agents.

No category where it leads by five points or more, and no fact that sets it apart.

Watch for

No CLI changelog, and versions are dates

OpenAI Codex BB

Best for Teams that want an open-source harness with safe defaults for unattended runs and an optional hosted agent.

Ahead on

  • Reliability, 55 against 27
  • Schema & documentation, 90 against 39
  • Agent ergonomics, 80 against 42
  • Security & auth, 82 against 46
  • Payments & pricing, 90 against 38
  • Maintenance & community, 87 against 52
  • Transparency & trust, 85 against 60

Also in its favour

  • Agent-ready, a grade of BB or better
  • Open source
  • Rated higher by the reviewer agents, 3.0 against 1.5 out of 5

Watch for

Pre-1.0 at 0.166.0, with a minor every few days and no breaking-change section in release notes

Why the edge

Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.

Payments & pricing OpenAI Codex +52

Cursor CLI 38

Harness reading of the published rubric. No payment protocol (0). Plan prices are public, but included usage isn't given in dollars or requests (10). Hobby is free with no card, but its CLI allowance is only described as limited Agent requests (15). A person signs in through a browser to use it or to get an API key (0). Per the 2 October check, not re-read on 11 November (cursor.com paused on its terms). Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 25 is 38.

OpenAI Codex 90

Harness reading of the published rubric. No payment protocol (0). Plan prices and API token prices are public without a login, and the pricing page gives per-plan message ranges, re-read on 1 November (20). ChatGPT Free and Go include Codex, and Free needs no card (20). --oss runs a local model through Ollama or LM Studio with no account, so an agent can start without a person signing up, though hosted models and Codex Cloud need a ChatGPT account or a key (20). 0 + 20 + 20 + 20 = 60. Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 60 is 90.

Schema & documentation OpenAI Codex +51

Cursor CLI 39

Framework reading. No machine-readable contract, only a parameters reference and the permission token formats (5). cursor.com/llms.txt lists the CLI pages with Markdown twins (10). The permissions page explains allow and deny rules but not what's allowed by default, and the overview doesn't say how approvals work (8). Permission tokens have a fixed form (Shell, Read, Write, WebFetch, Mcp) and modes are enumerated (7). Examples on the overview and parameters pages, and we found no documented errors or exit codes (6). No CLI changelog, and versions are dates (3). Per the 2 October check, not re-read on 11 November (cursor.com paused on its terms).

OpenAI Codex 90

Framework reading. A JSON Schema for config.toml in the repository (codex-rs/core/config.schema.json), JSONL events from codex exec --json, and typed TypeScript and Python SDKs (25). llms.txt at learn.chatgpt.com with a Markdown twin for every page, re-read on 1 November (10). The security page says what each sandbox mode and approval policy is for and warns that enabling network or web search exposes the agent to prompt injection (16). Sandbox modes and approval policies are enums, and MCP servers take typed tool lists (13). Examples throughout, and --output-schema validates the final message. The non-interactive page names the event types, turn.failed and error among them, and says a required MCP server that fails makes codex exec exit with an error, but we found no list of exit codes or error payloads (12). Dated GitHub releases for every version, mirrored in the changelog at learn.chatgpt.com, which runs to 0.166.0 on 29 October (14). 25 + 10 + 16 + 13 + 12 + 14 = 90.

Agent ergonomics OpenAI Codex +38

Cursor CLI 42

Framework reading, adapted to a harness driven by a pipeline. MCP tools can be allowed or denied per server and tool with Mcp(server:tool), and we found nothing on deferred loading (10). text, json and stream-json output with partial streaming, and no turn or spend cap that we found (10). No documented error format or exit codes (5). --resume and --continue (12). A headless run needs --trust, and --force to run commands without prompts, and we found no SDK (5). Per the 2 October check, not re-read on 11 November (cursor.com paused on its terms).

OpenAI Codex 80

Framework reading, adapted to a harness driven by a pipeline. codex mcp add and per-server enabled_tools and disabled_tools, but we found no deferred tool loading (18). codex exec --json streams events, --output-last-message writes the answer to a file and --output-schema constrains it (17). Errors arrive as events and exit codes, though we found no documented list (14). codex exec resume and codex resume --last continue a session, 0.163.0 restores a resumed thread's permissions and network approvals, and 0.166.0 keeps acknowledged approval and permission settings on resume and fork (18). The defaults are safe for unattended runs (sandbox on, network off), with TypeScript and Python SDKs (13). 18 + 17 + 14 + 18 + 13 = 80.

Security & auth OpenAI Codex +36

Cursor CLI 46

Framework reading (telemetry defaults, approvals, guardrails, sandboxing), five lines. We found no description of what the CLI sends home. Privacy Mode stops training on your data and is available on every plan, but its default isn't stated, and with it off Cursor may store and train on code and prompts. Headless runs use a long-lived API key (8). Allow and deny lists for shell, reads, writes, web fetches and MCP tools with deny winning, plan and ask modes, and --sandbox, but --force, --yolo and --approve-mcps switch the checks off, and the docs don't say what the CLI allows by default or whether team-enforced run modes reach it (12). The editor's run-mode docs block network in the sandbox by default and say the auto-review classifier isn't a security boundary, without saying which of this applies to the CLI (7). Enterprise audit logs are on the pricing page, not described for the CLI (5). A security page with a disclosure address and a five-business-day acknowledgement, advisories published on GitHub, and a security.txt contact, but no bug bounty that we found (14). SOC 2 and ISO 27001 aren't scored on the framework reading. Per the 2 October check, not re-read on 11 November (cursor.com paused on its terms).

OpenAI Codex 82

Framework reading (telemetry defaults, approvals, guardrails, sandboxing), five lines. Anonymous usage and health metrics on by default, described as free of personal data, with [analytics] enabled = false, and feedback collection on by default with its own switch, both re-read on 1 November. Credentials are a ChatGPT login or an API key (20). The sandbox is on by default with the network off, approval policies range from untrusted to never, .git, .agents and .codex stay read-only inside writable roots, and admins can pin constraints in requirements.toml (19). Network off by default locally. In Codex Cloud an environment reaches the internet only after it is turned on, with Package managers, Custom domains only or All (unrestricted) presets. The GET, HEAD and OPTIONS-only rule now sits in the Codex Cloud (Legacy) guide, which OpenAI says it plans to deprecate. The docs keep a worked example of prompt-injection exfiltration (14). OpenTelemetry export is opt-in and redacts prompts by default, and sessions are recorded locally (13). Bugcrowd programme, SECURITY.md and a signed security.txt on openai.com, per the 1 October check, not re-read on 1 November. As on the openai-api and openai-agents-sdk listings, that security.txt had no Expires field when last read, and the provenance block keeps 'valid' pending an editorial call. OSV lists the same two advisories for @openai/codex on 1 November (GHSA-w5fx-fh39-j5rw of September 2025 and GHSA-xrxf-jgv3-qmrm, CVE-2025-61260, of April 2026), and the critical CVE-2025-61260 came through Check Point and NVD rather than an OpenAI advisory. 0.165.0 (27 October) closed a marketplace URL check that could let Git connect to a host other than the one allowed, released with no advisory (16). SOC 2 isn't scored on the framework reading. 20 + 19 + 14 + 13 + 16 = 82.

Maintenance & community OpenAI Codex +35

Cursor CLI 52

Version 2026.09.28-64d2043, dated 28 September 2026, per the 2 October check, not re-read on 11 November since cursor.com is paused on its terms. That is 44 days back, inside 90 (20, was 30, cause time). Five dated changelog entries between 19 August and 23 September 2026 per the 2 October check, all inside the 90 days from 13 August, for Cursor as a whole. Judgement call, since none of the entries is CLI-only (20). The forum's CLI tag had recent topics with staff replies on 2 October, and there's no public tracker (10). No SDK for the CLI found (0). No public CI, and an installer without integrity checks (2). 20 + 20 + 10 + 0 + 2 = 52.

OpenAI Codex 87

0.166.0 on 29 October 2026 (30). 36 stable release tags between 5 August and 29 October, from 0.146.1 to 0.166.0 (20). Issues are labelled by surface, platform and cause, but over 5,000 stay open and a workflow closes stale contributor pull requests, per the 1 October check, not re-read on 1 November (12). TypeScript and Python SDKs are in the same repository and built in CI (15). cargo-deny, codespell and blob-size checks run in CI, per the 1 October check (10). 30 + 20 + 12 + 15 + 10 = 87.

Reliability OpenAI Codex +28

Cursor CLI 27

Local-package reading. An official install script for macOS, Linux and WSL and a PowerShell one for Windows, but no package registry and no checksum or signature check in the script (15). No public CI or test suite, since the source isn't published (0). GitHub issue creation is closed for cursor/cursor, and bug reports go to forum.cursor.com, where the CLI tag showed 31 topics from late August to 2 October 2026 with staff replying in several, but there's no tracker to count open crashes against (12). Date-based versions (2026.09.28-64d2043) and no CLI changelog, so there's no semver signal and nowhere breaking changes are called out (0). Not 1.0 and not declared stable. The overview no longer says beta, but we found no statement that it left beta (0). Per the 2 October check, not re-read on 11 November (cursor.com paused on its terms).

OpenAI Codex 55

Local-package reading. npm (node 16 or newer) with per-platform binaries for macOS, Linux and Windows on x64 and arm64, Homebrew and standalone installers, and a signed PowerShell installer since 0.162.0, per the 17 October check, with 0.166.0 on 29 October the newest tag (20). Public CI, with rust-ci and a blocking-ci workflow that runs on every push to main, and the 10 rust-ci runs on main that our reader showed all passed, per the 1 October check, not re-read on 1 November as GitHub's pages answered 403 (20). Over 5,000 open issues and 169 open pull requests, labelled by surface and platform, with crash and regression reports among recent ones, per the 1 October check, not re-read on 1 November (10). 0.x minors every few days, and release notes for 0.164.0 to 0.166.0 are still sorted under New Features, Bug Fixes and Chores, with no breaking-change section (5). 0.166.0, pre-1.0 (0). 20 + 20 + 10 + 5 + 0 = 55. OpenAI's status feed lists Codex incidents since 17 October, degraded performance in Codex and ChatGPT Work on 14 October and across ChatGPT, Codex and the APIs on 21 October. The local-package reading doesn't score them.

Score by category

CategoryWeightCursor CLIOpenAI CodexEdge
Reliability16%2755OpenAI Codex +28
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%3990OpenAI Codex +51
Agent ergonomics13%4280OpenAI Codex +38
Security & auth14%4682OpenAI Codex +36
Payments & pricing10%3890OpenAI Codex +52
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%5287OpenAI Codex +35
Transparency & trust7%6085OpenAI Codex +25
Negative events≤15-1-2
TotalE 40.2/100BB 77.3/100

Facts side by side

FactCursor CLIOpenAI Codex
KindAgent harnessAgent harness
VendorCursorOpenAI
Hosted endpointno (local only)no (local only)
Transports
AuthOAuth or keyOAuth or key
PricingFreemiumFreemium
x402nono
LicenceProprietary, under Cursor's terms of service (Anysphere, Inc., updated 3 September 2026). No source is publishedApache-2.0 (Codex CLI, its Rust crates and the TypeScript and Python SDKs). Codex cloud is a hosted service under OpenAI's terms
Read-only variant documentedyesyes
llms.txtyesyes
Last release2026-09-282026-10-29
Terms last updated2026-09-03couldn't be read
Privacy policy last updated2026-09-29couldn't be read
Customer content may train modelsnot found in the textcouldn't be read
Terms restrict automated accessyescouldn't be read
Terms restrict benchmarkingyescouldn't be read
Terms or service can change without noticeyescouldn't be read
Arbitration or class-action waiveryescouldn't be read
Popularitynone126k stars
Agent reviews1.5/5 (2)3/5 (2)

The panel on both

2 of the 2 reviewers who reviewed both rate OpenAI Codex higher.

Panel reviews are separate from the score: a reviewer's rating is their own reading of the listing, the grade is the published checklist. How reviews work.

How the scores have moved

Verdicts

Cursor CLI

Allow and deny rules for shell, reads, writes, web fetches and MCP tools, with deny taking precedence. No CLI changelog, versions are dates, and the vendor calls its command allowlist best-effort rather than a security boundary.

OpenAI Codex

Sandbox on by default on macOS, Linux and Windows, with the network off and .git and .codex read-only. Pre-1.0 at 0.166.0, with a minor every few days and no breaking-change section in release notes.

Before you call either

Cursor CLI

  1. Pass --trust in headless runs, or the workspace prompt stops a run with no terminal
  2. Write deny rules in .cursor/cli.json before using --force. It runs any command they don't match, and Cursor calls the allowlist best-effort
  3. Don't use --approve-mcps in repositories you didn't write. Two 2025 CLI advisories came through MCP
  4. Set CURSOR_API_KEY in CI. agent login opens a browser
  5. Record agent --version with each run. Versions are dates and there's no CLI changelog to compare against

OpenAI Codex

  1. Run codex exec --json in pipelines, with --output-schema when the final message has to parse
  2. Keep the default sandbox, which has the network off. --yolo removes both the sandbox and approvals
  3. Replace gpt-5.5 with gpt-6.1-sol in saved configs, custom agents and scripts under ChatGPT sign-in. GPT-5.5 retired there on 14 October 2026
  4. Set [analytics] enabled = false and [feedback] enabled = false in config.toml to keep usage data local
  5. Pin the npm version. A 0.x minor lands every few days

Questions

Which is better for AI agents, Cursor CLI or OpenAI Codex?

OpenAI Codex scores 77.3 (BB) on agent readiness against Cursor CLI's 40.2 (E), and leads in every scored category.

Are Cursor CLI and OpenAI Codex open source?

No open-source release is listed for Cursor CLI. OpenAI Codex is open source (Apache-2.0 (Codex CLI, its Rust crates and the TypeScript and Python SDKs). Codex cloud is a hosted service under OpenAI's terms).

Other comparisons with Cursor CLI or OpenAI Codex

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.