Flash

Comparison·Apps & Agents·2026-10-22 10:37

Claude Code vs Codex CLI vs Gemini CLI: Three Terminal Coding Agents Compared

Claude Code, Codex CLI and Gemini CLI — the terminal coding agents from Anthropic, OpenAI and Google that bring large models straight into the command line. This piece checks each vendor's official product pages, model docs and pricing pages item by item: default models and context windows, API and subscription pricing, open-source status, regional availability, and the coding benchmarks each company officially published. Benchmark methodologies differ, so scores are not directly comparable.

A bright developer workspace with three monitors showing terminal code windows, with a bold white Chinese headline overlaid
AI-generated cover: Claude Code vs Codex CLI vs Gemini CLI

Latest

1 updates · newest first
  1. Comparison published: Claude Code vs Codex CLI vs Gemini CLI on default models, pricing and open-source approaches.

Side by side

✓ marks the side that wins the row
Item Claude Code Codex CLI
Default modelClaude Opus 5.5 (default on paid plans), 1M-token contextNo single default model named officially; Codex models include GPT-5.3-Codex (400K context) and GPT-6.1 Sol (1.05M context)
API price (in/out, USD per 1M tokens)Opus 5.5: $4 / $20, $0.20 cache readsGPT-5.3-Codex: $1.75 / $14.00; GPT-6.1 Sol: $2.00 / $10.00✓
SubscriptionIncluded in all paid plans, no standalone sub; Pro from $20/month; free tier excludedPlus from $20/month with expanded usage, Pro from $100/month; Free tier has limited access
Open sourceNot open source (All rights reserved)Open source, Apache 2.0
AvailabilityListed regions only (~185; excl. mainland China/HK/Macau)Described as global for paid ChatGPT users; no dedicated region list
Official coding benchmarksTerminal-Bench 4.0 66.4%, FrontierCode 54.4%; no SWE-bench Verified publishedSWE-Bench Pro 56.8%, Terminal-Bench 2.0 77.3%, SWE-Lancer 81.4%

Verdict

Verdict: with a paid Claude subscription and a need for a 1M-context flagship default, Claude Code fits; for an Apache 2.0 open-source CLI or an existing ChatGPT Plus subscription, Codex CLI fits; Gemini CLI has no personal free tier left, fitting those already on Google's paid API channels.

01Overview

Claude Code is Anthropic's terminal coding agent: it lives in the command line, reads and writes files, runs commands and handles git workflows. It launched in February 2025 alongside Claude 3.7 Sonnet as a limited research preview (official GitHub repo created 2025-02-22; no GA date published). On Pro, Max, Team and Enterprise plans the current default model is Claude Opus 5.5 (claude-opus-5-5) with a 1M-token context window. It is included in all paid Claude plans (Pro from $20/month) with no standalone subscription; the tool itself is not open source.

Codex is OpenAI's cloud-based software engineering agent: each task runs in its own cloud sandbox and many tasks can run in parallel, from writing features to fixing bugs and opening PRs. Codex CLI is the lightweight open-source version that runs in the local terminal (Apache 2.0, repo created 2025-04-13). OpenAI does not name a single current default model across its surfaces on any official page. On subscriptions, ChatGPT Plus ($20/month) includes expanded Codex usage and Pro starts at $100/month; users can also switch to an API key billed at official model rates. At noon Pacific Time on October 14, 2026, GPT-5.5 was retired from Codex (ChatGPT sign-in).

Gemini CLI is Google's open-source terminal AI agent (Apache 2.0), launched via the official blog on June 25, 2025, for code generation, debugging and task management in the command line. The official docs recommend Auto (Gemini 3) routing by default, switching between gemini-3-pro-preview and gemini-3-flash-preview; but the API model page now marks gemini-3-pro-preview as shut down, and the live Pro preview is gemini-3.1-pro-preview (1,048,576 input / 65,536 output tokens of context). The launch-era personal free tier (60 requests/min, 1,000 requests/day) ended on June 18, 2026, with affected users directed to Antigravity CLI; Gemini CLI is now used via paid API keys, Vertex AI, or Code Assist enterprise licenses.

Just yesterday (October 21, 2026), Anthropic launched another standalone agent app, Claude Duet, opening a research preview. Per Anthropic, Duet sits alongside Claude Code and Claude in Chrome under the same trustworthy-agent framework — not a replacement for Claude Code, but a sibling app powered by Opus 5.5 for professionals and small-business owners, included in Pro and Max plans, with the research preview limited to a US waitlist.

02Specs and pricing

  1. Default model and context window: Claude Code's default model on paid plans is Claude Opus 5.5: 1M-token context, 128K max output (Anthropic's official model docs). OpenAI names no single current default model across Codex surfaces; among officially confirmed Codex models, GPT-5.3-Codex offers 400,000 tokens of context (128K max output) and GPT-6.1 Sol offers 1,050,000 tokens (128K max output). Gemini CLI's docs recommend Auto (Gemini 3) routing by default, but gemini-3-pro-preview is marked shut down on the API model page; the live gemini-3.1-pro-preview has 1,048,576 input / 65,536 output tokens of context.
  2. API pricing (USD per 1M tokens): Claude Opus 5.5: $4 input, $20 output, $0.20 cache reads (Anthropic announcement, Sep 22, 2026). GPT-5.3-Codex: $1.75 input, $0.175 cached input, $14.00 output. GPT-6.1 Sol: $2.00 input, $0.10 cached input, $2.50 cache writes, $10.00 output; prompts over 272K input tokens are billed at 2x for input/cache and 1.5x for output. Gemini 3 Flash Preview: $0.50 input (text/image/video; $1.00 audio), $3.00 output; gemini-3-pro-preview is not listed separately on the current pricing page — the closest Gemini 3.1 Pro Preview is $2.00 input (≤200K tokens) / $4.00 (>200K), $12.00/$18.00 output (Google AI pricing page, read Oct 21, 2026).
  3. Subscriptions and usage: Claude Code is included in all paid Claude plans with no standalone subscription: Pro $20/month (~$17/month billed annually), Max from $100/month, Enterprise $20/seat/month plus API usage; the free tier excludes Claude Code. ChatGPT Plus ($20/month) includes expanded Codex usage, Pro ($100/month and up) currently has no 5-hour cap; Plus and standard Business tiers estimate quotas in local messages per 5 hours (e.g. 15–160 for GPT-6.1 Sol), with credits purchasable for overages or an API-key switch for metered billing. Gemini CLI stopped serving personal free and Pro/Ultra subscribers on June 18, 2026; it now requires a paid API key, Vertex AI metered billing, or an organization-purchased Code Assist Standard/Enterprise license (license prices not published).
  4. Open source: Claude Code itself is not open source: its official repo LICENSE reads in full "© Anthropic PBC. All rights reserved", subject to Anthropic's commercial terms. Codex CLI is open source, Apache 2.0 (official repo openai/codex). Gemini CLI is open source, Apache 2.0 (official repo google-gemini/gemini-cli; the README states "fully open source (Apache 2.0)").
  5. Regional availability: Anthropic's Supported Regions Policy expressly covers Claude Code: available only in listed countries and regions (~185 entries); mainland China, Hong Kong and Macau are not listed. OpenAI's official blog says Codex rolled out globally to paid ChatGPT users, with no dedicated region list published. Gemini CLI has no separate region list; it follows the Gemini API / Google AI Studio regions policy (180+ countries and territories, mainland China not listed; docs last updated Apr 28, 2026).

03Benchmarks

  1. Claude Opus 5.5 (Anthropic official announcement, Sep 22, 2026): Terminal-Bench 4.0: 66.4% (xhigh effort), FrontierCode v1.1 (Main): 54.4%, CursorBench 4.0: 57.8%, GDPval-AA v2.1: 1846 Elo; no SWE-bench Verified score was published on that official page.
  2. GPT-5.3-Codex (OpenAI official blog appendix, xhigh effort): SWE-Bench Pro (Public): 56.8% (called an industry high by OpenAI), Terminal-Bench 2.0: 77.3% (called an industry high), OSWorld-Verified: 64.7%, GDPval (win/tie): 70.9%, cybersecurity CTF challenges: 77.6%, SWE-Lancer IC Diamond: 81.4%.
  3. Gemini 3 (Google Developers Blog, Dec 17, 2025): SWE-bench Verified: 76%, described as "matching Gemini 3 Pro's SWE-bench Verified score of 76%"; official scores for Terminal-Bench and other coding benchmarks were not published.
  4. Methodology note: The three vendors published different benchmarks (SWE-Bench Pro, SWE-bench Verified, and Terminal-Bench 2.0 vs 4.0 are different benchmarks and versions) with different effort settings, so scores are not directly comparable; every figure above comes from an official vendor page.

04Which one to pick

  1. Need 1M-token-class context: Claude Code's default Opus 5.5 offers 1M tokens of context; the Pro side of Gemini CLI's routing (gemini-3.1-pro-preview) offers 1,048,576 input tokens; on the Codex side, GPT-6.1 Sol offers 1,050,000 tokens.
  2. Want open source and auditability: Codex CLI and Gemini CLI are both Apache 2.0 open source with public repos; Claude Code itself is not open source and is subject to Anthropic's commercial terms.
  3. Already have a subscription: Claude Pro ($20/month and up) includes Claude Code; ChatGPT Plus ($20/month) includes expanded Codex usage; Gemini CLI no longer has a personal free tier and needs a separate paid API key or enterprise license.
  4. Comparing API costs on list prices: Among official list prices, the lowest figures are Gemini 3 Flash Preview's ($0.50 in / $3.00 out per 1M tokens); in the coding-model tier, GPT-5.3-Codex is $1.75 in / $14.00 out and Claude Opus 5.5 is $4 in / $20 out. The models sit in different capability tiers; prices reflect list rates only.
  5. Using from mainland China: Neither Anthropic's supported-regions list nor the Gemini API regions list includes mainland China; OpenAI has published no dedicated Codex region list, with its official blog describing a global rollout to paid ChatGPT users.

Why it matters

the business models of the three terminal coding agents have split — Claude Code bundles its flagship model into subscriptions, Codex pairs subscriptions with an open-source CLI, and Gemini CLI dropped its free tier for paid-only access.
Useful Tap if this story helped you

SourcesAnthropic "Introducing Claude Opus 5.5" announcement (Sep 22, 2026, source); Claude Code official docs: model configuration (source); Anthropic official pricing page (source); Anthropic Supported Regions Policy (source); GitHub anthropics/claude-code repo (source); Anthropic "Introducing Claude Duet" article (Oct 21, 2026, source); OpenAI GPT-5.3-Codex official model page (source); OpenAI GPT-6.1 Sol official model page (source); OpenAI Codex pricing & usage page (read Oct 22, 2026, source); OpenAI "Introducing Codex" official blog (source); GitHub openai/codex repo (source); Google Developers Blog "Gemini 3 Flash is now available in Gemini CLI" (Dec 17, 2025, source); Google AI official pricing page (read Oct 21, 2026, source); Google Developers Blog Gemini CLI transition announcement (May 19, 2026, source); GitHub google-gemini/gemini-cli repo (source); Gemini API available-regions docs (updated Apr 28, 2026, source). Compiled from public information; not investment advice.

From HIMIAO Horizon · himiao.ai

Comments

  1. Loading comments…
Ask the cat