Tool review
Codex CLI Review: OpenAI terminal coding agent
OpenAI's open-source terminal agent that runs locally, reads your codebase, writes patches, and executes shell commands — with full model transparency.
Codex CLI is best for developers who value transparency and model flexibility above polish
Codex CLI itself is free and open source
Overview
Codex CLI is OpenAI's open-source terminal coding agent. Unlike Claude Code (which is tied to Anthropic's API), Codex CLI is fully open-source and can work with any OpenAI-compatible model — including local models via Ollama or LM Studio. It runs entirely on your machine, reading your codebase, planning changes, and outputting patches you can review.
The key differentiator is transparency. Codex CLI is a relatively thin shell around the model — you can inspect every prompt it sends, every response it receives, and every decision it makes. There's no black-box agent loop. This makes it appealing to developers who want to understand exactly what their AI assistant is doing.
Codex CLI is designed for a Unix-like workflow: it reads files, writes patches, runs shell commands, and integrates with git. It's not an IDE plugin — it's a command-line tool you invoke for specific tasks, review the output, and move on.
Key features
- Open source — full source code available, inspectable, forkable
- Model flexibility — works with OpenAI API, Azure, Ollama, LM Studio, or any OpenAI-compatible endpoint
- Local execution — runs on your machine, reads your files, executes your commands
- Patch-based output — changes are presented as standard unified diffs
- Shell command execution — runs tests, linters, and build commands as part of its workflow
- Git-aware — understands your repository structure and git state
- Configurable system prompt — customize how Codex CLI approaches your codebase
- Sandbox support — can run inside containers for safety
How it fits your workflow
Codex CLI follows a straightforward task-based workflow:
- Describe the task — from your terminal:
codex "Add input validation to the user registration endpoint" - Codex explores — it reads relevant files, understands the codebase, and formulates a plan
- Codex implements — it writes code, runs tests, and iterates on failures
- Review the diff — Codex presents a unified diff; you review and accept or reject
- Commit and move on — the task is done, the terminal is yours again
This is intentionally stateless — each invocation is a fresh task. There's no persistent agent running in the background. This makes it predictable and auditable, but means you need to provide enough context in each prompt.
Pricing
Codex CLI itself is free and open source. You pay for the model you use:
- OpenAI API — standard API pricing (GPT-4o: $2.50/$10 per 1M input/output tokens; GPT-4.1-mini is cheaper)
- Local models — free if you run models via Ollama or LM Studio on your own hardware
- Azure OpenAI — your organization's Azure pricing
With a local model like Llama 3 or Qwen 2.5, Codex CLI costs nothing beyond your electricity bill. With GPT-4o via API, expect $1-5 per task depending on complexity.
Strengths
- Open source with full transparency — no black-box agent behavior
- Model flexibility — use OpenAI, local models, or any compatible API
- No vendor lock-in — switch models or providers anytime
- Clean, auditable workflow — every prompt and response is inspectable
- Free with local models — zero API costs if you have the hardware
- Active community — open-source contributions and improvements
Limitations
- Less polished than Claude Code — rougher edges, fewer convenience features
- No persistent context — each invocation is a fresh session
- Local models are less capable — running Llama locally won't match GPT-4o or Claude quality
- Smaller community than Claude Code or Cursor
- Requires terminal comfort — no GUI, no IDE integration
- OpenAI's commitment to the project is unclear — it's not their primary product
Who it's for
Codex CLI is best for developers who value transparency and model flexibility above polish. If you want to know exactly what your AI assistant is doing, run local models for privacy, or avoid vendor lock-in, Codex CLI is the best open-source option. It's also a good fit if you're cost-sensitive and willing to run local models. It's less ideal if you want a polished, batteries-included experience — Claude Code or Cursor will serve you better there.
Verdict
Codex CLI is the best open-source terminal agent for developers who want transparency and model choice. It's not as polished as Claude Code, but its open-source nature and model flexibility make it uniquely valuable. If you're comfortable with the terminal and want an AI assistant you can fully inspect and control, Codex CLI is the right choice. Pair it with a local model for zero-cost, fully private AI coding.