Codex CLI
Codex CLI is OpenAI's open-source terminal agent · GPT-powered, repo-aware, installed with npm.
Codex CLI is OpenAI's open-source terminal agent · GPT-powered, repo-aware, installed with npm.
Basic
Codex CLI launched April 2025 (not to be confused with the 2021 Codex model). Install via `npm i -g @openai/codex`; run `codex` in a repo. The agent reads your files, proposes changes, and executes shell commands. Built on o-series reasoning models with a custom "computer-using-agent" harness.
Deep
Codex CLI is Apache-2.0 licensed · same repo as the Codex IDE (VSCode) and Codex Cloud (web SaaS). The harness exposes shell commands, file diffs, and HTTP calls. Plans for MCP support shipped late 2025. Key differentiator vs Aider/Claude Code: deep integration with OpenAI's o-series reasoning models (o4, o5) which emit long multi-step plans before executing. Token cost is high · a single task may burn $2-$5.
Expert
Codex CLI uses the Responses API (OpenAI's structured tool-use endpoint) with a custom tool set: shell_exec, file_edit, file_read, web_fetch. Reasoning tokens are charged separately from output tokens, making it visibly more expensive than Claude Code or Aider. The Codex suite · CLI, IDE, Cloud · shares state via a cloud workspace, so users can hand off tasks between environments. OpenAI open-sourced the harness to establish a standard for computer-using agents.
Depending on why you're here
- ·Apache-2.0 harness from OpenAI · reference for o-series agent integration
- ·Uses Responses API + custom tool set
- ·Designed around reasoning-heavy models
- ·npm install · runs from the terminal
- ·High token cost · reasoning tokens billed separately
- ·Best when you want the latest o-series model in your IDE
- ·Strategic move: OpenAI shipping open-source tooling to shape the agent standard
- ·Sets template for reasoning-model agent UX
- ·Competes with Claude Code, Aider on terminal share
- ·OpenAI's official terminal AI coding tool
- ·Similar shape to Claude Code but uses GPT models
- ·Installed from npm · free to install but pay for API tokens
Codex CLI is OpenAI's answer to Claude Code · same shape, rival model. The terminal agent war is a proxy for frontier model loyalty.