Skip to content
TopInsight .co
A dark terminal window in dark space with monospace command-line text glowing softly, subtle OpenAI-green undertone.

Codex CLI by OpenAI: the terminal AI coding tool OpenAI shipped against Claude Code

OpenAI shipped its own CLI AI coding agent in 2025 — directly aimed at Claude Code. After three weeks of daily use, here is the honest assessment.

C Charles Lin ·

Our verdict

Best for: Engineers already in the OpenAI ecosystem (ChatGPT Plus / Pro subscriptions), teams using GPT-5 for coding, and Claude Code users who want a second CLI option.

Not for: Anyone who wants the best agent-loop reliability today (Claude Code still slightly ahead) or who is wary of OpenAI’s ecosystem lock-in.

7.5 / 10

OpenAI shipped Codex CLI in 2025 as its direct response to Claude Code’s success. The product is a CLI AI coding agent — conversational interface, file system access, shell execution, multi-step agent loop — that runs on GPT-5 (or other OpenAI models) instead of Anthropic Claude. The strategic intent is clear: OpenAI doesn’t want Anthropic to own the “terminal-first AI coding” category.

After three weeks of Codex CLI alongside Claude Code on real work, here is the working assessment.

What Codex CLI actually is

A Node-based CLI tool (npm install -g @openai/codex or similar) that you authenticate with your OpenAI account. Once logged in, it operates similarly to Claude Code:

  • Open a terminal in your project
  • Run codex (or whatever the binary is named at release)
  • Have a conversation, the agent reads files, edits files, runs commands
  • Permission prompts before destructive operations

The model behind the agent is GPT-5 (or GPT-5-codex, OpenAI’s coding-specialised variant). Other models can be selected.

Where Codex CLI matches Claude Code

The basics are solid:

  • File reading and editing work cleanly
  • Multi-file refactors execute correctly most of the time
  • Shell command execution with permission gating works
  • Session persistence (resume previous conversations)

For routine work — “fix this function,” “add this feature,” “refactor this module” — Codex CLI is roughly at parity with Claude Code in my testing.

Where Codex CLI differs

Three meaningful differences from Claude Code:

1. ChatGPT Plus / Pro subscription unlocks Codex usage without API key. OpenAI ties Codex CLI to ChatGPT subscriptions, which means the same $20/month that gets you ChatGPT also lets you use Codex CLI with reasonable limits. This is a smoother onboarding than Claude Code’s Anthropic Pro + API setup.

2. GPT-5 is the default model. This means slightly different output style than Claude — more verbose explanations by default, sometimes more aggressive in proposing changes. Adjustment period of a few days if you’re coming from Claude.

3. Tool ecosystem is shallower than MCP. Anthropic donated MCP to the Linux Foundation (covered in our MCP deep dive) and the MCP ecosystem is now substantial. OpenAI has its own plugin / tool system but it’s less mature, fewer community-built tools.

Where Codex CLI still trails

The community signal in r/ChatGPTCoding is genuinely positive — see the 194-upvote “I can’t stop vibe coding with Codex CLI” thread — but recurring criticisms surface:

  • Slowness: the 284-upvote “wondering why Codex CLI was so slow today” thread reflects intermittent latency issues
  • Less mature than Claude Code on agent loop reliability: for very long autonomous tasks, Claude Code still finishes more reliably in my testing
  • The MCP ecosystem gap: this is a real architectural cost — Claude Code users have ten essential MCP servers ready to go; Codex equivalents are fewer

The 135-upvote “Codex CLI + GPT-5-codex still a more effective duo than Claude Code + Sonnet 4.5” thread is the strongest community take in Codex’s favour — but the upvote count is modest compared to Claude Code threads, reflecting smaller (though growing) community.

How they actually compare on the dimensions that matter

Codex CLI + GPT-5Claude Code + Claude 3.7
Agent loop reliabilityGood, occasionally drops tasksSlightly more reliable on long tasks
Multi-file refactor qualityComparableComparable
Tool / plugin ecosystemSmaller, less matureMCP ecosystem larger
OnboardingTied to ChatGPT subscription (smooth)Anthropic Pro + setup (slightly more friction)
LatencyVariable, occasionally slowMore consistent
Cost (subscription path)ChatGPT Pro $20/mo or $200/mo unlocks moreClaude Pro $20/mo or Max $100-200/mo
Cost (API path)GPT-5 input $5/M, output $20/M (approximate)Claude Sonnet $3/$15 per M

For most engineers in mid-2025, the choice comes down to which ecosystem you’re already in (OpenAI vs Anthropic) more than which tool is “better.” They’re comparable.

Who should use Codex CLI

Reach for Codex CLI if:

  • You already pay for ChatGPT Plus / Pro and want to maximise that subscription
  • You strongly prefer GPT-5’s output style over Claude’s
  • You want to hedge against single-vendor risk (Codex + Claude Code is a reasonable two-tool setup)
  • You’re shipping into an OpenAI-heavy ecosystem and want consistency

Stick with Claude Code if:

  • You’ve invested time in MCP server configurations
  • You value agent-loop reliability above all
  • You prefer Anthropic’s output style
  • You want to avoid paying for two subscriptions

The honest take

Codex CLI is real, it works, and it’s a legitimate competitor to Claude Code. It’s not yet “better” — Claude Code still has the edge on the dimensions I personally care about most — but the gap is small enough that “which terminal AI coding tool is best?” is now a real question rather than a “Claude Code, obviously” assumption.

For most engineers, running both is the right answer if budget allows. For engineers who can only run one, the choice depends on which ecosystem you’re otherwise in.

For the head-to-head with the original CLI agent, see our Claude Code review and Aider vs Claude Code piece.

Sources

Every reference behind this piece. If we make a claim, it's because at least one of these said so — or we lived it ourselves.

  1. Firsthand Three weeks of Codex CLI as a Claude Code alternative
  2. Docs OpenAI Codex documentation — OpenAI
  3. Blog r/ChatGPTCoding — "Codex now runs in your IDE, Cloud and CLI with GPT-5" (250 ups) — r/ChatGPTCoding
  4. Blog r/ChatGPTCoding — "Codex CLI + GPT-5-codex still more effective than Claude Code + Sonnet" (135 ups) — r/ChatGPTCoding
  5. Blog r/ChatGPTCoding — Codex CLI vibe coding thread (194 ups) — r/ChatGPTCoding
  6. YouTube Independent Codex CLI walkthroughs — Various