Claude Code vs Codex vs Gemini CLI Compared (Nov 2026)
Three terminal agents now do most AI-assisted coding outside an IDE: Anthropic's Claude Code, OpenAI's Codex CLI, and Google's Gemini CLI. On the surface they look identical. You type a task, the agent reads your files, edits code, and runs commands. Underneath, the model, the price, and how much of the tool you can inspect all differ. And one of them stopped being a consumer product this year.
Google cut free and Google AI Pro and Ultra users off from Gemini CLI on June 18, 2026, and now points them at Antigravity CLI. Here is how the three compare in November 2026.
Claude Code, Codex CLI, and Gemini CLI side by side. Source: implicator.ai
The three contenders
| Tool | Maker | Current version | Default model | Context window | CLI license |
|---|---|---|---|---|---|
| Claude Code | Anthropic | v2.1.322 | Opus 5.5 | 1M tokens | Proprietary |
| Codex CLI | OpenAI | v0.167 | GPT-6.1 Sol | 500K tokens (default) | Apache 2.0 |
| Gemini CLI | v0.68.0 | Gemini models via Code Assist or API key | Depends on model | Apache 2.0 |
All three install through npm and read a project instruction file (CLAUDE.md, AGENTS.md, or GEMINI.md), so the same house rules carry over. If you want a fully open-source agent that runs local models instead, our earlier head-to-head of OpenCode, Cline, Aider, and OpenHands covers that side of the market.
Benchmarks: read the fine print first
SWE-bench Verified gives a model 500 real GitHub issues and checks whether its fix passes the project's tests. Terminal-Bench 2.0 tests shell scripting, file operations, and DevOps-style work instead, and SWE-bench Pro is the harder successor OpenAI now recommends. The scores below come from the May 2026 generation, GPT-5.5, Claude Opus 4.7, and Gemini 3.1 Pro, the last generation with public numbers for all three on the same benchmarks; the current defaults, Opus 5.5 and GPT-6.1 Sol, have no directly comparable public scores yet.
| Benchmark | Codex CLI (GPT-5.5) | Claude Code (Opus 4.7) | Gemini CLI (Gemini 3.1 Pro) |
|---|---|---|---|
| SWE-bench Verified | ~88.7% (third-party trackers; OpenAI does not self-report) | 87.6% (Anthropic) | 80.6% (Google) |
| Terminal-Bench 2.0 | 82.7% (OpenAI) | 69.4% (Anthropic / AWS) | 68.5% |
| SWE-bench Pro (Public) | 58.6% (OpenAI) | 64.3% (Anthropic) | 54.2% |
Two warnings before you rank anything on those numbers. The harness moves the result: Anthropic's Opus 4.6 system card showed the same GPT-5.2-Codex scoring 57.5% on the independent Terminus-2 harness and 64.7% on OpenAI's own Codex CLI harness, a 7-point gap from the harness alone. And OpenAI stopped reporting SWE-bench Verified on February 23, 2026, after its auditors found 59.4% of the 138 hardest tasks had flawed or unsolvable tests, and that every major frontier model could reproduce the gold-patch fix from the task ID alone. Treat the table as a rough ordering, not a precise ranking.
The change that rewrote the answer
In March 2026 the buying guide was simple: try Gemini CLI free, pay for Claude Code if you coded all day, use Codex if you already paid for ChatGPT. Google announced the change on May 19, 2026 and made it on June 18: Gemini CLI and the Code Assist IDE extensions stopped serving free individual accounts and Google AI Pro and Ultra subscribers. What is left is Code Assist Standard or Enterprise seats, paid Gemini API keys, and Vertex AI, and Google stopped selling new Standard and Enterprise subscriptions on October 9, 2026. Additional licenses and annual renewals end on January 31, 2027, and monthly renewals end on December 31, 2027. A team that does not already license Code Assist cannot buy its way in through that route at all.
Google's free terminal agent is now Antigravity CLI (agy), available to everyone since May 19, 2026 and built in Go on the same agent harness as Antigravity 2.0. Gemini CLI itself is still open source under Apache 2.0, with about 109,000 GitHub stars, and version 0.68.0 landed on November 10, 2026. Its README is blunt: the tool is not tuned for the Gemini 4 series and should not be used to benchmark Gemini models. Gemini 4 users are pointed at Antigravity CLI.
Pricing and access
Claude Code has no standalone price. It rides on a Claude plan: Pro at $20 a month, Max at $100, and Ultra at $200. Max 20x was renamed Ultra at the end of October 2026. Through the API, Opus 5.5 lists at $4/$20 per million input/output tokens, the most expensive per token of the three. There is no free route: the free Claude plan does not include Claude Code. Claude Code reports 95% first-pass accuracy, and its Agent Teams feature, launched with Opus 4.6 in February 2026, lets teammates talk to each other directly through a shared task list instead of reporting back to one orchestrator. It is still experimental and off by default, enabled with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1, and runs at roughly 7x the tokens of a standard session.
Codex CLI comes with ChatGPT Plus at $20 a month, while Pro now starts at $100 a month. Through the API, GPT-6.1 Sol lists at $2/$10 per million tokens, half the price of Opus 5.5. The CLI is open source (Apache 2.0, Rust, about 135,000 GitHub stars) and its sandboxing is on by default: Seatbelt on macOS, bubblewrap on Linux and WSL2, a native sandbox on Windows, with workspace-write as the default mode. That is what makes long unattended runs a reasonable risk: a prompt injection trying to exfiltrate code hits the operating system, not a permission dialog. Codex is also the most token-efficient of the three in public comparisons. In an early-2026 Figma-to-code benchmark it used about 1.5 million tokens against Claude Code's 6.2 million for comparable output.
Gemini CLI is the awkward one to recommend in November 2026. For teams that already hold a Code Assist license it remains a capable, actively maintained agent, with Plan Mode, a read-only phase where it reads the codebase and proposes a strategy before writing anything, and the widest sandboxing choice of the three (Seatbelt, containers, gVisor, Windows sandbox), all of it opt-in. For everyone else the door is closed: no consumer plan, no new subscriptions, and a renewal deadline on the horizon.
How to try all three
Each tool installs with one npm command and needs Node.js. Run the same small task in each and read the diff before committing anything.
npm install -g @anthropic-ai/claude-code # then run: claude
npm install -g @openai/codex # then run: codex
npm install -g @google/gemini-cli # then run: gemini
Claude Code and Codex sign in through the browser with your plan. Gemini CLI needs a paid API key in GEMINI_API_KEY, a company Code Assist license, or Vertex AI. For the free route Google now offers, install Antigravity CLI (agy) instead. To run an agent on a model on your own machine, our guide to running OpenCode with Ollama shows the local path, and our LangGraph vs CrewAI vs AutoGen comparison covers the framework side.
Verdict
| Category | Winner | Why |
|---|---|---|
| Raw coding benchmark (May 2026 generation) | Codex / Claude Code | SWE-bench Verified: ~88.7% vs 87.6% |
| Terminal and DevOps work | Codex CLI | 82.7% on Terminal-Bench 2.0 |
| Harder benchmark (SWE-bench Pro) | Claude Code | Opus 4.7 at 64.3% vs 58.6% |
| Value for money | Codex CLI | Half the API price, lowest token use |
| Openness | Codex / Gemini CLI | Both Apache 2.0; Claude Code is proprietary |
| Multi-agent coordination | Claude Code | Agent Teams |
| Free starting point | Antigravity CLI | Free tier ended June 2026 |
| Safety defaults | Codex CLI | OS-level sandbox on by default |
Pick Codex if you already pay for ChatGPT Plus: it costs nothing extra, the CLI is open source, and its sandbox defaults are the clearest safety story here. Pick Claude Code if coding is your day job and you want the strongest model and the only real multi-agent coordination here: start on Pro, move to Max when usage windows bite. Pick Antigravity CLI for a free start, since that is where Google moved its free users, and only consider Gemini CLI itself if your company already licenses Code Assist. Whichever you choose, the scores above are vendor-reported on a benchmark one vendor has already walked away from. The honest test is one afternoon on your own repository.

Comments
Post a Comment