Agentcode

Cursor CLI vs Codex CLI: install, pricing, usage limits and which terminal agent to buy

Sep 1, 2026 · 8 min read · By Marcus Lee, Engineering

Agent Run

Pick a task

Plan

  • planning

Files changed

Test run

0 failed

Pull request

Open

You review and merge. Agentcode never merges on its own.

Buy Cursor CLI if you want a predictable dollar figure and access to models from four vendors. Buy Codex CLI if you are already paying for ChatGPT and would rather hit a wall that resets on a clock than watch a bill grow. That is the whole decision, and it comes down to one structural difference: Codex CLI meters you in messages per rolling five-hour window, so it stops you and gives the capacity back on schedule. Cursor CLI meters you in dollars of model usage from two monthly pools, so it never stops you, it just keeps charging. Same product shape, opposite failure mode.

Every figure below comes from OpenAI's or Cursor's own documentation, read on September 1, 2026. Where we do arithmetic on top of a published rate, the assumption is stated in the sentence above the table.

Cursor CLI vs Codex CLI at a glance

Cursor CLICodex CLI
Binaryagentcodex
Installcurl https://cursor.com/install -fsS | bashcurl -fsSL https://chatgpt.com/codex/install.sh | sh
Other installsWindows PowerShell one-linernpm, Homebrew cask, Windows PowerShell one-liner
Sign inagent login, or CURSOR_API_KEYcodex login, or an OpenAI API key
Plan buysTwo monthly usage pools priced in dollars at model API ratesMessages per rolling five-hour window, published per model
Entry planPro, $20 a monthPlus, $20 a month
Team seatTeams Standard $40 per user, Premium $120 per userBusiness $20 per user billed annually, $25 monthly
Model choiceAnthropic, OpenAI, Google, Cursor's own Grok and ComposerOpenAI only, unless you sign in with your own API key
Headless modeagent -p with --output-format jsoncodex exec with --json
Cloud handoffPrefix a message with & to push it to a Cloud Agentcodex cloud exec, which shares your local five-hour window

The difference that decides it: a time limit versus a bill

Codex CLI publishes a hard ceiling. On ChatGPT Plus at $20 you get roughly 10 to 100 GPT-5.6 Sol messages per five-hour window, 25 to 200 on Terra and 250 to 2,000 on Luna. Pro at $100 multiplies those by five, Pro at $200 by twenty, and ChatGPT Business gives you exactly the same numbers as Plus. When you run out, you wait. That is genuinely annoying at four in the afternoon and it is also a budget that cannot surprise you, because there is nothing to overspend.

Cursor CLI has no such ceiling. Your plan carries two usage pools that reset with the billing cycle: a Cursor Models pool covering Cursor's own Grok 4.6, Grok 4.5 and Composer 2.5, and an Other Models pool for third-party models charged at that model's API price. Exhaust a pool and you add on-demand usage or upgrade. Nothing locks. On Teams and Enterprise there is also a Cursor Token Rate of $0.25 per million tokens layered on top of third-party model requests, which Cursor's own first-party models are exempt from.

Because Cursor publishes per-model rates in dollars, you can price a session exactly. Assume one agent session is 300,000 input tokens and 30,000 output tokens, which is a realistic multi-turn run where the whole conversation is resent with every tool result. That assumption is ours. The rates are Cursor's.

Model in Cursor CLIInput / output per 1MCost of one sessionWhich pool
Composer 2.5$0.50 / $2.50$0.23Cursor Models
Grok 4.6$2 / $6$0.78Cursor Models
Claude Sonnet 5$2 / $10$0.90Other Models
GPT-5.3 Codex$1.75 / $14$0.95Other Models
Gemini 3.1 Pro$2 / $12$0.96Other Models
GPT-5.4$2.50 / $15$1.20Other Models
Claude Opus 5$5 / $25$2.25Other Models
Claude Fable 5.1$10 / $50$4.50Other Models

Those figures ignore cache reads, which are billed at a fraction of the input rate, so treat them as an upper bound for a session of that size. The spread is what matters: on the same plan, doing the same work, Composer 2.5 costs a fifth of what Claude Sonnet 5 costs and a twentieth of Claude Fable 5.1. Model choice is the whole cost story on Cursor, exactly as it is on Copilot.

You cannot build the same table for Codex CLI, and that is a real limitation worth stating plainly. OpenAI publishes its rate card in credits per million tokens and does not publish a dollar-per-credit price on the Codex pricing page. So on Codex you get a precise message ceiling and a fuzzy dollar figure; on Cursor you get a precise dollar figure and no ceiling at all. Our Codex CLI page works the credit arithmetic through in full, and Cursor pricing does the same for the plan side.

Which models can you actually run?

This is the biggest functional gap and it rarely appears in comparisons. Codex CLI runs OpenAI models. That is it, unless you sign in with your own API key, in which case model availability follows whatever the key can reach. Cursor CLI puts Anthropic, OpenAI, Google, Z.ai and Cursor's own jointly trained models behind one account, in one interface, with one invoice.

If your team has opinions about which model handles your codebase best, or if you want to run a cheap model for routine refactors and an expensive one for architecture work, Cursor gives you that in a single subscription. If you are happy on OpenAI models and would rather not manage a model menu, Codex removes a decision. Neither answer is wrong, but a team that has already benchmarked Claude against GPT on its own repository should notice that only one of these tools lets you act on the result.

Running either one headless, and the trap both of them set

Both CLIs ship a non-interactive mode, and both of them default to not touching your files. This catches people on the first CI run every single time.

On Codex, codex exec "task" runs in a read-only sandbox by default. You have to pass --sandbox workspace-write before it will actually apply an edit. Progress streams to stderr and only the final message goes to stdout, so it pipes cleanly, and --json turns stdout into a newline-delimited event stream you can read with jq. OpenAI recommends pairing --json with --output-last-message so a pipeline gets both machine-readable progress and a human summary.

On Cursor, agent -p "task" does the same thing and has the same default: without --force the agent proposes changes and never writes them. Cursor's own documentation spells it out with a comment, which tells you how often people hit it. Add --output-format json when a script needs structure rather than prose, and set CURSOR_API_KEY rather than relying on an interactive login on a shared runner.

One safety note that applies to both. Codex offers --sandbox danger-full-access and Cursor offers --yolo, and both vendors tell you to keep them inside an isolated runner or container. OpenAI's documented preference is to grant one more directory with --add-dir rather than dropping the sandbox entirely, which is good advice regardless of which tool you picked. An agent with unrestricted shell access on a shared CI runner is not a productivity feature.

Config files, rules and moving between them

Both read a project instruction file, and Cursor reads more of them than you would expect. Cursor CLI applies .cursor/rules, and it also reads AGENTS.md and CLAUDE.md at the project root if they are present. It picks up the same mcp.json your editor uses, so MCP servers configured once work in both places. Codex generates its own AGENTS.md with /init and injects it into context, which is why OpenAI lists shrinking that file and nesting it inside subdirectories as an official way to make your usage limits last longer.

Migration is cheaper than either vendor advertises. Codex CLI has an /import slash command that pulls in an existing Claude Code or Cursor setup, including projects and chats. Cursor reads Codex's and Claude's instruction files natively. So a two-week bake-off between them costs you one afternoon of setup, not two.

Worth checking before either lands on a production repository: your sign-in method decides which retention policy governs the transcripts. OpenAI states that signing in with ChatGPT applies your workspace permissions, role-based access control and Enterprise retention and residency settings, while an API key follows your API organization's retention and data-sharing settings instead. If your repository, fixtures or logs contain customer records, those transcripts become one more system a legal team has to account for, and teams that have had to map where personal data actually lives across their systems will recognize how quickly that list grows. Decide the auth method with your security reviewer, not with whoever set up CI.

Is Cursor CLI free?

No, not in any useful sense. Cursor CLI is included with a Cursor plan and the paid individual plans start at Pro for $20 a month, which is where both usage pools begin. Cursor also runs a Start plan, but it is India only and does not include the Other Models pool at all, so for a US team it is not an option. There is no free tier of the CLI that carries a usable model allowance.

Is Codex CLI free?

Technically yes, practically no. Codex CLI installs and runs on the ChatGPT Free plan, but OpenAI does not publish any per-model message figure for Free or for the $8 Go plan, so there is nothing to plan against. Plus at $20 is the first tier with documented limits. If a number in a budget spreadsheet is what you need, that is where the ladder actually starts.

Which one should your team buy?

Buy Cursor CLI if your team already uses the Cursor editor, if you want Anthropic and Google models alongside OpenAI ones on a single invoice, or if you would rather absorb a variable bill than lose an afternoon to a rate limit. Teams Standard at $40 per user is the seat to price, with Premium at $120 adding five times the Standard limits on Agent.

Buy Codex CLI if your developers already pay for ChatGPT, if you work in bursts rather than continuously, or if finance would genuinely rather have a hard ceiling than a variable line item. Just do not buy ChatGPT Business expecting more terminal capacity than Plus, because the published limits are identical row for row, and do not buy the $100 Pro tier expecting better value per message, because it is the same price per message as Plus in a bigger bucket. Only the $200 tier actually halves the rate.

Buy neither if what you actually want is finished work rather than a session to supervise. Both of these tools are excellent pairs of hands that still need you sitting in front of them, steering, approving and re-reading output. That is a real cost and it does not show up on either invoice. Agentcode takes a task against a connected GitHub or GitLab repository, plans it, edits the code, runs your test suite and opens a pull request for a human to read, at a flat $29 a month billed yearly with nothing merged without you. If you are still shortlisting, Codex against Cursor as editors covers the IDE side of the same question, GitHub Copilot CLI is the third serious terminal option, and Codex vs Claude Code takes apart the pair most teams shortlist first.

Try the demo

Watch the agent plan, edit, run tests, and open a pull request you review and merge.

No card to start · Review-first: the agent never merges