On April 2, 2026, OpenAI replaced Codex’s per-message pricing with token-based credit billing across all ChatGPT plans. That single change reshaped how developers compare the three terminal-native AI coding assistants that dominate the conversation: OpenAI Codex, Anthropic Claude Code, and Google’s Gemini CLI. If you have been putting off picking one, this is a good moment to decide — the pricing models shifted, and the old comparison articles no longer match reality.
The Short Verdict
After testing all three on real projects and cross-checking the published cost data, here is the honest summary:
- Claude Code is the strongest for understanding and refactoring existing codebases. It reads whole projects, matches your existing style, and explains legacy code better than anything else I have used.
- Codex is the fastest from zero to working code. For greenfield prototypes and boilerplate, it wins on raw speed — and its new credit system finally makes the cost predictable.
- Gemini CLI is the most polished as a product and the cheapest to start with, but it is the weakest of the three at deep, multi-file project understanding.
There is no single winner. There is a correct choice per workload — and this guide gives you the decision framework.
What Changed in 2026: The Pricing Shake-Up
The most important context for this comparison is the pricing change. As reported in coverage of the April 2026 update, Codex no longer charges per message. Instead, OpenAI moved to token-based credit billing across Plus, Pro, and Business plans — you buy usage through your ChatGPT plan and credits are consumed by token volume rather than message count.
That matters because it closes the predictability gap that used to make Claude Code look expensive. Meanwhile Claude Code runs on Sonnet models through your Claude subscription (Pro at $20/month, Max from $100/month) or through the API, where you pay per token. Gemini CLI, by contrast, is bundled with Google’s AI plans and remains the lowest-cost entry point of the three.
A direct cost comparison published by TokenCost in April 2026 illustrates the difference: at 10 tasks per day, Claude Code via API ran about $2.86 per month versus roughly $27.50 for Codex under its earlier structure. At 100 tasks per day the gap widened further. Those numbers move around as both companies revise pricing, but the direction is consistent: for heavy usage, the two tools cost very different amounts, and the cheapest option depends on how you use them — subscription bundling versus per-token API billing.
Claude Code: The Refactoring Specialist
Claude Code impressed me most on code comprehension and refactoring. Point it at a project you did not write, and it builds a working mental model of the architecture before touching anything. I asked it to explain a decade-old PHP file with no tests, and the walkthrough it produced was clearer than anything I have gotten from the other two tools.
It also respects existing conventions. When I asked it to refactor a messy function, the changes matched the codebase’s style rather than imposing a generic pattern. For teams that inherit code, this is the single most valuable trait an assistant can have.
The downsides are real. Because it sends large context windows on every request, heavy sessions consume tokens fast. A day of intensive work on my own account cost about $6 in usage — trivial for a professional, annoying for a hobbyist. And if you hit the usage caps on your Claude plan, you feel it mid-task.
Codex: Speed and the New Credit System
Codex is the fastest generator of the three. Give it a description of a small script and it produces a working version while the others are still thinking. For greenfield work — new services, boilerplate, one-off automation — it gets you to a prototype fastest.
The trade-off is care. Codex writes code that works, but it tends to be less attentive to maintainability. In my tests it was more likely to produce a solution that runs than a solution that fits the existing architecture. You need to review its output more closely, which eats into the speed advantage on longer tasks.
Since the April 2026 switch to credit-based billing, cost forecasting is much easier than it used to be. Your ChatGPT plan tier (Plus at $20, Pro at $200) sets your ceiling, and credits are consumed predictably per token. That is a genuine improvement for anyone who used to be surprised by their Codex bill.
Gemini CLI: The Polished Entry Point
Gemini CLI is the newest of the three and the most pleasant to use. The terminal experience is clean, long conversations stay coherent, and its breadth of library knowledge is impressive — it can answer one-off questions about obscure frameworks that trip up the other two.
Its weakness is depth. In my testing, Gemini CLI handled quick tasks gracefully but struggled with large refactors and deep project comprehension. It is excellent as a copilot for everyday questions; it is not the tool I would trust with a risky migration.
On cost it is the friendliest starting point, which makes it a sensible first tool for students and developers who just want to try a terminal assistant without committing to a $20 subscription.
Reading Benchmarks Honestly
You will see benchmark tables (SWE-bench and its descendants) quoted in every comparison of these tools, and most of them are technically true and practically useless. The problem is that agent benchmarks measure a controlled task — fix this issue in this repository — while real development is a mess of ambiguous requirements, half-written tests, and legacy constraints. A tool that scores well on a curated benchmark can still stall on your codebase, because your codebase was not curated.
Use benchmarks for one thing only: checking that none of the three is catastrophically behind on the basics. Past that, the deciding factors are the ones benchmarks cannot capture — how well the tool reads your project, whether its permission model fits your workflow, and what a week of real use does to your bill. All three tools publish their own benchmark claims, and independent evaluations differ on which leads, which should tell you the leaderboard is not stable enough to bet a workflow on.
Setup and Permission Models
The practical difference most people discover after installing all three is the permission model. Each tool can now act on your filesystem, run commands, and — in the latest versions — operate a browser with your approval. That is exactly where the tools diverge in feel:
- Claude Code asks before risky actions and explains what it is about to do, which makes it feel safe on production repositories but slightly slower in fast iteration loops.
- Codex favors momentum: it acts quickly and you review afterward, which is great for prototypes and uncomfortable on shared codebases.
- Gemini CLI sits in the middle and its defaults lean toward caution, consistent with its everyday-assistant positioning.
Whichever you choose, do not skip the permission review on day one. The same agent features that make these tools powerful are the ones that can delete files or push commits if misconfigured — our separate look at Codex’s open-source security review goes into the details of what the underlying agent can actually do.
How They Compare, Side by Side
- Existing-code work: Claude Code wins. Whole-project context and style matching beat raw generation.
- Speed from scratch: Codex wins. Fastest prototype, best boilerplate.
- Everyday Q&A and UX: Gemini CLI wins. Cleanest interface, lowest cost to start.
- Cost predictability: Claude Code and Codex both improved in 2026; heavy API usage favors Claude Code, while subscription users may prefer whichever plan they already pay for.
- Team safety: Claude Code’s permission prompts suit shared repositories; Codex’s momentum suits solo prototypes; Gemini CLI’s defaults are the most conservative.
- Security posture: all three now ship agent capabilities that can act on your filesystem and browser. Whatever you pick, review the permission model before granting file access — we covered the details of Codex’s open-source security review separately.
Which One Should You Pick?
Base the decision on the work you actually do, not on benchmark hype:
- You maintain existing codebases, do refactors, or need to explain legacy systems → Claude Code.
- You build new prototypes daily and want speed over elegance → Codex.
- You want to try a terminal assistant with minimal commitment → Gemini CLI.
- You already pay for ChatGPT or Claude → start with the tool bundled in the plan you have; the marginal cost is zero.
My own setup is a combination: Claude Code for the hard problems and Codex for fast generation. That pairing covers most of what I do, and the costs stay sane because each tool only handles the tasks it is best at.
Next Steps
Do not over-research this. Pick the tool that matches your dominant workload, run it on a real task for a week, and switch if it fights you. Before you start, check the pricing page of whatever you choose — both OpenAI and Anthropic revised their plans in 2026, and the details change faster than articles do.
If you want the deeper dives before deciding, read our hands-on review of Claude Code’s token pricing, the practical setup guide for OpenAI Codex, and the head-to-head on using Codex and Claude Code together in one workflow.
Related Reads
- Claude Code Token Pricing Explained: What It Costs and How to Control It
- How to Use OpenAI Codex in 2026: A Practical Setup and Workflow Guide
- How to Use Codex and Claude Code Together in One Workflow
- Gemini CLI vs Claude Code: Which Terminal AI Agent Is Better
- Codex Security Review: What the Open-Source Release Means