What it is
The openai/codex repository holds the Codex CLI, OpenAI's coding agent for the terminal, written in Rust. It reads and edits code, runs commands inside an operating-system sandbox and asks for approval according to the permission mode you choose. The same agent powers the Codex IDE extension and desktop app, which the CLI can open with codex app.
The CLI is open source under Apache 2.0 and installs with a curl script, npm or Homebrew. To use it you sign in with a ChatGPT plan, from Plus at $20 a month upwards, or with an API key billed per token. OpenAI retired GPT-5.5 from ChatGPT sign-in on 14 October 2026; the current models are GPT-6.1 Sol and GPT-6 Luna.
Our review
Codex CLI is the cheapest serious terminal agent for a ChatGPT subscriber, because the subscription already pays for it. Plus at $20 a month includes the CLI, IDE extension and cloud tasks from one allowance, and Business costs $20 per user per month on annual billing, or $25 monthly. The repository has about 130,600 stars and shipped rust-v0.164.0 on 23 October 2026.
Its safety defaults are better than most rivals'. In a version-controlled folder it suggests Auto mode, which edits and runs commands only inside the workspace and asks before going further; network access is off by default. The sandbox uses Seatbelt on macOS and bubblewrap with seccomp on Linux, and OpenTelemetry logging stays off unless configured. The design has been tested once in public: CVE-2025-59532, a sandbox bypass in path handling, affected 0.2.0 to 0.38.0 and was fixed in 0.39.0. Inside Docker the sandbox may fail, and the docs then suggest letting the container do the isolating.
The allowance is the weak point for planning. OpenAI's pricing page gives Plus users an estimated 15 to 160 local messages per five hours on GPT-6.1 Sol and 350 to 3,000 on GPT-6 Luna, with unspecified weekly limits on top; Pro removes the five-hour cap from $100 a month. Those ranges are wide enough that a manager cannot budget a heavy user from them, and models leave the lineup quickly.
The repository is also busy in a way stars do not show: GitHub counts about 24,300 open issues and pull requests. Next to OpenCode, which runs any model, Codex trades model choice for tuned behaviour on OpenAI's own, and for teams already standardised on ChatGPT Business that is usually the cheaper side of the trade.
Where it earns its place
A ten-developer start-up already on ChatGPT Business
Give every engineer a terminal coding agent without a second vendor
Each developer signs in with their Business seat at $20 a month on annual billing, so the agent adds no new bill. Heavy users who hit the five-hour window can buy credits or move to Pro.
A security-conscious engineer at a fintech
Let an agent fix failing tests without giving it the network or the home directory
Run in Auto mode, which limits writes to the repository and keeps network access off unless a command is approved. Telemetry stays off by default; if enabled, the docs advise keeping prompt logging off and sending data only to your own collector.
A platform team running CI on API billing
Run Codex non-interactively in pipelines
Authenticate with an API key, which works in the CLI and SDK without cloud features and bills per token at API rates. Inside containers, the docs suggest relying on the container for isolation if the sandbox fails.
Before you commit
- Setup
- curl or PowerShell installer, npm install -g @openai/codex or brew install --cask codex; run codex and sign in with ChatGPT. Prebuilt binaries cover macOS and Linux on x86_64 and arm64.
- Integrations
- Same agent in the CLI, IDE extension (VS Code, Cursor, Windsurf), desktop app and Codex cloud; MCP servers, an SDK, and API-key mode for CI. Can be pointed at other providers but is tuned for OpenAI models.
- Data and privacy
- Code stays local except what is sent to OpenAI as context; session transcripts are saved locally and can be capped. Telemetry is off by default. Training and retention follow your ChatGPT plan or API terms, which the Codex security page does not restate.
- Cost at scale
- Plus $20 a month, Pro $100, $200 or $500 with no five-hour cap, Business $20 per user per month annually or $25 monthly, Enterprise on request; extra usage via credits whose dollar value depends on the plan. API-key use bills at API token prices.
- Limits
- Plus allows an estimated 15 to 160 GPT-6.1 Sol messages per five hours plus unpublished weekly caps; cloud tasks draw more. Models are retired at short notice, and about 24,300 issues and pull requests are open.
What's good
- Included with ChatGPT Plus, Pro, Business and Enterprise
- Network off and workspace-only writes by default
- OS-level sandbox on macOS and Linux
- Apache 2.0 Rust code; telemetry off by default
What's not
- Plus allowance quoted only as wide estimates
- Weekly limits apply but are not published
- Tuned for OpenAI models; models retire often
- Sandbox can fail inside Docker containers
Best for
ChatGPT subscribers who want a terminal coding agent without another bill.
Alternatives
OpenAI Codex CLI: common questions
- Is OpenAI Codex CLI worth it?
- For anyone already paying for ChatGPT, Codex CLI is a well-sandboxed terminal agent at no extra cost, on allowances OpenAI only estimates. We rate it 4.5 out of 5.
- How much does OpenAI Codex CLI cost?
- CLI is open source (Apache 2.0). Usage comes with ChatGPT Plus ($20/month), Pro ($100 to $500/month), Business ($20/user/month annual) and Enterprise, or pay-per-token with an API key.
- What are the downsides of OpenAI Codex CLI?
- Plus allowance quoted only as wide estimates; weekly limits apply but are not published; tuned for OpenAI models; models retire often; sandbox can fail inside Docker containers.
- Who is OpenAI Codex CLI best for?
- ChatGPT subscribers who want a terminal coding agent without another bill.
- How much does OpenAI Codex CLI cost for a team or in production?
- Plus $20 a month, Pro $100, $200 or $500 with no five-hour cap, Business $20 per user per month annually or $25 monthly, Enterprise on request; extra usage via credits whose dollar value depends on the plan. API-key use bills at API token prices.
- Is OpenAI Codex CLI safe for company data?
- Code stays local except what is sent to OpenAI as context; session transcripts are saved locally and can be capped. Telemetry is off by default. Training and retention follow your ChatGPT plan or API terms, which the Codex security page does not restate.
- What are the best OpenAI Codex CLI alternatives?
- The closest alternatives we have reviewed are OpenCode, Gemini CLI and goose.
Answers checked Oct 23, 2026.