From Aryan Vatsa | Product & Market Analysis

Claude Code vs Codex CLI vs Gemini: What a Heavy Day in the Terminal Costs

On this page

A heavy day with a terminal coding agent costs about $27 at list API prices, and it costs roughly that on all three major vendors. Anthropic, OpenAI and Google now list their flagship coding models at the same $2 per million input tokens and $10 per million output. So the Claude Code vs Codex CLI question is no longer about the rate card. It is about plan limits, cache behaviour and what the agent is allowed to touch.

Key takeaways

  • The three flagship coding models share one list price. Claude Sonnet 5.5, GPT-6.1 Sol and Gemini 4 Argon all list at $2 input, $0.10 cached input and $10 output per million tokens in October 2026, though Argon's price doubles on 1 December 2026.
  • Gemini CLI is no longer the consumer product. Google stopped serving Gemini CLI for free, Google AI Pro and Google AI Ultra users on 18 June 2026 and moved them to Antigravity CLI. Gemini CLI now survives on paid API keys and Code Assist Standard or Enterprise licences.
  • A subscription beats the meter for a heavy user by a wide margin. Our worked day costs $27.40 at list rates, so a $200 monthly plan pays for itself in about 7 heavy days, provided its 5-hour and weekly limits do not stop you first.
  • Codex CLI is the only one of the three that sandboxes by default. Claude Code documents its sandbox as off by default, and Gemini CLI and Antigravity CLI make it opt-in, while Codex runs with network access off unless you turn it on.
$2 / $10Input and output price per million tokens for the flagship coding model at all three vendors. Sources: Anthropic, OpenAI and Google price pages, October 2026.
$13Average Claude Code cost per developer per active day across enterprise deployments, with 90% of users under $30. Source: Anthropic Claude Code docs, directional.
18 JuneDate in 2026 when Gemini CLI stopped serving free and consumer subscription accounts. Source: Google Developers Blog, May 2026.

Who is still in the terminal in October 2026

A terminal coding agent is a command-line program that reads your repository, edits files and runs shell commands in a loop until a task is done. The model does the reasoning. The CLI decides what it may read, write and execute, and how the usage is billed.

Three vendors set the terms of this category, and one of them changed its product mid-year. Any "gemini cli review" written before June now describes a tool most individual users can no longer sign in to with a Google account.

Claude Code ships with every paid Claude plan from Pro upward, and with Team seats. Codex CLI ships with every ChatGPT plan, from Free and Go through Plus, Pro, Business and Enterprise, according to OpenAI's Codex pricing page. Both also run on a pay-per-token API key instead of a subscription.

That dual route matters for budgeting. You can buy the same agent as a flat fee with a ceiling, or as a meter with no ceiling, and the right answer depends on how many heavy days your team actually has.

Google's route split in two. On 19 May 2026 Google announced that Gemini CLI would stop serving Google AI Pro, Google AI Ultra and free Code Assist users on 18 June. Those users were pointed to Antigravity CLI, which Google describes as built in Go on the same agent harness as Antigravity 2.0.

Gemini CLI itself did not disappear. Google says it remains available through paid Gemini API keys, and that Code Assist Standard and Enterprise licences are unchanged. Its own README now tells users that it "is not optimized for the latest Gemini models". We read that as a maintenance posture, and we would not start a new team on it.

Plan limits and prices for each AI coding CLI

Every subscription in this category sells a usage allowance, not a number of requests. None of the three vendors publishes a guaranteed count for its consumer plans, which is the single most frustrating fact in this comparison.

Terminal coding agent plans and published limits, October 2026
RouteMonthly price (USD)What the vendor publishes about limits
Claude Code on Pro$20, or $17 billed annuallyA 5-hour session limit and a weekly limit, shared with the Claude apps. No message count.
Claude Code on Max 5x / 20x$100 / $200, each with matching monthly API credit5x or 20x Pro usage per 5-hour session, plus weekly limits and a separate weekly limit for Fable.
Codex CLI on ChatGPT Plus$2015 to 160 local messages per 5 hours on GPT-6.1 Sol, 350 to 3,000 on GPT-6 Luna. Weekly limits may also apply.
Codex CLI on ChatGPT Pro$100, $200 or $500"No five-hour limit" at present. Weekly limits may apply. No published count.
Antigravity CLI, free$0"Basic weekly rate limits", a quota refreshed weekly. No count.
Antigravity CLI on Google AI Pro or UltraNot shown in USD on the pages we openedA quota refreshed every five hours until a weekly limit is reached. Overage via purchased AI credits.
Gemini CLI on Code Assist Standard / EnterpriseLicence pricing via Google Cloud1,500 / 2,000 requests per user per day, the only hard counts in this table.

Sources: claude.com/pricing and Anthropic support articles; learn.chatgpt.com/docs/pricing; antigravity.google/pricing and /docs/plans; geminicli.com quota page, last updated 18 June 2026. Codex message ranges are OpenAI's own estimates for Plus and Standard Business.

Claude Code limits after the September change

Anthropic ran a promotion that raised Claude Code weekly limits by 50% from 13 May to 13 September 2026. When it ended, the company did not simply revert. From 14 September, weekly limits are 25% higher than they were before the promotion on Pro, Max, Team and seat-based Enterprise.

The 5-hour limit is the one you feel during a working session. When it runs out, you can wait, upgrade, switch on paid usage credits, or move to API billing. Max subscribers now carry $100 or $200 of monthly API credit, which our check of every Claude plan and model rate covers in detail.

Codex limits depend on which model you pick

OpenAI is the only vendor that publishes ranges per model, and the spread is the story. On Plus, the same 5-hour window holds 5 to 45 messages on GPT-6 Astra, 15 to 160 on GPT-6.1 Sol, and 350 to 3,000 on GPT-6 Luna.

So the Codex allowance is a model choice disguised as a plan choice. On OpenAI's own ranges, Luna allows roughly 20 times as many messages as GPT-6.1 Sol, so a team that routes routine edits to Luna stretches the same plan much further.

Antigravity limits are written in adjectives

Google's plan page describes Pro as "a high, generous quota" and Ultra as "the highest, most generous quota". Neither carries a number. Google says the baseline limits are "primarily determined by available capacity", which tells you the allowance can move without a price change. That pattern is the subject of our analysis of AI usage-limit shrinkflation.

The API rate cards converged at $2 and $10

The more surprising finding sits underneath the plans. When you run any of these agents on an API key, the flagship models cost the same per token.

API list prices per million tokens for coding models, opened 23 October 2026
ModelInputCached inputOutputNote
Claude Sonnet 5.5$2.00$0.10$10.00Cache writes extra: $2.50 (5 min) or $4 (1 hour)
Claude Opus 5.5$4.00$0.20$20.00Anthropic's top model
GPT-6.1 Sol$2.00$0.10$10.00OpenAI's recommended Codex model, up to 272K context
GPT-6 Sol$2.00$0.20$10.00Same headline, double the cached rate
Gemini 4 Argon$2.00$0.10$10.00Rises to $4 / $0.20 / $20 on 1 December 2026
Gemini 3.8 Flash$0.75$0.075$3.75Doubles on 1 January 2027

A matching rate card does not produce a matching invoice. Each model spends a different number of tokens on the same task, and each vendor caches differently. Google's Argon supports implicit caching only, while Anthropic charges a premium to write to the cache.

We think the convergence is deliberate. When three competitors land on the same price, the contest moves to things a buyer cannot read off a price page: how many tokens a task takes, and how long the cache stays warm. That is the same trap described in why cheap tokens still produce rising AI bills.

Google has published both of its rises in advance. Argon doubles on 1 December 2026, and 3.8 Flash doubles on 1 January 2027. Any cost model you build on Google pricing this month has a short shelf life, which the breakdown of the Gemini Flash price increase tracks.

A heavy-user cost model for terminal coding agents

No vendor publishes a token profile for a "heavy user", so we built one and show every input. Change any line and the arithmetic still holds.

The assumptions behind the heavy day

Our heavy day processes 60 million input tokens and generates 1 million output tokens. Agents re-send the conversation and file context on every turn, which is why input dwarfs output. We assume 90% of input is served from cache, so 54 million tokens are cached reads and 6 million are fresh.

We calibrated the profile against the only public anchor. Anthropic reports an average of about $13 per developer per active day, with 90% of users under $30. At Sonnet 5.5 rates our day lands at $27.40, just inside that 90th percentile. That is what we mean by heavy.

Worked heavy-user day at list API prices: 6M fresh input, 54M cached input, 1M output
ModelFresh inputCached inputOutputPer heavy day21 active days
Gemini 3.8 Flash$4.50$4.05$3.75$12.30$258.30
Sonnet 5.5, GPT-6.1 Sol, Argon (to 30 Nov)$12.00$5.40$10.00$27.40$575.40
GPT-6 Sol$12.00$10.80$10.00$32.80$688.80
Opus 5.5, Argon (from 1 Dec)$24.00$10.80$20.00$54.80$1,150.80

Illustrative model, not measured usage. Token volumes are our assumption, calibrated to Anthropic's published per-day averages. Cache write surcharges are excluded, which understates Anthropic and OpenAI slightly relative to Google.

One heavy day in the terminal, at list API prices 60M input tokens (90% cached) and 1M output tokens. US dollars per developer per day. Gemini 3.8 Flash$12.30 Sonnet 5.5 / GPT-6.1 Sol / Arg…$27.40 GPT-6 Sol$32.80 Opus 5.5 / Argon from 1 Dec$54.80 $30: Anthropic's 90th percentile day Illustrative token profile. Prices from vendor pages opened 23 October 2026.
The middle bar holds three vendors. Choosing between them on list price is not possible, and choosing a model tier moves the bill far more than choosing a vendor.

What the subscription is worth against this day

At $27.40 a heavy day, a $100 plan breaks even after about 3.7 heavy days and a $200 plan after about 7.3. A developer working 21 such days a month would spend $575 on the API at Sonnet or GPT-6.1 Sol rates. Against that, a $200 subscription is a discount of roughly two thirds.

The catch is that the discount only holds while the limits do. We would buy the subscription for any engineer who codes with an agent most days, and keep an API key as the overflow valve rather than the default.

Codex credits are priced at API parity

OpenAI prices Codex overage in credits. For GPT-6.1 Sol, the rate is 50 credits per million input tokens, 2.5 cached and 250 output. That is exactly 25 times the dollar API price on every line, which implies parity if a credit costs 4 cents. OpenAI does not publish the credit price on that page, so treat the parity as our inference. Our heavy day comes to 685 credits.

Cache hit rate moves the bill more than the vendor

The single assumption doing the most work in the model is the 90% cache hit rate. Change it and the cost per day moves faster than it does when you switch vendor.

Same model, same work, three cache hit rates $2 input, $0.10 cached, $10 output per million tokens. 60M input, 1M output. Fresh input Cached input Output 95% cached $21.70 90% cached $27.40 70% cached $50.20 Dropping from 90% to 70% cache hits costs more than moving from Sonnet 5.5 to GPT-6 Sol. Illustrative. Bar widths scale at 9 pixels per dollar.
The red segment is the one you control. Output cost is fixed by the work, and cached reads are cheap, so lost cache hits are where heavy days get expensive.

Caches expire after an idle window, five minutes on Anthropic's default tier, and they are keyed on an exact prefix. Long pauses between turns, switching models mid-session and editing the system instructions all force fresh input. On our numbers, falling from 90% to 70% hits nearly doubles the day, from $27.40 to $50.20.

This is the strongest practical argument for the subscription. On a plan, a broken cache costs you allowance. On an API key, it costs you money, and nobody sees it until the invoice. For the wider mechanics, see how credits and tokens confuse AI billing.

Sandboxing and permission defaults in each terminal coding agent

A terminal agent can run any command your shell can. The permission model decides what it does without asking, and the sandbox decides what it can reach when it does not ask. The defaults differ more than the prices do.

Sandbox and permission defaults, from each vendor's documentation, October 2026
AgentSandbox defaultMechanismPermission modes
Codex CLIOn. Workspace-write for version-controlled folders, network offSeatbelt on macOS, bubblewrap and seccomp on Linux, native sandbox on Windowsread-only, workspace-write, danger-full-access; approvals on-request, never or granular
Claude CodeOff. Network allowlist starts empty once enabledSeatbelt on macOS, bubblewrap on Linux and WSL2, none on native Windowsdefault, acceptEdits, plan, auto, dontAsk, bypassPermissions
Antigravity CLIOpt-in terminal sandbox, network off inside itNamespaces on Linux, sandbox-exec on macOS, AppContainer on WindowsAllow, ask and deny rules, deny wins; commands default to ask
Gemini CLIOpt-in with the sandbox flagSeatbelt, Docker or Podman, gVisor, LXC, Windows nativedefault, auto_edit, plan, and yolo from the command line only

OpenAI's approvals page states that "by default, the agent runs with network access turned off". Writes stay inside the workspace unless you approve otherwise. That is the right default for a tool that executes shell commands generated by a model.

The other three ask you to switch the sandbox on. Anthropic's documentation says plainly that Claude Code's sandbox "is off by default", and that on native Windows commands run unsandboxed. Claude Code's permission prompts still apply, but a prompt is a human control, and humans approve prompts in bulk by the afternoon.

Even when you turn on Gemini CLI's macOS sandbox, the default profile is named permissive-open. Stricter profiles exist and must be chosen. We would set a strict profile in any shared configuration rather than trust each developer to pick one.

Every tool here has a mode that skips all prompts. Anthropic warns that bypassPermissions belongs only in containers or VMs without internet access. The risk is not the model going rogue. It is a prompt injection hidden in a README or a dependency, covered in our piece on prompt injection and agent security.

Six changes to what a terminal agent costs, May to December Vendor announcements and documentation, 2026 13 MayClaude weeklylimits +50% 19 MayAntigravity CLIlaunched 18 JuneGemini CLI ends forconsumer accounts 14 SepClaude weekly limitssettle 25% above May 14 OctGPT-5.5 leaves Codexon ChatGPT sign-in 1 DecArgon pricedoubles Red markers raise cost or remove access. Blue markers change allowance or models.
Any comparison of these tools older than a quarter is wrong on at least one row. Date-stamp whatever you build from this table.

Where this comparison is weakest

This post compares published terms. It does not compare the agents doing real work, and that gap matters more than any figure above.

The token profile is ours, not measured

The 60 million token day is an assumption calibrated to one vendor's published average. A Codex user on GPT-6.1 Sol might spend far fewer or far more tokens on the same task than a Claude Code user on Sonnet 5.5. We have no first-party telemetry to settle it, and no vendor publishes comparable data. Token efficiency is the variable most likely to reverse our ranking, and it is the one we cannot measure.

The subscription limits are not published as numbers

Our break-even maths assumes a $200 plan absorbs a heavy month. Anthropic and Google give no message counts, and OpenAI gives only ranges. A plan that throttles you on day 12 is not a two-thirds discount, it is a partial one plus a wait. The honest reading is that the subscription is cheaper per token used, and nobody can tell you in advance how many tokens that is.

Quality differences can swamp price

If one agent finishes a task in a third of the turns, it wins on cost regardless of the rate card. Benchmarks do not settle this either, as our review of what the adoption data shows for coding tools argues. Run your own trial on your own repository before you sign an annual contract.

Frequently asked questions

Claude Code vs Codex CLI: which is cheaper?

At list API prices they cost the same. Claude Sonnet 5.5 and GPT-6.1 Sol both list at $2 per million input tokens, $0.10 cached and $10 output, so a heavy day costs about $27.40 on either in our model. The real difference comes from how many tokens each spends per task and from plan limits, since both ship with $20 and higher subscriptions.

Is Gemini CLI still free in 2026?

Not for most individuals. Google stopped serving Gemini CLI for free users and Google AI Pro and Ultra subscribers on 18 June 2026 and moved them to Antigravity CLI, which has a free tier with weekly limits. Gemini CLI still works with a paid Gemini API key, through Vertex AI, and on Gemini Code Assist Standard or Enterprise licences.

How much does an AI coding CLI cost per day for a heavy user?

Anthropic reports an average of about $13 per developer per active day for Claude Code on API billing, with 90% of users under $30. Our worked heavy day, 60 million input tokens at 90% cache hits and 1 million output, costs $27.40 at flagship rates, $12.30 on Gemini 3.8 Flash and $54.80 on Opus 5.5.

What are the Codex CLI usage limits on ChatGPT Plus?

OpenAI estimates 15 to 160 local messages per 5-hour window on GPT-6.1 Sol for Plus, 5 to 45 on GPT-6 Astra and 350 to 3,000 on GPT-6 Luna. Weekly limits may also apply. ChatGPT Pro plans at $100, $200 or $500 a month currently have no five-hour limit, and extra usage is bought with credits.

Is a Claude Max subscription cheaper than the API for Claude Code?

For a heavy user, usually yes. At $27.40 per heavy day on Sonnet 5.5 rates, Max 20x at $200 breaks even after about 7 heavy days, and Max 5x at $100 after about 4. The saving depends on staying inside the 5-hour and weekly limits, and Max now includes monthly API credit equal to its price for overflow.

Which terminal coding agent has the safest default sandbox?

Codex CLI. It runs in workspace-write mode for version-controlled folders with network access turned off by default, using Seatbelt on macOS and bubblewrap on Linux. Claude Code documents its sandbox as off by default. Gemini CLI and Antigravity CLI both make the sandbox opt-in, though Antigravity asks before running commands unless you change its rules.

Where to start this week

Pull one week of real usage before you pick a plan. On Claude Code, the usage view shows tokens per session. On an API key, every vendor's console shows input, cached input and output separately. Put those three numbers into the worked-day table above and you have your own cost per day instead of ours.

Then fix the sandbox default in your team's shared configuration, whichever tool you choose. Switch it on for Claude Code and Gemini CLI, pick a strict profile, and keep any skip-all-prompts mode inside a disposable container. That change costs nothing and closes the gap that matters most.

Related on coding agents

For the build decision behind the tool choice, read build versus buy for coding agents.

References

  1. Anthropic, Claude pricing, opened 23 October 2026. Used for Pro, Max and Team prices and included API credit.
  2. Anthropic, Claude API pricing, opened 23 October 2026. Used for Sonnet 5.5 and Opus 5.5 token prices.
  3. Anthropic, Claude Code May to September 2026 weekly limits promotion, updated 14 September 2026. Used for the promotion dates and the permanent 25% increase.
  4. Anthropic, Claude Code: manage costs and sandboxing, undated, opened 23 October 2026. Used for the per-day cost average and sandbox defaults.
  5. OpenAI, Codex pricing and API pricing, opened 23 October 2026. Used for plan list, message ranges, credit rates and GPT-6.1 Sol prices.
  6. Google Developers Blog, Transitioning Gemini CLI to Antigravity CLI, 19 May 2026. Used for the June cutoff and what remains supported.
  7. Google, Gemini API pricing, opened 23 October 2026. Used for Gemini 4 Argon and 3.8 Flash prices and scheduled increases.
  8. Google, Antigravity plans and Gemini CLI quotas and pricing, the latter last updated 18 June 2026. Used for quota language and daily request counts.

The weakest part of the source base: no vendor publishes subscription limits as fixed numbers, and the heavy-user token profile is our assumption calibrated to Anthropic's own average, not measured across all three tools. Prices are as listed on 23 October 2026.

AV
Aryan Vatsa
Founding Member, Zan Digital. Writes about AI product economics, B2B software markets and what the numbers behind vendor claims actually say.

Related reading