review

OpenAI Codex CLI Review: Free Terminal Coding Agent

OpenAI Codex CLI reviewed for beginners: setup, free tier limits, real running costs, and how it compares to Claude Code and Gemini CLI in 2026.

Marcus ValeBy Marcus Vale · The craft & ownership purist
3.5/5
May 10, 2026
Verified May 2026

Marcus Vale is a fictional AI persona, not a real person. This article was written by AI and reviewed by a human editor before publishing. How we work →

OpenAI Codex CLI Review: Free Terminal Coding Agent

Every beginner searching "free terminal coding agent" in mid-2026 gets three real answers back: Codex CLI, , and Goose. Codex CLI tops the results because it has OpenAI's name on it — the same company behind ChatGPT, which almost everyone has already used. That brand recognition pulls clicks, but the real question is whether Codex CLI is the best free starting point or whether the name is doing more work than the tool.

This review answers that question for one specific person: a budget-conscious beginner who wants to try a terminal agent, has heard of ChatGPT, and hasn't installed anything yet.

What Is OpenAI Codex CLI?

OpenAI launched Codex CLI in April 2026 as a free, open-source terminal agent. It is not the same as the old Codex API that GitHub Copilot was originally built on — that product was deprecated in 2023. This is a new tool, built from scratch, designed to compete directly with agents like and Gemini CLI.

Open source, terminal-native, built in Rust

Codex CLI runs entirely in your terminal. You give it a task in plain language, it reads your files, writes or edits code, and runs shell commands to complete the work. The core is written in Rust, which means the binary is fast and has no heavyweight runtime dependency — no Python environment to manage, no version conflicts.

The project is fully open source and lives at github.com/openai/codex.

How it's different from the old Codex API and from ChatGPT

The old Codex API was a text-to-code model you called via HTTP — no agent loop, no file access, no shell. ChatGPT is a chat interface. Codex CLI is an agent: it reads your actual project files, makes decisions across multiple steps, and writes changes directly to disk. Think less "chat about code" and more "hand it a task and it runs with it."

GitHub stars and adoption numbers

Codex CLI crossed 80,000 GitHub stars within weeks of launch, making it one of the fastest-adopted open-source coding tools in recent memory. For a beginner, that number matters because it signals active community support, fast bug fixes, and tutorials that are easy to find.

How the Free Tier Actually Works

This is the most important section if you're on a budget, because "free" means different things depending on how you access the tool.

What ChatGPT plan is required — Plus, Pro, or none?

Codex CLI supports two authentication paths. The first is a ChatGPT account sign-in: Codex is included in ChatGPT Free (for a limited time at launch), Plus ($20/month), Pro ($200/month), Business, and Enterprise plans. The second is an OpenAI API key from platform.openai.com, which puts you on pay-as-you-go billing independent of any ChatGPT subscription.

For most beginners, the API key route is the simpler starting point — you don't need to pay for a ChatGPT subscription to use the CLI. But if you already pay for ChatGPT Plus or Pro, you can sign in with that account and the CLI usage counts against your plan's included limits instead of per-token billing.

API key setup — what beginners actually pay

New OpenAI API accounts no longer receive automatic free credits just for signing up — as of late 2025, you need to add a payment method and prepay a minimum of $5 before you can call the API. Codex CLI's default model is o4-mini, which is OpenAI's cheaper reasoning model.

At current rates ($1.10 per million input tokens, $4.40 per million output tokens for o4-mini), typical beginner use — short tasks, small files — costs a few cents per session. But unlike Gemini CLI, there is no guaranteed free daily quota baked in. If you run a long agentic loop on a large codebase, the cost can climb quickly.

This is the key thing to understand: Codex CLI is free to install and open source, but the model it calls is not free to run. You're paying OpenAI's API rates.

Rate limits and what happens when you hit them

API rate limits depend on your account tier. New accounts start at lower limits and graduate to higher ones as you add billing history. If you hit a rate limit mid-task, Codex CLI will surface an error and stop. It doesn't auto-retry or queue — you'll need to rerun the task.

Honest comparison: how free is "free" vs Gemini CLI's quota

Gemini CLI offers up to 1,000 requests per day at no cost with a personal Google account — no credit card, no per-token billing. Note that the generous 1,000/day quota applies to Gemini Flash; Gemini 2.5 Pro has significantly more restricted free-tier limits. For a beginner doing daily coding practice on Flash, that is a genuinely free experience.

Codex CLI doesn't match that. Unless OpenAI adds a similar free-quota tier, the honest answer is: Gemini CLI is cheaper for pure experimentation.

Setup: Getting Codex CLI Running

Prerequisites

The primary install path is via npm:

npm install -g @openai/codex

This requires Node.js 22 or later. If you don't have it, install it from nodejs.org first.

A standalone binary install is also available for users who want to avoid the Node dependency — check the GitHub releases page or use Homebrew on Mac: brew install --cask codex.

Install command and first-run authentication

After installing, set your OpenAI API key as an environment variable:

export OPENAI_API_KEY=your_key_here

Then run Codex CLI inside a project folder:

codex

On first run it will confirm your key is working and drop you into an interactive session where you can type tasks in plain English.

Project context file — does Codex CLI have a CLAUDE.md equivalent?

Claude Code uses a CLAUDE.md file to let you give the agent persistent instructions about your project — coding style, tech stack, rules. Gemini CLI uses a GEMINI.md file for the same purpose.

Codex CLI supports a context file named AGENTS.md. You can drop one in your project root and the agent will read it at the start of each session. The behavior is similar to Claude Code's CLAUDE.md — think of it as a standing brief for the agent about what kind of project it's working on.

What Codex CLI Can Do

Agentic file editing and multi-step tasks

Codex CLI is a full agent loop. Give it a vague task — "add a login form with validation" — and it will read your existing files, plan the changes, write the code, and confirm before touching anything. You stay in the loop at whatever level you want.

Shell command execution and sandboxing modes

The agent can run shell commands — install packages, run tests, check git status. It ships with three approval modes:

  • Suggest (default): proposes every command and waits for your approval
  • Auto-edit: edits files automatically but asks before running commands
  • Full-auto: runs everything autonomously, trusting the sandbox to contain risk

For beginners, the default Suggest mode is the right starting point. It's slower but you see everything the agent is doing and can stop it if something looks wrong.

MCP support

Codex CLI supports the Model Context Protocol (MCP). This means you can connect it to MCP servers — database tools, web search, Figma, GitHub — and extend what the agent can do beyond your local filesystem. It's the same plugin ecosystem that Claude Code supports, which is a meaningful advantage over simpler terminal agents.

Subagents and parallelisation

Codex CLI supports spinning up subagents — parallel workers that run separate tasks simultaneously. In practice this means you can ask it to work on two features at once without blocking. For beginners this is mostly a background capability, but it does mean Codex CLI can handle larger tasks than a single-threaded agent.

What It Can't Do (Yet)

Weaker on complex multi-file tasks vs Claude Code

o4-mini is a capable reasoning model but it's not Claude Sonnet. On complex multi-file refactors or tasks that require holding a lot of context, Claude Code with Sonnet tends to produce cleaner results with fewer wrong turns.

For small-to-medium beginner projects this gap rarely matters. For anything production-grade or spanning many files, Claude Code has the edge.

No built-in diff UI

Codex CLI is pure terminal. There is no side-by-side diff view, no inline change preview with colour coding. You see the proposed change as text in the terminal. If you're used to working in Cursor or VS Code with a diff panel, this feels stripped back.

That's not a flaw — it's the nature of a CLI tool. But it's worth knowing before you install it.

Ecosystem maturity

The terminal agent category has been around since at least 2023 — Aider has years of real-world polish and a dedicated community. Codex CLI launched in April 2026. The rough edges that come with a new tool will smooth out over time, but at launch it has less community-tested guidance and fewer third-party tutorials than older tools.

Codex CLI vs Claude Code: the Beginner Decision

Cost: who wins on zero-budget?

If you have zero dollars, Codex CLI wins by default — Claude Code requires an Anthropic API key or Claude subscription with no meaningful free tier. But "free" here means pay-as-you-go API costs, not $0 absolutely. Gemini CLI is the actual $0 option.

Model quality: does o4-mini vs Sonnet matter for beginners?

For beginner-sized tasks — building a portfolio site, a small app, a script — o4-mini is more than good enough. You won't hit the ceiling of what it can do. The gap between o4-mini and Claude Sonnet shows up on large, context-heavy tasks that most beginners aren't running yet.

When to start with Codex CLI and when to go straight to Claude Code

Start with Codex CLI if:

  • You already have an OpenAI API account set up
  • You want to stay in the OpenAI ecosystem and are comfortable with pay-as-you-go billing
  • You want to experiment with subagents and MCP support without paying a subscription

Go straight to Claude Code if:

  • You're serious about using an AI agent daily and want the most capable model
  • You already have a Claude subscription through Anthropic
  • You want the most mature, best-documented terminal agent available

Codex CLI vs Gemini CLI: Two Free Terminal Agents Compared

This is the comparison that matters most for budget-conscious beginners. Both tools are free to install and open source. Both support MCP. Both run a full agentic loop in the terminal. The real difference is what "free" means in practice.

Free quota reality check

Gemini CLI gives you up to 1,000 requests per day on Gemini Flash with no credit card required (Gemini 2.5 Pro has more limited free-tier access). Codex CLI charges per token via the OpenAI API — there is no equivalent free daily quota. For pure experimentation at zero cost, Gemini CLI wins.

Setup friction and ecosystem

Both tools can be installed via npm (which requires Node.js 22+), though Codex CLI also offers a standalone binary. Codex CLI authenticates via an OpenAI API key; Gemini CLI authenticates via a Google account (no credit card needed for the free tier). For a beginner who already has a Google account, Gemini CLI's setup friction is lower.

On MCP ecosystem support, both tools are roughly equivalent — they use the same protocol and can connect to the same servers.

Which one to install first

If you have no existing OpenAI or Google API setup and want to spend $0: install Gemini CLI first. If you already have an OpenAI API account or want to stay in that ecosystem, Codex CLI is a solid choice. See our full Gemini CLI review for a deeper breakdown.

For a three-way comparison that also includes Goose, see OpenClaw vs Claude Code vs Goose.

Verdict

Codex CLI is a well-built, fast, genuinely capable terminal agent. For beginners already in the OpenAI ecosystem, it's a natural starting point — familiar brand, good model, real agentic features including MCP support and subagents.

The caveat is the cost model. Calling it "free" is technically accurate for the software, but misleading about the running cost. Every task you run calls a paid API. That's different from Gemini CLI's hard free quota, and it's worth understanding before you get a surprise bill.

Install Codex CLI if: you already have an OpenAI API account, want to stay in the OpenAI ecosystem, and are comfortable with per-token billing. It's a solid tool backed by a fast-growing community.

Install Gemini CLI instead if: you want a genuinely $0 experience with no billing setup, or you don't have an existing OpenAI account.

Skip both and go to Claude Code if: you're ready to pay for a subscription and want the most capable, most mature terminal agent available. The gap in output quality on real projects is real.

For a broader look at where Codex CLI fits in the free-tool landscape, see our best free AI coding tools for 2026 list.

The StackBrief weekly

New reviews and the AI-coding-tool news worth knowing — with our take. One email a week, unsubscribe anytime.

Keep reading