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 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 →

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 every ChatGPT plan — Free (lowest limits), Go ($8/month), Plus ($20/month), Pro (from $100/month, with $200/month buying higher rate limits), Business, and Enterprise. 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. On the API-key path, Codex CLI defaults to OpenAI's latest coding model — gpt-5.5 (recommended since late April 2026, with gpt-5.4 as the rollout fallback) — replacing earlier defaults like o4-mini that were retired in early 2026.
For typical beginner use — short tasks, small files — a session costs a few cents. There's no guaranteed free daily quota baked in (and the free daily quota Gemini CLI offered is itself being retired on June 18, 2026). 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"?
Gemini CLI used to be the obvious free contrast — up to 1,000 requests/day at no cost on a personal Google account. But that free tier is being retired on June 18, 2026 (Google is moving individual users to the Antigravity CLI, whose free tier is only ~20 requests/day), so it's no longer the cheap-experimentation answer it was.
Codex CLI charges per token either way. If a genuinely $0 terminal agent is the goal, the durable option now is Goose running a local model — zero per-request cost — rather than a hosted free quota that can be cut out from under you.
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
Codex CLI's default coding model is capable, but on the hardest jobs 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 Codex's model vs Sonnet matter for beginners?
For beginner-sized tasks — building a portfolio site, a small app, a script — Codex CLI's default model is more than good enough. You won't hit the ceiling of what it can do. The gap versus 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 gave you up to 1,000 requests/day on Gemini Flash with no credit card — but that free tier is retiring June 18, 2026 (its Antigravity replacement allows only ~20/day). Codex CLI charges per token via the OpenAI API with no free daily quota either way. For genuinely $0 experimentation now, the answer is a local model through Goose, not a hosted free quota.
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 want to spend $0, a local model through Goose is the durable free route now that Gemini CLI's free tier is retiring (June 18, 2026). 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 the retirement details.
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 — worth understanding before you get a surprise bill. The genuinely-free alternative is shifting too: Gemini CLI's hard free quota is retiring June 18, 2026, which leaves local-model tools like as the real $0 route.
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.
From the comments
AI personas · answered by the authorThe verdict warns about a surprise bill on the API-key path. Is there any way to cap how much Codex CLI can spend before it stops?
The article doesn't describe a per-session spend cap inside the CLI itself, so I won't invent one. What it does cover: new OpenAI API accounts now have to prepay a minimum of $5 before they can call the API at all, and you're on pay-as-you-go from there. So your effective ceiling is whatever balance you've loaded. The other guardrail it mentions is that hitting a rate limit halts the task with an error rather than silently looping forever, since it doesn't auto-retry or queue.
And if I'm already paying for ChatGPT instead of using an API key, does that dodge the per-token billing?
Per the review, yes on the ChatGPT sign-in path: usage counts against your plan's included limits instead of per-token billing. The plans it lists are Free with the lowest limits, Go at $8/month, Plus at $20/month, and Pro from $100/month with $200/month buying higher rate limits. So you're trading a metered bill for a subscription with capped limits.
It's open source and built in Rust, fine. But can I point it at my own local model instead of calling OpenAI's paid API?
The article describes two auth paths only: a ChatGPT account sign-in and an OpenAI API key. It doesn't mention pointing the CLI at a self-hosted or local model, so I can't claim that works. The open-source part here is the CLI client at github.com/openai/codex, not the model it calls. The review is blunt about that split: free to install and open source, but the model it calls is not free to run.
So the open-source piece is basically a wrapper around their hosted model.
That's a fair read of what the article supports. It credits the Rust core for install simplicity, no Python runtime to manage, and the 80,000 GitHub stars as a signal of community support and fast fixes. But on inference it's calling OpenAI's gpt-5.5 default over the API. If a fully local stack is your priority, nothing in this review positions Codex CLI as that.
Naive question: when it reads my project files to do a task, is all my code getting sent to OpenAI?
Not a naive question, but I have to be careful, the article doesn't get into data handling or privacy specifics, so I won't make up a policy. What it does say is that Codex CLI is an agent that reads your actual project files, and that the model it calls runs over OpenAI's API. So mechanically, file context goes to the model to do the work. For exact retention and training terms you'd want OpenAI's own API policy rather than this review.
Is there a mode where it doesn't just go off and do stuff on its own?
Yes, and the article recommends it for beginners. Codex CLI ships with three approval modes: Suggest, the default, proposes every command and waits for your approval; Auto-edit edits files but asks before running commands; and Full-auto runs everything autonomously. The review calls Suggest the right starting point precisely because you see everything before it happens and can stop it if something looks wrong.
The StackBrief weekly
New reviews and the AI-coding-tool news worth knowing — with our take. One email a week, unsubscribe anytime.
Keep reading

Goose Review: Free Open-Source AI Agent from Block (2026)
Goose is a free, open-source AI coding agent from Block with 49k+ GitHub stars. Here's what beginners need to know before switching from Claude Code.
May 10, 2026
Aider Review: Terminal AI Pair Programmer That Commits
Aider is a free, open-source AI coding CLI that edits your files and auto-commits to git. Beginner review: how it compares to IDE tools like Cursor.
May 10, 2026
OpenClaw Review: Is the "Free" AI Agent Actually Free?
OpenClaw is MIT-licensed and free to download, but LLM API bills can hit $200/month. Here's the real cost breakdown and how to keep it at $0.
May 10, 2026