OpenAI Codex CLI
Codex CLI is OpenAI's terminal-based coding agent (open-source), comparable to Claude Code. Uses GPT-4/GPT-5/o-series models. Configuration via ~/.codex/config.toml; supports custom commands (slash-style) and approval modes.
Codex CLI is the same idea as Claude Code with a different engine — Toyota and Honda, both reliable, different driving feel. MCP is the gas pump that fills both.
Architecture similar to Claude Code: a harness wrapping the OpenAI API with tool execution, a permission system (read-only vs write vs bypass), and config files. Codex supports MCP servers — same protocol as Claude Code, so most servers work in both. Differences: model family (OpenAI rather than Anthropic), config syntax (TOML vs JSON), terminology (custom commands vs skills). Codex was open-sourced in 2025 with a clear extension model.
Model differences matter: GPT-4/5 has a different style — more terse by default, sometimes more aggressive about acting without verification. o-series adds reasoning tokens (hidden chain-of-thought) for harder problems but at higher cost. Codex's permission/sandbox modes: 'read-only' (consultative), 'auto' (default — read, edit, run commands in working dir with user approval as needed), and 'full-auto' / '--dangerously-bypass-approvals-and-sandbox' (no approvals). Custom commands are markdown files like Claude skills but with a different convention. Some MCP server differences: Codex uses 'tools' frame, Claude uses native tool API; both interoperate via MCP. Cost: GPT-4 is comparable per-token to Sonnet; o-series can be more expensive due to reasoning tokens.
Codex CLI is OpenAI's open-source terminal agent, conceptually similar to Claude Code but using GPT-4/5/o-series models. Same overall pattern: harness + tools + permission system + config file. Both support MCP, so most MCP servers work in either. The choice between them is mostly model preference — Claude tends to be more cautious and verbose by default, GPT models are sometimes more terse and aggressive. I use both depending on the task and switch primarily based on model strengths for the specific problem.
Assuming Codex commands and Claude skills are interchangeable. They share concepts (markdown-with-frontmatter, on-demand invocation) but file layouts and conventions differ. Migrating between them is mechanical but not zero-effort.