OpenAI Codex icon

OpenAI Codex

Codex, OpenAI’s coding agent

Terminal Agents
Free plan
Included with ChatGPT plans; metered API
Visit OpenAI Codex

Codex brings GPT models into repository work. Use the CLI, IDE or desktop to edit and test code. Cloud delegation has separate eligibility: OpenAI includes local access with Free and Go and reserves cloud tasks for eligible plans.

If you maintain a GitHub project, document review rules in AGENTS.md. For example, ask the reviewer to check API compatibility whenever a pull request changes a response. That gives you a concrete criterion for comparing two patches.

Related tool · ChatGPT

Official sources

Last updated ·

Earlier evaluation · 2026-04

Quick answers

Is OpenAI Codex CLI free?
The software is free: it is open source and costs nothing to install. Using it is not. You sign in with a ChatGPT plan (OpenAI lists CLI access from Plus, $20/month, upward) or with an OpenAI API key billed at standard per-token rates. Free and Go plans list Codex only in the ChatGPT desktop app.
Is OpenAI Codex CLI open source?
Yes. The CLI lives at github.com/openai/codex under the Apache-2.0 license and is written mostly in Rust. The models, the IDE extension and Codex Cloud are not open source.
What is the latest version of OpenAI Codex CLI?
0.160.0, released on October 1, 2026 (checked October 5, 2026). OpenAI ships a new version every few days, so run codex --version to see yours, and update with npm i -g @openai/codex@latest or brew upgrade --cask codex.
Can I use Codex CLI with my own API key (BYOK)?
Yes. Run printenv OPENAI_API_KEY | codex login --with-api-key. You pay standard API prices per token, and Codex Cloud tasks are not available in this mode because they need a ChatGPT sign-in.
Which model does Codex CLI use?
OpenAI's docs recommend GPT-6.1 Sol for most work, GPT-6 Luna for cheaper repetitive tasks and GPT-6 Astra for the hardest problems. GPT-5.5 is retired from Codex on October 14, 2026.
Does Codex CLI run on Windows?
Yes, natively, with its own Windows sandbox. WSL2 is optional, and WSL1 is no longer supported.

How to install

  1. macOS or Linux (official install script)

    curl -fsSL https://chatgpt.com/codex/install.sh | sh
  2. Windows (PowerShell)

    irm https://chatgpt.com/codex/install.ps1 | iex
  3. Or with npm, on any OS

    npm install -g @openai/codex
  4. Or with Homebrew on macOS

    brew install --cask codex
  5. Sign in (ChatGPT account by default) and start the agent in your project folder

    codex login
    codex

Preview

OpenAI Codex interface

Detailed Evaluation

Ease of Use8.0
Code Quality8.8
Development Speed8.5
Flexibility9.2
Value for Money9.0
AI Power9.0

Key strengths

  • OpenAI's official open source agent

    Code on GitHub, open to contributions, with frequent releases (v0.120.0 in April 2026) and actively maintained by the OpenAI team.

  • Two authentication models

    You can use your ChatGPT Plus/Pro/Business/Enterprise account without paying for the API separately, or bring your own API key for isolated billing.

  • Configurable sandbox

    Control what the agent can read, write, and execute, with adjustable approval modes to balance speed and safety.

  • AGENTS.md and local skills

    You can instruct the agent at the repo level with AGENTS.md and define reusable skills in .codex/skills, just like other modern agents.

  • Native MCP

    Model Context Protocol is supported out of the box, letting you plug tools like Supabase, GitHub, Linear, or Notion without friction.

Limitations to consider

  • Less mature than Claude Code

    Claude Code has been in the terminal longer and has a slightly more developed ecosystem of skills and hooks than Codex CLI.

  • Non-trivial API cost

    If you use BYOK with top models, tokens add up fast; without a ChatGPT quota included, long sessions can get expensive.

  • CLI-only

    There's no graphical UI or native VS Code integration; if you want an IDE, look at Cursor or Windsurf.

  • Coexists with OpenAI Agents SDK

    OpenAI's strategy mixes Agents SDK (framework) and Codex CLI (product), which can create confusion about which to use when.

Standout Feature

Being the only OpenAI-backed CLI agent, open source and with dual authentication (ChatGPT account or BYOK), which makes it the natural choice for anyone who wants an official agent with no black box and aligned with OpenAI's latest models.

Comparison with Alternatives

Versus Claude Code it's less polished on skills but aligned with OpenAI; versus Cursor it offers a pure open source CLI experience, no IDE; versus Aider it has better MCP integration, official support, and much more frequent releases.

Ideal User

Advanced developers who work in the terminal, want an official open source OpenAI agent, care about controlling the sandbox and skills, and already pay for a ChatGPT plan they can draw quota from. Also a fit for teams that prefer BYOK to separate spend by project.

Learning Curve

Medium

Install and first commands are simple, but mastering AGENTS.md, skills, MCP servers, and sandbox policies takes reading docs and experimenting. Developers with prior Claude Code or Aider experience will adapt in hours.

Best For

  • Developers who live in the terminal and want an official OpenAI agent
  • Teams already paying for ChatGPT Plus/Business who want to leverage their quota
  • Projects that need to control the execution sandbox and write policies
  • Integrations with MCP servers and local skill definitions
  • Users who prefer an open source tool over a closed black box

Not Ideal For

  • People who prefer a graphical IDE over a CLI
  • Teams that need enterprise support with an SLA on the tool
  • Users who don't want to manage any file-based configuration

Technical Details

Languages

Any language supported by GPT-5 and successor models
Implemented in Rust, TypeScript, and Python

Frameworks

Works on any repo
Native MCP integration

Deployment

npm i -g @openai/codex
brew install --cask codex
GitHub Releases binaries (macOS, Linux)
CI via GitHub Actions
Launch:2025
Last updated:2026-04
Status:
Active
Visit OpenAI Codex