---
title: Codex CLI
slug: codex-cli
url: "https://toolweight.com/options/codex-cli"
homepage: "https://developers.openai.com/codex/cli"
categories: coding-agents
last_verified: 2026-01-15
license: CC-BY-4.0
---

# Codex CLI

> OpenAI's open-source Rust agent, with the strongest local sandboxing on this page.

Codex CLI is an Apache-2.0 Rust binary that runs agentic coding locally, with OS-level sandboxing via Seatbelt on macOS and Landlock on Linux, the most serious containment story of any local harness here. It pairs with Codex cloud tasks, which run in OpenAI's own containers and open pull requests. Although tuned for the GPT-5 Codex family, the config accepts arbitrary OpenAI-compatible providers, so local models work.

## Identity

|  |  |
| --- | --- |
| Name | Codex CLI |
| Company | OpenAI |
| One-liner | OpenAI's open-source Rust agent, with the strongest local sandboxing on this page. |
| Site | https://developers.openai.com/codex/cli |
| Docs | https://developers.openai.com/codex |
| Repo | https://github.com/openai/codex |
| Founded | 2025 |
| Open source | Yes |
| Licence | Apache-2.0 |
| Brand | https://toolweight.com/vendors/OpenAI |
| Compared in | 1 |

## Where it is compared

### [Coding agents](https://toolweight.com/compare/coding-agents)
Ranked **#3 of 17** on default weights.
| Field | Value | Confidence | Verified | Source | Note |
| --- | --- | --- | --- | --- | --- |
| Surface | CLI, IDE extension, web, cloud delegate | Vendor-claimed | 2026-01-15 | https://developers.openai.com/codex | - |
| Default model | Latest GPT-5 Codex model | Inferred | - | - | Point release rotates; the Codex-tuned family is the constant. |
| Model breadth | one vendor + custom endpoint | Vendor-claimed | 2026-01-15 | https://github.com/openai/codex/blob/main/docs/config.md | First-class for OpenAI; arbitrary OpenAI-compatible providers configurable, including local servers. |
| Repo indexing | agentic grep | Community-reported | - | - | - |
| Plan mode | ◐ | Inferred | - | - | Plans internally and surfaces the plan, but there is no read-only approval gate before edits. |
| Checkpoint & undo | ◐ | Community-reported | - | - | Sessions resume, but there is no working-tree rollback beyond git. |
| Headless / CI | ● | Vendor-claimed | 2026-01-15 | https://developers.openai.com/codex/cli | codex exec is the non-interactive entry point. |
| Local models | ● | Community-reported | - | - | Via the OpenAI-compatible provider config; tool-use reliability depends entirely on the local model. |
| Where it stops | 4 | Inferred | - | - | The local CLI stops at rung 3; Codex cloud tasks push branches and open PRs. |
| MCP | ● | Vendor-claimed | 2026-01-15 | https://github.com/openai/codex/blob/main/docs/config.md | - |
| Subagents | ○ | Community-reported | - | - | No first-class child-agent primitive at our last pass. |
| Hooks | ◐ | Community-reported | - | - | Notification hooks exist; they cannot veto a tool call. |
| Skills / commands | ◐ | Community-reported | - | - | Custom prompt files plus AGENTS.md, short of a full skills system. |
| Background agents | ● | Inferred | 2026-01-15 | - | - |
| Opens PRs | ● | Inferred | 2026-01-15 | - | - |
| Permissions | allowlist + OS sandbox | Vendor-claimed | 2026-01-15 | https://github.com/openai/codex | Seatbelt on macOS, Landlock on Linux, with approval modes layered on top. |
| BYOK | ● | Inferred | 2026-01-15 | - | - |
| Licence | Apache-2.0 | Vendor-claimed | 2026-01-15 | https://github.com/openai/codex | - |
| Pricing model | subscription + token overage | Inferred | 2026-01-15 | - | Included with ChatGPT paid plans, or metered against an API key. |
| Entry price | $20 /seat/mo | Vendor-claimed | 2026-01-15 | https://openai.com/chatgpt/pricing/ | - |
| Token markup | ○ | Inferred | - | - | - |
| GitHub stars | 42,000 | Community-reported | - | - | Rounded; stars move weekly. |
| Terminal-Bench | - | Unknown | - | - | We previously carried 42.8% from the Terminal-Bench 1.0 era. It is superseded by 2.0, unsourced in our own file, and the harness it was run under was never stated, so it is out until we can name harness, model and benchmark version together. |
| Bench model | - | Unknown | - | - | - |
| Positioning | A coding agent that runs locally, in your terminal. | Vendor-claimed | - | https://developers.openai.com/codex/cli | - |
| First release | 2025-04-16 | Community-reported | - | - | Original TypeScript release; rewritten in Rust later that year. |

**Verdict.** The best containment story of any local harness, Seatbelt and Landlock are real boundaries, not an allowlist with good marketing. Weaker than Claude Code on orchestration primitives: no subagents, notification-only hooks, thinner custom-command support.

## Alternatives

- [Aider](https://toolweight.com/options/aider), Minimal terminal pair-programmer with a tree-sitter repo map and automatic git commits.
- [Amp](https://toolweight.com/options/amp), Sourcegraph's opinionated agent with no model picker and an ad-supported free tier.
- [Claude Code](https://toolweight.com/options/claude-code), Anthropic's terminal-first agent, with IDE, web and GitHub Action surfaces.
- [Cline](https://toolweight.com/options/cline), Open-source VS Code and JetBrains agent built around an explicit plan/act split.
- [Cursor](https://toolweight.com/options/cursor), VS Code fork with a real codebase index, background cloud agents and a CLI.
- [Devin](https://toolweight.com/options/devin), Fully delegated cloud engineer: file a task in Slack or the web app, get a PR back.
- [DIY harness](https://toolweight.com/options/diy-harness), Your own loop over a model API with an agent SDK, the build-it-yourself reference point.
- [Gemini CLI](https://toolweight.com/options/gemini-cli), Apache-2.0 terminal agent from Google with an unusually generous free tier.
- [GitHub Copilot (Agent HQ)](https://toolweight.com/options/github-copilot), Copilot's coding agent plus a control plane for running third-party agents on your repos.
- [Goose](https://toolweight.com/options/goose), Block's Apache-2.0 agent, MCP-native from the start, as both a CLI and a desktop app.
- [Grok Build](https://toolweight.com/options/grok-build), xAI's coding harness, launched July 2026, on this page but not yet verified.
- [Kilo Code](https://toolweight.com/options/kilo-code), Open-source VS Code agent in the Cline/Roo lineage, with an orchestrator mode and a CLI.

## Licence and attribution

Data from toolweight (https://toolweight.com), licensed CC-BY-4.0.

- Licence: [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/)
- Canonical HTML: https://toolweight.com/options/codex-cli
- Machine-readable: https://toolweight.com/options/codex-cli.md · https://toolweight.com/api/v1 · https://toolweight.com/mcp
- toolweight takes no affiliate revenue and sells no placements. Corrections: https://toolweight.com/suggest
