Claude Code vs Codex vs Antigravity: Picking a Coding Agent

Three coding agents, three bets on openness, model lock-in and pricing. What separates them in August 2026 — and why benchmarks don't decide it.

by HowAIWorks Team
On this page

Introduction

A year ago, choosing a terminal coding agent meant choosing a feature set. That is no longer true. Claude Code, OpenAI Codex and Google Antigravity have converged on the same shape: a terminal client that reads a repository, plans a change, edits across files, runs commands to verify its own work, speaks MCP, and takes standing instructions from a Markdown file in the project root.

The interesting differences are no longer about what they can do. They are about what you are agreeing to when you pick one — which models you are locked into, how the bill is computed, whether you can read the client's source, and how much confidence the vendor's track record earns.

One event in the last two months reshuffled this more than any model release: on 18 June 2026, Google retired Gemini CLI for personal accounts. If you are comparing these three, that is the single most instructive data point available, and it is not a benchmark.

Three Different Bets

Each vendor has made a distinct wager about what developers will value.

OpenAI bet on openness and control. Codex CLI is Apache-2.0 with 103,000 GitHub stars, written in Rust, and you can read exactly what it does to your files. Its sandbox is enforced by the operating system — Seatbelt on macOS, bwrap plus seccomp on Linux — rather than by the model's cooperation. Three sandbox modes and four approval policies give unusually fine-grained control, including an auto_review policy that routes approval requests through a reviewer agent instead of interrupting you.

Anthropic bet on the model and the workflow. Claude Code is proprietary, runs Claude Opus 5 and its siblings only, and competes on how well the agent behaves over long horizons rather than on configurability. Its pricing is the simplest of the three: it comes with a Claude subscription, and the subscription is the same one that buys you everything else Anthropic ships.

Google bet on breadth, and paid for it with churn. Antigravity spans a desktop IDE and the agy terminal client on one agent core, adds parallel subagents and JSON lifecycle hooks, and — uniquely among first-party tools — runs competitors' models. Claude Sonnet 4.6, Claude Opus 4.6 and GPT-OSS-120b are selectable alongside Gemini 3.6 Flash and Gemini 3.1 Pro. The cost of that breadth was consolidating two existing products into it and retiring them.

What They Actually Cost

The three vendors do not just charge different amounts — they charge along different axes, which makes direct comparison harder than it looks.

Claude CodeCodexAntigravity
Entry price$17/mo annually (Pro)$0 free, $8 Go, $20 Plus$0 free tier
Higher tiersMax from $100/mo (5× or 20×)Pro $100 (5×) / $200 (20×)AI Pro ~$20, Ultra ~$100, Ultra Max ~$200
MeteringSubscription usage limitsMessages per rolling 5-hour windowQuota per plan, refreshed 5-hourly or weekly
Pay-per-token optionAPI at $5/$25 (Opus 5)API at $5/$30 (GPT-5.6 Sol)No
OverflowUpgrade tierBuy creditsCredits at $0.01 each
Limits published?YesYes, as rangesNo

That last row deserves attention. Google's own plans documentation describes quota shape rather than quantity, and states that baseline limits exist "to the degree we have capacity". Google has also not published what one credit buys. You learn your throughput by hitting the wall.

Codex publishes ranges instead of numbers — roughly 10–100 messages per window on Sol for a Plus subscriber, 250–2,000 on Luna — and the width of those ranges is honest rather than evasive: an agentic run that spawns fifty tool calls genuinely costs more than a one-line question, and no vendor can price it in advance.

Claude Code is the only one of the three where the answer to "what does this cost per month" is a single number you can put in a budget.

Model Lock-In Is the Real Choice

Strip away the tooling and each agent is a delivery mechanism for a model family. Two of the three are exclusive.

Codex runs GPT-5.6 — Sol, Terra and Luna, all sharing a 1,050,000-token context and a February 2026 cutoff, switchable mid-session with /model. Claude Code runs Claude. Neither will run anything else.

Antigravity is the exception, and it is a genuine one. Running Claude Opus 4.6 inside Google's client is not a rounding error in the product; it is a stated feature, available on Free, AI Plus and AI Pro plans. If you want to compare how two frontier families handle the same repository without changing tools, Antigravity is currently the only first-party way to do it.

Whether that matters depends on how you work. If you have already concluded that one model is better for your codebase, multi-model support is a feature you will never use. If you have not — and most teams have not tested this rigorously — it is the most valuable differentiator on this page.

Sandboxing and Trust

An agent with a shell is a security boundary, and the three treat it differently.

Codex is the most explicit. workspace-write is the default: edit inside the workspace, run commands, no network. read-only answers questions without touching disk. danger-full-access removes everything, and the name is the documentation. Approval policies layer on top: on-request, untrusted, never, auto_review.

This matters more than it reads. An agent that has been talked into a destructive command by a prompt injection buried in a dependency's README is stopped by kernel-level confinement, and by nothing else. Network-off-by-default is the single most useful line of that defence, and it is also the one that breaks your dependency installs. That friction is the price.

Antigravity's equivalent control surface is hooks — JSON config firing before a tool call, after a model call, at loop-stop. Hooks are a better fit for organisational policy than for personal safety: a platform team can enforce a lint step for everyone without asking anyone to remember. They are not a sandbox.

Retired Gemini CLI, for its part, had four approval modes including yolo, which auto-approved everything and could only be enabled from the command line — never from a menu. That design choice was correct and worth preserving in whatever you adopt.

The Configuration Layer Has Converged

The quiet standardisation of the last year is AGENTS.md. Codex reads it. Antigravity reads it and GEMINI.md. Claude Code uses CLAUDE.md, which is the same idea under a different filename.

The practical consequence: your standing project instructions are close to portable, and switching agents costs less than it did. This is the strongest argument against agonising over the decision. Skills, hooks and plugins are not portable — those are per-vendor — but the instructions that took you longest to write mostly are.

Why the Benchmarks Don't Settle It

You will find leaderboards ranking these three, and they disagree with each other sharply. That is not noise to average out; it is the finding.

Google reports Gemini 3.6 Flash at 58.7% on SWE-Bench Pro and 78.0% on Terminal-Bench 2.1 — both vendor-run. OpenAI publicly disputes SWE-Bench Pro's task quality, estimating roughly 30% of its tasks are broken, which is convenient given its models trail there. Anthropic did not publish absolute per-benchmark figures for Opus 5 at all, stating every capability claim relative to another model or to cost.

Beyond the vendor incentives, agentic scores are properties of a configuration, not a tool: the harness, the reasoning effort, the scoring script and the retry policy each move the number by more than the gap between competitors. A row that says "Codex 83.4%" is a claim about one harness at one effort level on one day.

Use them to rule out the clearly unfit. Do not use them to choose between the top three.

Which One to Pick

  • You want a predictable monthly bill → Claude Code. It is the only one where the subscription answers the cost question completely.
  • You want to read the client's source, or you need a hard sandbox → Codex. Apache-2.0, OS-enforced confinement, four approval policies, a published rate card.
  • You want to run Claude and Gemini side by side, or you are already on a Google AI plan → Antigravity. Accept that the quota is unpublished.
  • You were on Gemini CLI as an individual → Antigravity is the migration path that preserves your GEMINI.md, extensions and hooks. Move workspace skills from .gemini/skills/ to .agents/skills/ by hand; nothing warns you.
  • You want to avoid this decision entirelyAider is open source and model-agnostic, and the Gemini CLI retirement is the best argument anyone has made for that position this year.
  • You want an editor rather than a terminal → see Claude Code vs Cursor vs Windsurf, or Cursor directly.

Conclusion

The capability gap between these three is smaller than the marketing suggests, and smaller than the gap between any of them and what existed a year ago. What genuinely differs is the commitment each one asks for.

Codex asks you to accept OpenAI models and gives you the source and a real sandbox in exchange. Claude Code asks you to accept Anthropic models and gives you the simplest pricing in the category. Antigravity asks for the least lock-in on models and the most tolerance for change — Google consolidated two products into it inside a year, cut its free tier repeatedly, and does not publish its limits.

That last point is the one most comparisons omit, and it is the one the June retirement made concrete. Capability you can re-evaluate next quarter. A vendor withdrawing a product from individual developers is a different kind of information, and it should count for something.

Because the configuration layer has largely converged on AGENTS.md, the cost of being wrong is lower than it feels. Pick the bet that matches how you actually work, and keep your instructions portable.

Sources

Frequently Asked Questions

There is no single answer, because the three leading agents have converged on nearly identical capabilities. The decision is made by which model family you want, how you prefer to pay, and how much vendor stability matters — not by benchmark scores.
Google retired it for personal accounts on 18 June 2026 and replaced it with Antigravity CLI (agy). Organisations with Gemini Code Assist Standard or Enterprise licences keep access; individual developers were migrated.
Codex CLI is Apache-2.0. Claude Code and Antigravity are proprietary. Gemini CLI was Apache-2.0 and remains so on GitHub, but Google no longer serves personal accounts through it.
Antigravity is the only first-party client that runs a competitor's models — Claude Opus 4.6, Claude Sonnet 4.6 and GPT-OSS-120b alongside Gemini. Claude Code and Codex each run their own vendor's models only.
Claude Code bundles into a Claude subscription from $17/month annually. Codex meters messages against rolling five-hour windows across Free through Pro, or bills per token via API key. Antigravity draws quota from your Google AI plan, with exact limits unpublished and overflow sold as $0.01 credits.

Continue Your AI Journey

Explore our glossary and model catalog to deepen your understanding.