Claude Code vs Codex CLI vs Gemini CLI: Which Terminal AI Coding Agent Fits Your Workflow?

Claude Code vs Codex CLI vs Gemini CLI: Which Terminal AI Coding Agent Fits Your Workflow?
Three terminal-based AI coding agents now anchor how developers write software with AI: Anthropic's Claude Code, OpenAI's Codex CLI, and Google's Gemini CLI. All three promise the same core capability — an agent that reads your codebase, writes patches, runs tests, and reports back — but they diverge sharply on model access, pricing, and openness.
September 2026 brought all three meaningful updates within days of each other: new default models, new pricing tiers, and new interfaces. Here is how they compare on price, capability, and who each one is really for.
What changed this month
Claude Code moved fast. Version 2.1.278 landed September 19, and version 2.1.280 followed on September 22, making Claude Opus 5.5 the default Opus across every subscription plan — Pro and Team Standard moved from Sonnet to Opus by default too. Anthropic describes Opus 5.5 as performing at Fable 5.1 level on most work while costing about 40% less to run than its predecessor. Cache reads fall to $0.20 per million tokens — a 60% cut that matters for agents re-reading large contexts.
Codex CLI reached version 0.155.1 in the week of September 22, with 0.156.0 adding an optional fullscreen terminal UI (/tui), a /usage analytics dashboard that tracks token totals plus plugin and skill activity, voice input on by default (toggle with F8), and worktree sessions on by default. More consequential is the model lineup change: Codex added GPT-6 Sol as the named replacement for GPT-5.5 on paid plans, joining flagship GPT-6 Astra and ultra-cheap GPT-6 Luna. GPT-5.5 leaves Codex entirely on October 14.
Gemini CLI shipped v0.60.0 on September 15 — a security-hardening release with stricter web-fetch destination checks, RFC 9207 issuer checks in MCP OAuth, an isolated temp directory for the macOS Seatbelt sandbox, and consent prompts when extensions change environment variables.
The three contenders at a glance
| Claude Code | Codex CLI | Gemini CLI | |
|---|---|---|---|
| Vendor | Anthropic | OpenAI | |
| Models | Claude family (Opus 5.5 default on subs, Fable 5.1, Sonnet 5, Haiku 4.5) | GPT-6 Astra, Sol, Luna | Managed Gemini 3 mix (Flash + Pro), or pin your own via API key |
| License | Proprietary (repo holds issues and changelog only) | Apache-2.0 open source | Apache-2.0 open source |
| Free tier | None standalone — ships with Claude subscriptions (Pro from $17/mo annual) | Tied to ChatGPT plans (Plus $20/mo entry) | 60 req/min and 1,000 req/day on a personal Google account — the most generous free tier of the three |
| Install | npm install -g @anthropic-ai/claude-code | npm install -g @openai/codex | npm install -g @google/gemini-cli |
| GitHub stars (Sep 22) | 147,649 | 125,962 | 107,130 |
Price: three very different bills
This is where the three philosophies separate most clearly.
Claude Code's economics are subscription-first. Claude Pro (from $17/month on annual billing) now includes Claude Code with Opus 5.5 as the default model, and Anthropic raised five-hour usage limits while adding a bankable rate-limit reset subscribers can trigger when they choose. For heavy API users, Opus 5.5 lists at $4 per million input and $20 per million output tokens — and one developer team reported on Hacker News that cost per task fell from $0.35 to $0.16 moving from Opus 5 to Opus 5.5 at low effort.
Codex CLI bills through your OpenAI plan, and its three-model menu is effectively a price ladder: GPT-6 Astra at $10/$50 per million tokens for the hardest work, GPT-6 Sol at $2/$10 as the balanced option, and GPT-6 Luna at $0.10/$0.50 for high-volume, focused tasks. Watch the fine print: prompts over 272K input tokens to Sol are billed at double the input rate and 1.5x output for the whole request — a real cost for long agent sessions. On ChatGPT Plus, Astra allows roughly 5–45 messages per five hours versus 15–150 for Sol, so your heaviest model is also your most rationed one.
Gemini CLI wins the price argument outright. Its free tier — 60 requests per minute, 1,000 per day, 1M-token context — costs nothing on a personal Google account, and it has the lowest published API pricing of the three. For students, hobbyists, and teams that simply need an agent running today with no procurement, it is the path of least resistance.
Capability and benchmarks: read the fine print
Terminal-Bench 4.0 — 66 hard terminal tasks run over 330 trials with cost published per run — is the benchmark that separates these agents right now. Per independent tracking on Artificial Analysis, Codex paired with GPT-6 Astra holds the top entry at 58.2%, and its cheapest top-tier run lands at about $7.12 per task at extra-high effort. Claude Code with Fable 5.1 reaches 57.9% at max effort, though at notably higher cost per task ($14.76–$18.92 in tracked runs).
Anthropic's own launch table reports Opus 5.5 scoring 66.4% on Terminal-Bench 4.0 against 57.9% for GPT-6 Astra and 55.8% for Fable 5.1 — but those are company-reported numbers, and Artificial Analysis's independent run puts Opus 5.5 and Astra roughly level at 59.6%. The broader Artificial Analysis Coding Agent Index, which also weighs DeepSWE and SWE-Atlas-QnA, scores Claude Code + Fable 5.1 at 62.2 against Codex + Astra at 61.6 — effectively a tie at the top. Treat all of this as a snapshot: these tools ship weekly, and the leader board moves with every release.
Two capability gaps are more durable than any benchmark. First, reasoning ceiling: Codex CLI is reported to hold top marks on FrontierMath Tier 4 and ARC-AGI-3 — treat these as reported results, not independently verified — and in practice it is the tool teams reach for when the bottleneck is reasoning depth rather than the volume of routine work. Second, multimodality: Gemini CLI is the only one of the three with native multimodal input, able to process images, diagrams, and screenshots alongside code. Claude Code and Codex CLI remain limited there. Gemini CLI itself has no Terminal-Bench 4.0 entry, so its agent-level coding performance is less documented — though the Gemini 3.8 Flash model scores 87.6% on Terminal-Bench 2.1 at the model level.
Openness and ecosystem
If vendor lock-in worries you, the divide is clean. Both Codex CLI and Gemini CLI are Apache-2.0 open source — you can read the code, and Codex has now passed Gemini CLI to become the second most-starred open-source agent at 125,962 stars (Gemini CLI sits at 107,130). Claude Code's repository is proprietary; its GitHub presence is issues and a changelog, and its 147,649 stars reflect adoption, not openness.
All three support the Model Context Protocol for extending the agent with tools, and all three ship updates roughly weekly, so capability gaps close fast. One practical detail for Claude Code users: since v2.1.280, a CLAUDE_CODE_MAX_MCP_DESCRIPTION_LENGTH flag raises the 2,048-character cap the tool applies to MCP tool descriptions — without it, servers with long tool docs get silently truncated. And since v2.1.277, Claude Code reads AGENTS.md in projects that lack a CLAUDE.md.
Who should pick which
Choose Claude Code if you are on a full-time engineering team doing daily feature work, refactoring, and review assistance. It leads in adoption surveys and public case studies, its repository-aware context handling needs the least hand-holding on large codebases, and the human-in-the-loop workflow fits iterative development. The September move to Opus 5.5 by default on all plans, plus cheaper cache reads, makes it cheaper to run than the month before.
Choose Codex CLI if your bottleneck is the hardest problems, not the volume of routine ones — complex algorithms, architecture decisions, novel domains where reasoning ceiling decides success. Keep it alongside your daily driver rather than replacing it, and route the routine work to GPT-6 Sol to protect your Plus message limits.
Choose Gemini CLI if budget is the deciding factor, your workflow needs visual input (UI mockups, architecture diagrams, screenshots of bugs), or your organization prefers open-source tooling you can audit. The 1,000-requests-a-day free tier makes it the easiest of the three to try this afternoon.
A fourth name worth knowing: OpenCode (209,405 stars, MIT) is the most-starred open-source agent overall and works with 75+ model providers — a good BYOK alternative if you want a Claude Code-style CLI without committing to one vendor's models.
Getting started
Claude Code:
- Install:
curl -fsSLhttps://claude.ai/install.sh| bash(macOS, Linux, WSL),brew install --cask claude-code, ornpm install -g @anthropic-ai/claude-code. - Sign in with your Claude subscription (Pro and up).
- Run
claudein your project directory; add MCP servers withclaude mcp add.
Codex CLI:
- Install:
npm install -g @openai/codexorbrew install --cask codex. - Run
codexand sign in with ChatGPT (bundled models) or set an API key for per-token billing. - Switch models in-session with
/model, e.g.codex --model gpt-6-solto start on the cheaper tier; open the usage dashboard with/usage.
Gemini CLI:
- Install:
npx @google/gemini-cli,npm install -g @google/gemini-cli, orbrew install gemini-cli. - Run
geminiand log in with a personal Google account to get the free tier immediately. - MCP servers go in
~/.gemini/settings.json; use an API key if you want to pin a specific Gemini model.
The bottom line
For most development teams, Claude Code is still the default starting point — the highest adoption, the strongest repository integration, and now a cheaper default model on every plan. Keep Codex CLI in reach for the hardest reasoning problems, where its benchmark ceiling and the GPT-6 model ladder earn their keep. And evaluate Gemini CLI seriously if budget or multimodal input decides the matter: it is free, open source, and the easiest to start with today.
All three ship weekly, so revisit the decision quarterly. The right question is which one matches your bottleneck: volume of routine work, depth of the hardest problems, or the cost of getting started.
Sources
- Stackademic, "Claude Code vs Codex CLI vs Gemini CLI: Which AI Coding Agent Fits Your Workflow?," September 2026. https://stackademic.com/blog/2026-09-23-claude-code-vs-codex-cli-vs-gemini-cli-which-ai-coding-agent-fits-your-workflow
- Morph, "Best AI Coding Agents (September 2026): Scored Leaderboard and Coding Agent Benchmark," updated September 22, 2026. https://www.morphllm.com/best-ai-coding-agents-2026