LLM Reference
CLITerminal & CLI agentsOpen Source

OpenAI Codex CLI

by OpenAI
Supports 7 models · CLI · Free open-source · Defaults: GPT-5.4

Decision note

OpenAI Codex CLI is OpenAI's open-source, command-line coding agent, first released in May 2025 and maintained in the open on GitHub. It runs OpenAI models directly in your terminal to read and edit files, run commands, and complete multi-step tasks inside a sandboxed environment. The CLI itself is free and open source; you pay only for the OpenAI API usage it consumes (or a ChatGPT plan where supported).

Overview

Open-source command-line coding agent released April 2025 that runs code, browses files, and executes multi-step tasks in a sandboxed environment using OpenAI models.

Try OpenAI Codex CLI

curl -fsSL https://chatgpt.com/codex/install.sh | sh

Best LLMs for this agent

GPT-5.4ChatGPT Plus

Default — latest frontier agentic coding model

Pricing and Provider Comparison

Agent access tiers

TierPriceIncludes
FreeFreeLimited Codex access
ChatGPT Go$8/moBasic Codex access, entry-level paid tier
ChatGPT Plus$20/moCodex included, message limits per 5hrs
ChatGPT Pro$200/moHighest priority, maximum message limits
ChatGPT Business$30/moWorkspace credits, admin controls
EnterpriseCustomUnlimited high-speed access, SSO, advanced security

Provider routes for recommended models

ModelProviderInput / 1MOutput / 1MNotes
GPT-5.4OpenAI API$2.50$15.00Batch pricing listed; Cache reads listed
GPT-5.4OpenRouter$2.5$15Cache reads listed
GPT-5.4Vercel AI Gateway$2.5$15Cache reads listed

Featured Model Specs

ModelLabReleasedContextReasoningOpenness
GPT-5.4OpenAI2026-03-051.05mYesProprietary
GPT-5.4 MiniOpenAI2026-03-05400kYesProprietary
GPT-5.3-CodexOpenAI2026-02-05400kYesProprietary
GPT-5.2 CodexOpenAI2025-12-18400kYesProprietary
GPT-5.2OpenAI2025-12-11400kYesProprietary

Model Compatibility Matrix

ModelLabDefaultAccess tierNotes
GPT-5.4OpenAIYesChatGPT PlusDefault — latest frontier agentic coding model
GPT-5.4 MiniOpenAINoChatGPT PlusSmaller frontier agentic coding model
GPT-5.3-CodexOpenAINoChatGPT PlusFrontier Codex-optimized agentic coding model
GPT-5.2 CodexOpenAINoChatGPT PlusFrontier agentic coding model based on GPT-5.2
GPT-5.2OpenAINoChatGPT PlusOptimized for professional work and long-running agents
GPT-5.1 Codex MaxOpenAINoChatGPT PlusCodex-optimized flagship for deep and fast reasoning
GPT-5.1 Codex MiniOpenAINoChatGPT PlusCheaper, faster, but less capable — optimized for Codex

Underlying Models

Capabilities

FeatureSupported
ChatYes
Agent modeYes
Multi-file editYes
AutocompleteNo
TerminalYes
Code reviewYes
Git integrationYes
Deploy integrationNo
Local modelsNo
Bring your own keyYes
MCP supportYes
Offline modeNo
IP indemnityNo
SSOYes
On-premNo

Compare to Similar Agent Surfaces

Explore Related Pages

Last reviewed: 2026-06-30. Data sourced from agent documentation and provider pages.