Coding agent (CLI) · OpenAI
Codex CLI
OpenAI's open-source, Rust-based terminal coding agent. Signs in with a ChatGPT plan or an API key, runs commands under a sandbox with approval controls, and supports MCP, subagents and codex exec for scripts.
Codex CLI review
Codex CLI is OpenAI's open-source terminal coding agent, written in Rust. It runs on macOS, Windows and Linux under the Apache-2.0 licence. We read the vendor's pages and repository in October 2026. We did not run an independent test.
Who it is for
ChatGPT subscribers and OpenAI API users who want an open-source CLI coding agent with a sandbox. It is a weaker fit if you need non-OpenAI or local models officially documented.
What stands out
You sign in with a ChatGPT plan or an OpenAI API key. Commands run under a sandbox with approval controls, and a permissions command shows the active sandbox.
The docs cover codex exec for CI and scripts, local and remote MCP servers, and subagents. A search option is also documented. Install is a curl script, npm, Homebrew, or a PowerShell installer on Windows.
Models are OpenAI's. The pricing page lists GPT-6.1 Sol, GPT-6.1 Terra and GPT-6 Luna. With an API key, the models you can use follow what the key can access.
Price and licence
The licence is Apache 2.0, and we read the LICENSE file in the repository. We saw no extra terms. That is open source.
The CLI is free, and model cost comes from your OpenAI account. On the pricing page, seen 28 October 2026, Codex is included in ChatGPT Free ($0), Go ($8 a month) and Plus ($20 a month). Pro starts at $100 a month. Business is $20 per user monthly on annual billing, or $25 monthly. Enterprise and Edu are by contact. Usage limits apply. We did not verify the individual Pro tiers.
An API key is billed at standard API rates.
Where it falls short
- Cloud features need ChatGPT sign-in. API-key use excludes them, including GitHub code review.
- Plan usage limits run per 5-hour and weekly windows, and depend on model and task size.
- The official docs describe OpenAI models only. Community guides mention local models through Ollama, but we did not confirm it in OpenAI's pages.
- The Windows story conflicts. The README and OpenAI's Windows docs describe native support with a Windows sandbox. The repo file docs/install.md still says "Windows 11 via WSL2", which looks out of date.
Alternatives
Compare more tools in terminal coding agents. OpenCode is MIT-licensed and works with many providers. Gemini CLI is also Apache-2.0.
Facts: platforms, price and licence
- platforms
- macOSWindowsLinuxREADME gives a native PowerShell installer for Windows, and OpenAI's Windows docs say Codex runs natively with a Windows sandbox (WSL optional). The repo file docs/install.md still lists 'Windows 11 via WSL2' and macOS 12+/Ubuntu 20.04+/Debian 10+, which looks out of date.
- price
- FreeThe CLI itself is free (Apache-2.0). Model cost comes from your OpenAI account (seen 2026-10-28): sign in with a ChatGPT plan, where Codex is included in Free ($0), Go ($8/month), Plus ($20/month), Pro (from $100/month; $100, $200 or $500 tiers), Business ($20/user/month annual, $25 monthly) and Enterprise/Edu (contact sales), with usage limits; or use an OpenAI API key billed at standard API rates (no cloud features).
- source
- Open sourceLicence: Apache-2.0
- github
- openai/codex 131.3k stars, seen 2026-10-28
Codex CLI features
- ✓ yes MCP
- ✓ yes Multi-agent
- ✓ yes Headless / CI
- ✓ yes Sandbox
- ? not verified Local models
- ✓ yes Your own API key
- ? not verified Git worktrees
- ? not verified SSH
✓ documented · – absent or not in its feature list · ? not verified
Codex CLI strengths
- Apache-2.0 with a very active repo (release published 2026-10-27)
- Two sign-in routes: ChatGPT plan (including a $0 Free tier listed on the pricing page) or an API key
- Documented codex exec for CI/scripts, local and remote MCP servers, subagents, and a permissions command showing the active sandbox
- Native Windows sandbox documented, plus standalone installers for macOS, Linux and Windows
Codex CLI weak points
- Codex cloud features require ChatGPT sign-in; API-key use is limited and excludes cloud features such as GitHub code review
- Tied to OpenAI models in the official docs; local-model support was not found in OpenAI's own pages
- Plan usage limits are per 5-hour/weekly window and depend on model and task size
- Repo docs/install.md contradicts the main docs on native Windows support
Who Codex CLI is for
- best for
- ChatGPT subscribers or OpenAI API users who want an open-source, sandboxed terminal agent.
- look elsewhere if
- Anyone who needs to run it on non-OpenAI or local models and wants that officially documented.
Compare Codex CLI
Lists that include Codex CLI
Sources and what we could not verify
Checked 2026-10-28. Prices and features change; the vendor's page is the authority.
- github.com/openai/codex — README: install commands, Sign in with ChatGPT, Apache-2.0
- github.com/openai/codex/blob/main/LICENSE — source: Apache License 2.0 text
- api.github.com/repos/openai/codex — stars, license, pushed_at, not archived
- github.com/openai/codex/blob/main/docs/install.md — repo says Windows 11 via WSL2 (conflicts with docs)
- learn.chatgpt.com/docs/codex/cli — codex exec, MCP, subagents, /permissions sandbox, --search (redirected from developers.openai.com/codex/cli)
- learn.chatgpt.com/docs/pricing — ChatGPT plans and prices including Codex; API key notes; iOS on Plus
- learn.chatgpt.com/docs/auth — ChatGPT sign-in vs API key; cloud requires ChatGPT
- learn.chatgpt.com/docs/windows/windows-sandbox — native Windows support, Windows sandbox, WSL optional
Not verified
- local_models: third-party guides and an Ollama doc snippet mention codex --oss with Ollama/LM Studio, but OpenAI's own docs page was not retrieved (404 on config-advanced), so left null
- git_worktrees: only a navigation link seen, no page content; left null
- mobile_app=true is from the Plus row 'Codex on web, CLI, IDE, and iOS'; the iOS app was not checked separately
- official_url set to the GitHub repo because the CLI has no dedicated product page; docs now live on learn.chatgpt.com (developers.openai.com redirects there)
- Pricing figures read through page summarisation; Pro tiers ($100/$200/$500) not individually verified