OpenAI Codex CLI is OpenAI’s official agentic coding assistant running directly in your terminal. Rewritten in Rust and shipped as a single codex binary, it ships both an interactive TUI mode and a non-interactive exec entry point designed for scripts, CI jobs, and agent escalation — the same pattern used by Claude Code and other top-tier coding agents.
With the highest agent support rating, Codex CLI can read and edit files across a workspace, run shell commands, orchestrate multi-step tasks, and consume Model Context Protocol (MCP) servers as first-class tools. Authentication supports both ChatGPT managed OAuth (with automatic token refresh) and direct API key mode via OPENAI_API_KEY, so the same binary works for individual developers, headless CI, and server-side agent harnesses.
Every action runs through a configurable sandbox: --sandbox read-only for analysis-only runs, workspace-write for scoped edits inside the current repository, or danger-full-access for trusted container environments. Paired with --approval-policy, these controls let you tune exactly how much autonomy the agent has on a given task — making Codex CLI a natural “second opinion” tool to delegate to from another agent when a problem needs a different perspective.