Tool Icon

OpenAI Codex CLI

4.1 (6 votes)
OpenAI Codex CLI

Tags

Coding Agent Terminal AI Rust GPT-5.2 DevOps 2026

Integrations

  • GitHub (Codex Cloud)
  • VS Code (Native Bridge)
  • Linear
  • Model Context Protocol (MCP)
  • Agent Skills Standard

Pricing Details

  • Included in ChatGPT Plus ($20/mo) and Pro ($200/mo).
  • Business/Enterprise tiers include advanced administrative controls and Zero Data Retention options.

Features

  • Native Rust binary with zero-dependency installation
  • GPT-5.2-Codex with Context Compaction technology
  • Agent Skills (agentskills.io) portability
  • OS-level sandboxing (Landlock/seccomp/sandbox-exec)
  • Model Context Protocol (MCP) for external context retrieval

Description

Codex CLI v0.80: Agentic Terminal Evolution

As of January 2026, the Codex CLI has completed its transition to a standalone Rust architecture, integrating the Model Context Protocol (MCP) for deep environment awareness. The system now utilizes GPT-5.2-Codex, featuring native context compaction for long-horizon engineering tasks 📑.

Orchestration & Sandbox Architecture

The CLI functions as a local coordinator, proposing multi-step execution plans in a sandboxed Terminal User Interface (TUI) before applying any changes to the disk 📑.

  • Native Isolation: Secure execution is enforced via Landlock and seccomp on Linux, and sandbox-exec on macOS, providing a hardware-level barrier during automated tests and scripts 📑.
  • Responses API Integration: Utilizes the 2026 'responses' endpoint, which supports server-side session persistence and semantic event streaming for real-time code diffs 📑.
  • Agent Skills (agentskills.io): Implements the cross-platform skills standard, allowing developers to share modular automation scripts (e.g., CI/CD hardening, SQL migrations) across team environments 📑.

⠠⠉⠗⠑⠁⠞⠑⠙⠀⠃⠽⠀⠠⠁⠊⠞⠕⠉⠕⠗⠑⠲⠉⠕⠍

Contextual Intelligence & Privacy

By leveraging MCP, Codex CLI pulls metadata from local documentation, Jira tickets, and database schemas to ground its reasoning without transmitting sensitive raw data to the cloud 🧠.

  • Context Compaction: GPT-5.2-Codex uses recursive summarization of the KV-cache, maintaining reasoning logic for 400K+ context windows with 30% lower token overhead 📑.
  • Local History Management: Encrypted session transcripts are stored in ~/.codex/sessions/, ensuring state recovery even after terminal crashes 📑.

Evaluation Guidance

Technical leads should enforce approval_mode = "manual" in config.toml for all production-adjacent repositories. Verify that custom Agent Skills are signed to prevent the execution of malicious automation logic. Organizations using local LLM gateways must ensure compatibility with the event-driven Responses API schema 📑.

Tool Pros and Cons

Pros

  • Complex command generation
  • Automated scripting
  • Command explanation
  • Context-aware
  • Rapid prototyping

Cons

  • API dependency
  • Prompt engineering needed
  • Output requires review

Pricing (2026) – OpenAI Codex CLI

Last updated: 22.01.2026

Plus

$20 / month
  • Power a few focused coding sessions each week
  • Codex on the web, in the CLI, in the IDE extension, and on iOS
  • Cloud-based integrations like automatic code review and Slack integration
  • The latest models, including GPT-5.2-Codex
  • GPT-5.1-Codex-Mini for up to 4x higher usage limits for local messages
  • Flexibly extend usage with ChatGPT credits

Pro

$200 / month
  • Rely on Codex for daily full-time development
  • Everything in Plus
  • Priority request processing
  • 6x higher usage limits for local and cloud tasks
  • 10x more cloud-based code reviews

Business

$30 / user/month
  • Bring Codex into your startup or growing business
  • Everything in Plus and
  • Larger virtual machines to run cloud tasks faster
  • Flexibly extend usage with ChatGPT credits
  • A secure, dedicated workspace with essential admin controls, SAML SSO, and MFA
  • No training on your business data by default

GPT-5

$1.75 / 1M tokens
  • The best model for programming and agent tasks in various industries
  • Input price. Output: $14.00
  • Cached Input: $0.175

GPT-5.2 pro

$21 / 1M tokens
  • The smartest and most accurate model in its answers
  • Input price. Output: $168.00

GPT-5 mini

$0.25 / 1M tokens
  • A faster and more affordable version of GPT-5 is optimal for tasks with clear requirements
  • Input price. Output: $2.00
  • Cached Input: $0.025

GPT-4.1

$3 / 1M tokens
  • Price for additional training
  • Input price. Output: $12.00
  • Cached Input: $0.75
  • Training: $25.00

GPT-4.1 mini

$0.80 / 1M tokens
  • Price for additional training
  • Input price. Output: $3.20
  • Cached Input: $0.20
  • Training: $5.00

GPT-4.1 nano

$0.20 / 1M tokens
  • Price for additional training
  • Input price. Output: $0.80
  • Cached Input: $0.05
  • Training: $1.50

o4-mini

$4 / 1M tokens
  • Price for additional training with reinforcement
  • Input price. Output: $16.00
  • Cached Input: $1.00
  • Tuition: $100.00
Chat