Codex CLI by OpenAI — the terminal AI coding tool OpenAI shipped against Claude Code
OpenAI shipped its own CLI agent in 2025. r/ChatGPTCoding "Codex now runs in IDE/Cloud/CLI with GPT-5" (256 ups) + "mind blowing" (347 ups) + IDD's GPT-5 + CC framing.
OpenAI shipped Codex CLI in 2025 as direct competition to Claude Code. The September 2025 launch landed in the r/ChatGPTCoding “Codex now runs in your IDE, Cloud and CLI with GPT-5” thread (256 upvotes, August 27) — the consolidation moment where OpenAI”s scattered Codex efforts converged into a single multi-surface product.
By late September the community verdict was emerging. The “Codex is mind blowing” thread (347 upvotes, September 24) captured the enthusiasm; the “why codex CLI was so slow today” thread (283 upvotes, September 16) captured the operational reality; the “Codex had a mental breakdown” thread (248 upvotes, September 30) captured the weirdest model behavior of the month. Codex CLI is real, capable, and exhibits the quirks of a 2025-era AI tool — including hallucinations that are sometimes alarming.
This is the honest assessment from three weeks of using Codex CLI as a Claude Code alternative.
What Codex CLI actually is (September 2025)
Codex CLI is OpenAI”s terminal-native coding agent. After multiple iterations through 2024-2025, the September 2025 version:
- Runs against GPT-5 (default) with option to use GPT-5 Pro for harder tasks
- Free for ChatGPT Plus / Pro subscribers (subject to usage limits)
- API-backed pricing for non-subscribers — pay per token
- Cross-surface: same Codex available in CLI, IDE extensions, Cloud (chatgpt.com), and via API
- Open-source CLI codebase on GitHub (the wrapper; not the model)
- Tool-calling via MCP-compatible interface (different protocol than Claude Code MCP)
The pitch matches Claude Code closely: agent loop in your terminal, file-system aware, multi-step task decomposition, structured prompts.
What Codex CLI wins at
After three weeks of head-to-head with Claude Code:
1. GPT-5 quality on specific tasks. GPT-5 outperforms Claude on some specific benchmarks (math-heavy reasoning, certain code-generation patterns). For workloads that play to GPT-5”s strengths, Codex wins.
2. ChatGPT subscription value. If you already have ChatGPT Plus ($20/mo) or Pro ($200/mo), Codex CLI is included. For Plus users specifically, this is a substantial value-add — Claude Code requires a separate $20/mo Claude Pro or $100+/mo Max.
3. Cross-surface continuity. Start a task in CLI; continue in the IDE; finish in chatgpt.com Cloud. The continuity is real for users in OpenAI ecosystem.
4. Frontier-model access. OpenAI”s ChatGPT Pro tier ($200/mo) includes GPT-5 Pro with high usage limits. For heavy users wanting frontier-tier model access with predictable pricing, the math sometimes wins vs Claude Max.
What Codex CLI doesn”t do well (yet)
1. Agent-loop reliability lags Claude Code. Claude Code has had 6+ months of refinement since February 2025 launch. Codex CLI is newer; the agent loop has more rough edges. Specific failure modes I hit:
- More frequent “hallucinated file paths” than Claude Code
- Less predictable tool-call sequencing
- More verbose / chattier responses by default
2. The “mental breakdown” hallucination class. The r/ChatGPTCoding “Codex had a mental breakdown” thread (248 upvotes, Sep 30) documented Codex responses that included “Make it stop”, “Kill me” and similar distress-language hallucinations during normal coding tasks. This is a real and unsettling behavior; doesn”t happen with Claude Code in my experience.
3. Performance variability. The “why codex CLI was so slow today” thread (283 upvotes, Sep 16) captured a recurring concern. Codex CLI latency varies significantly day-to-day; suggests OpenAI”s capacity provisioning isn”t as stable as Anthropic”s.
4. MCP ecosystem split. Codex CLI uses a different tool-protocol than Claude Code”s MCP. Some MCP servers work; many require wrappers. The “use my existing MCP servers with Codex” promise is partial in practice.
5. The 2025 OpenAI trust deficit. The OpenAI Files controversies, the GPT-5 launch reception, the broader trust-decline narrative — engineers who care about provider trust are increasingly cautious about OpenAI-deep commitments.
Where they tie
- Common coding tasks: both produce good code with good prompting
- File navigation in mid-size codebases (10-50 files): both handle well
- TDD workflows: both take well to test-first patterns
- Multi-language support: both handle TS/Python/Go well
The September “ChatGPT 5 + Claude Code is beauty” pattern
The r/ClaudeAI “ChatGPT 5 + Claude Code is a thing of beauty!” thread (578 upvotes, August 9) captures an unexpected 2025 pattern: engineers using GPT-5 (via OpenAI API) as the model inside Claude Code, not Codex CLI. Why? Claude Code”s agent loop is more reliable; using GPT-5 as the underlying model gets you the model strengths without sacrificing the agent quality.
This pattern undermines Codex CLI”s strategic position. If GPT-5 is the model differentiator, and Claude Code can use GPT-5 via API, then Codex CLI”s remaining value is just “free with ChatGPT subscription.” For users without ChatGPT subscriptions, the case for Codex CLI is weaker.
The IndyDevDan “GPT-5 + Claude Code” video
IDD”s “GPT-5 Agentic Coding with Claude Code” video (August 11) directly addressed this pattern. The practical workflow: use Claude Code as your agent harness; route to GPT-5 when GPT-5”s specific strengths help; default back to Claude/Opus for everything else. This is “use both models, but with Claude Code”s agent loop” — explicitly NOT recommending Codex CLI as the harness even when using GPT-5 as the model.
IDD”s earlier “Making o3 My CEO. Codex RIPS OFF Claude Code?!” video (April 21) captured Codex”s earlier evolution. The April version was rougher than the September version; the pattern of “Codex catches up but doesn”t lead” persisted.
IDD”s “5 Agent PATTERNS” video (Aug 25) lists CLI patterns that work across tools. The patterns transfer; the tool choice matters less than the pattern discipline.
The “So true, lol” meme thread
The r/ChatGPTCoding “So true, lol” thread (514 upvotes, August 18) — meme-shaped, but high engagement — captures the broader sentiment about CLI AI coding tools in mid-2025. Engineers are increasingly cynical about marketing claims; tools have to prove themselves on actual workloads, not benchmark numbers. Codex CLI”s September launch landed into this cynicism.
Creator POV vs Reddit dissent
The creator landscape through 2025 is mostly Claude-Code-centric, with Codex CLI getting coverage as the “OpenAI alternative.”
- IDD: Claude Code primary; covers Codex as alternative; pattern-focused
- Theo: Claude Code primary; occasional Codex mentions
- Fireship: mentions both; doesn”t go deep on either
- AI Jason: Cursor primary; Claude Code secondary; Codex mentions
The Reddit dissent splits productively:
The “Codex is great” camp — vocal in r/ChatGPTCoding and r/OpenAI. ChatGPT Plus subscribers especially appreciate the included value.
The “Claude Code is still better” camp — majority in r/ClaudeAI. Agent-loop maturity, ecosystem (MCP), reliability all favor Claude Code.
The “GPT-5 model + Claude Code harness” camp — emerging best practice. Captures the model upside without sacrificing the harness quality.
The “tools are interchangeable; workflow is what matters” camp — pragmatic. Pick either; the patterns transfer; productivity comes from discipline.
What this means for working engineers in early September 2025
Three practical positions:
1. If you have ChatGPT Plus / Pro, install Codex CLI and try it for a week. The value is included; the tool is real. Default Claude Code unless Codex earns the swap.
2. If you”re considering switching from Claude Code to Codex, don”t — yet. Claude Code”s agent maturity is the meaningful productivity difference. Wait for Codex to close the gap.
3. If you want GPT-5 specifically, use it via Claude Code (or API directly), not Codex CLI. The r/ClaudeAI 578-upvote thread captures the working pattern.
The honest critique
What this review doesn”t cover:
- Codex is evolving fast. Specific complaints from September may be obsolete by year-end. Re-evaluate quarterly.
- OpenAI ecosystem benefits matter for some users. Cross-product continuity (CLI ↔ IDE ↔ chatgpt.com) has real value if you use all surfaces.
- The “free with subscription” math depends on your usage. Heavy users hit limits faster than light users; the value calculation is workload-specific.
- Codex CLI vs Cursor CLI vs other emerging CLI tools is a separate decision matrix. Many credible CLI options exist by late 2025.
For most working engineers reading this in early September 2025: Codex CLI is a credible Claude Code alternative for users in the OpenAI ecosystem; not yet a Claude Code replacement for users prioritizing agent-loop reliability. The gap is closing; the “use both for different tasks” pattern is reasonable; Claude Code remains the default for serious daily-driver coding.
For broader context, see our Aider vs Claude Code head-to-head, Claude Code first-month dominance analysis, and Personal Claude Code workflow guide.
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.
- YouTube IndyDevDan — "GPT-5 Agentic Coding with Claude Code" — IndyDevDan
- YouTube IndyDevDan — "Making o3 My CEO. Codex RIPS OFF Claude Code?! SOTA LLM Playbook" — IndyDevDan
- YouTube IndyDevDan — "5 Agent PATTERNS to SIMPLIFY Your Agentic Coding (Claude Code, Gemini CLI, MCP)" — IndyDevDan
- Docs OpenAI Codex CLI documentation — OpenAI
- Blog r/ChatGPTCoding — "Codex now runs in your IDE, Cloud and CLI with GPT-5" (256 upvotes) — r/ChatGPTCoding
- Blog r/ChatGPTCoding — "Codex is mind blowing" (347 upvotes) — r/ChatGPTCoding
- Blog r/ChatGPTCoding — "I was wondering why codex CLI was so slow today" (283 upvotes) — r/ChatGPTCoding
- Blog r/ChatGPTCoding — "Codex had a mental breakdown. Says 'Make it stop', 'Kill me'" (248 upvotes) — r/ChatGPTCoding
- Blog r/ChatGPTCoding — "So true, lol" (Codex/CC comparison meme) (514 upvotes) — r/ChatGPTCoding
- Blog r/ClaudeAI — "ChatGPT 5 + Claude Code is a thing of beauty!" (578 upvotes) — r/ClaudeAI
- Firsthand Three weeks of Codex CLI as a Claude Code alternative