# Codex CLI — OpenAI's terminal coding agent for inspecting, editing and running repository code from the shell.

> Source: The Agents Index — https://theagentsindex.com/codex-cli (structured, researched, re-verified)
> Facts last verified: 2026-09-02

Codex CLI is OpenAI's terminal client for the Codex coding agent, which reads a local repository, edits files and runs commands inside an OS-enforced sandbox. It also runs non-interactively through codex exec for scripts and CI pipelines.

| Fact | Value |
| --- | --- |
| Website | https://learn.chatgpt.com/docs/codex/cli |
| Price | from $8/month |
| Free tier | Yes |

Free plan is $0/month and is described as being for quick coding tasks; the usage table publishes local message allowances only from Plus upward, and image generation is stated as unavailable on Free.

## What it does

**Writes code** · Yes — Edits files and runs local tooling against the working repository.

> Work against your local repository: Let Codex inspect files, make edits, and run the tools already installed on your machine.
> — https://learn.chatgpt.com/docs/codex/cli · Why use Codex CLI, first bullet

**Debugs and fixes** · Yes — Documented first-task workflow includes debugging an issue.

> Describe what you want to accomplish. For example, ask Codex to explain the project, make a focused change, or help debug an issue.
> — https://learn.chatgpt.com/docs/codex/cli · Getting started, step 3 Start your first task

**Writes tests** · Yes — Documented CLI workflow for writing a unit test for a named function.

> Use this when you want to define the exact scope to test.
> — https://learn.chatgpt.com/docs/prompting · Write a test section, intro sentence above the CLI workflow

**Reviews code** · Yes — /review runs a dedicated reviewer over a diff, commit or branch without editing the tree.

> Run a dedicated review against uncommitted changes, a commit, or a base branch. Codex reports prioritized findings without modifying your working tree, so you can address risks before you commit or open a pull request.
> — https://learn.chatgpt.com/docs/codex/cli · See what Codex CLI can do, Review changes before they ship

**Whole-codebase work** · Partly — Documented for repository-wide exploration and multi-step plans; the vendor states no repo-wide migration guarantee.

> This can be particularly helpful for complex tasks that are highly parallel, such as codebase exploration or implementing a multi-step feature plan.
> — https://learn.chatgpt.com/docs/agent-configuration/subagents · Subagents, opening paragraph

**Ships it** · Partly — Locally it stops at edits plus commands you allow; pull requests are opened from Codex cloud or the GitHub Action.

> Create a PR directly from the cloud or pull changes locally to test and finish up.
> — https://learn.chatgpt.com/docs/prompting · Delegate refactor to the cloud workflow, step 5

## How much it does unattended

**Runs autonomously** · Yes — Approval prompts can be switched off entirely, including a no-sandbox full-access mode.

> You can disable approval prompts with `--ask-for-approval never` or `-a never` (shorthand).
> — https://learn.chatgpt.com/docs/agent-approvals-security · Run without approval prompts section

**Multi-agent** · Yes — Spawns parallel subagents and consolidates their results; /agent switches between threads.

> ChatGPT Work and Codex can run subagent workflows by spawning specialized agents in parallel and then collecting their results in one response.
> — https://learn.chatgpt.com/docs/agent-configuration/subagents · Subagents, opening paragraph

**Agent permissions** · Yes — OS-enforced sandbox with workspace-only writes, network off by default, and configurable approval policy.

> Codex CLI / IDE extension: OS-level mechanisms enforce sandbox policies. Defaults include no network access and write permissions limited to the active workspace.
> — https://learn.chatgpt.com/docs/agent-approvals-security · Sandbox and approvals, sandbox modes list

## Which models it runs on

**Claude** · No — Sign-in and model support are OpenAI models only; no Anthropic model appears in any documented model list.

> Codex supports two ways for a person to sign in when using OpenAI models:
> — https://learn.chatgpt.com/docs/auth · OpenAI authentication, first line

**GPT** · Yes — GPT-5.6 Sol, Terra and Luna are all marked available in Codex CLI, selected with --model.

> Codex offers three GPT-5.6 models: **Sol** for detail and polish, **Terra** as the everyday workhorse, and **Luna** for clear, repeatable work.
> — https://learn.chatgpt.com/docs/models · Choosing Sol, Terra, and Luna section

**Open models** · Yes — --oss runs Codex against a local Ollama or LM Studio provider.

> Codex can run against a local "open source" provider such as Ollama or LM Studio when you pass `--oss`.
> — https://learn.chatgpt.com/docs/config-file/config-advanced · OSS mode (local providers) section

**Model choice** · Partly — You pick the model per run and can define custom providers, but the first-party catalogue is OpenAI models only.

> A model provider defines how Codex connects to a model (base URL, wire API, authentication, and optional HTTP headers).
> — https://learn.chatgpt.com/docs/config-file/config-advanced · Model providers section

## Where you use it

**In your editor** · Yes — A separate Codex IDE extension shares the same login and MCP configuration as the CLI.

> The ChatGPT desktop app, Codex CLI, and IDE extension share this configuration. Once you configure your MCP servers, you can switch among those clients without redoing setup.
> — https://learn.chatgpt.com/docs/extend/mcp · Connect Codex to an MCP server section

**On the command line** · Yes — The terminal is the product's primary surface, installed via installer, npm or Homebrew.

> Inspect code, make changes, run commands, and automate repeatable work without leaving your terminal.
> — https://learn.chatgpt.com/docs/codex/cli · Codex CLI page subtitle

**In your pipeline** · Yes — codex exec runs non-interactively in pipelines, with JSONL output and API-key or workload-identity auth.

> Non-interactive mode lets you run Codex from scripts (for example, continuous integration (CI) jobs) without opening the interactive TUI.
> — https://learn.chatgpt.com/docs/non-interactive-mode · Non-interactive mode, opening paragraph

**In a browser** · Yes — Codex cloud is a hosted surface reachable from the browser and from the CLI via codex cloud.

> Run tasks in isolated cloud environments, work in parallel, and start work from the web, GitHub, GitLab, Linear, or Slack.
> — https://learn.chatgpt.com/docs/cloud · Codex cloud page subtitle

## Whose machine it runs on

**Self-hosted** · Partly — The agent binary runs on your machine or runner; inference is OpenAI-hosted unless you route it through your own AWS Bedrock account.

> When you configure a local ChatGPT Work or Codex surface with Amazon Bedrock as the model provider, the OpenAI-hosted Responses API isn't in the request path.
> — https://learn.chatgpt.com/docs/amazon-bedrock · How it works, first paragraph

**Open source** · Yes — CLI, SDK and app server are in openai/codex; the IDE extension and Codex cloud are not open source.

> OpenAI develops key parts of Codex in the open. That work lives on GitHub so you can follow progress, report issues, and contribute improvements.
> — https://learn.chatgpt.com/docs/open-source · Open Source, opening paragraph and Open-source components table (Codex CLI row: openai/codex)

## What it costs to run

**How it meters** · Yes — Per-token consumption expressed as credits per 1M tokens on ChatGPT plans; API-key auth bills raw API tokens.

> Usage is calculated in credits per million input tokens, cached input tokens, and output tokens.
> — https://learn.chatgpt.com/docs/pricing · FAQ, What are tokens and credits?

**Free tier** · Yes — A $0 Free ChatGPT plan includes Codex for quick tasks; no sales call.

> Free Explore Codex capabilities on quick coding tasks. $0 /month
> — https://learn.chatgpt.com/docs/pricing · Pricing options, Individual tab, Free plan card

**API access** · Yes — TypeScript and Python SDKs plus an app-server protocol drive local Codex threads programmatically.

> If you use Codex through Codex CLI, the IDE extension, or Codex cloud, you can also control it programmatically.
> — https://learn.chatgpt.com/docs/codex-sdk · Codex SDK, opening paragraph

**MCP server** · Partly — Codex is an MCP client for local and remote servers, but exposing Codex itself as an MCP server is deprecated in favour of the app server.

> `codex mcp-server` is deprecated. The [MCP server guide](https://learn.chatgpt.com/docs/mcp-server) remains available for existing integrations.
> — https://learn.chatgpt.com/docs/codex-sdk · Codex SDK, note above TypeScript library

**Bring your own key** · Yes — Sign in with an OpenAI API key, or point the provider at Amazon Bedrock with AWS-native credentials.

> You can also sign in to the ChatGPT desktop app, Codex CLI, or IDE extension with an API key. Get your API key from the OpenAI dashboard.
> — https://learn.chatgpt.com/docs/auth · Sign in with an API key section

## Buying it for a team

**A company can buy it** · Yes — Business is self-serve for 2+ users; Enterprise and Edu are sold through sales.

> Business Bring Codex into your startup or growing business. $20 / user / month*
> — https://learn.chatgpt.com/docs/pricing · Pricing options, Business / Enterprise tab, Business plan card

**Seat model** · Yes — Per-user pricing with a two-seat floor and no published ceiling; monthly billing costs $25 per user.

> *2+ users, billed annually. $25 per user per month when billed monthly.
> — https://learn.chatgpt.com/docs/pricing · Pricing options, Business / Enterprise tab, Business plan card footnote

**Pooled budget** · Partly — Credit-based workspace agreements draw from one shared pool; individual plans have per-user rate limits instead.

> For eligible credit-based agreements, Work activity draws from a shared pool of workspace credits.
> — https://learn.chatgpt.com/docs/enterprise/chatgpt-work-usage-and-cost · Usage and cost at a glance, first bullet

**Admin controls** · Yes — requirements.toml pins approval policy, sandbox modes, permission profiles, allowed MCP servers and web-search mode; available on every plan including API-key use.

> Requirements constrain security-sensitive settings (approval policy, approvals reviewer, automatic review policy, sandbox mode, permission profiles, web search mode, managed hooks, which MCP servers users can enable
> — https://learn.chatgpt.com/docs/enterprise/managed-configuration · Admin-enforced requirements (requirements.toml) section

**Audit log** · Partly — Compliance API audit logs are listed as Enterprise-only; Plus, Pro, Business and API-key use are marked unavailable.

> Audit logs and usage monitoring via the [Compliance API](https://chatgpt.com/public/admin/api-reference#tag/Codex%20Tasks)
> — https://learn.chatgpt.com/docs/pricing · Pricing options, Business / Enterprise tab, Enterprise & Edu plan card

**Single sign-on** · Partly — SAML SSO from Business upward; the feature matrix marks it unavailable on Plus, Pro and API-key auth. SCIM is Enterprise-only.

> A secure, dedicated workspace with essential admin controls, SAML SSO, and MFA
> — https://learn.chatgpt.com/docs/pricing · Pricing options, Business / Enterprise tab, Business plan card; matched by Feature availability row "SAML SSO, MFA, and workspace user management"

## What happens to your code

**Opt out of training** · Partly — Business, Enterprise and API-key usage are not trained on by default; the same matrix marks Plus and Pro unavailable.

> No training on your business data by default.
> — https://learn.chatgpt.com/docs/pricing · Pricing options, Business / Enterprise tab, Business plan card; Feature availability row "No training on API or business data by default"

**Data residency** · Partly — Retention and residency controls are Enterprise-only and apply only to eligible content and supported workloads.

> Data residency and inference residency apply only to eligible content and supported workloads, subject to the organization's agreement, region, and configuration.
> — https://learn.chatgpt.com/docs/enterprise/chatgpt-work-cloud-security · Data handling and retention, paragraph after the retention table

**Getting out** · Partly — Enterprise admins export supported records with published Bash and PowerShell download scripts; sessions are plain files on disk.

> Export supported records into an audit or investigation system.
> — https://learn.chatgpt.com/docs/enterprise/compliance-api · When to use the Compliance API, first bullet

**Certifications** · Yes — SOC 2 Type 2 report plus ISO 27001, 27017, 27018 and 27701 certification, with GDPR and CCPA listed on the trust portal.

> Our products are also ISO 27001, 27017, 27018, and 27701 certified. Request access to our SOC 2 Report below to learn more about our security controls and compliance activities.
> — https://trust.openai.com/ · Overview panel, and Compliance list (CCPA, GDPR, ISO/IEC 27001:2022, SOC 2 Type 2)

## Provenance

Every fact above comes from the vendor. Nothing here is independently corroborated yet.

## Coverage elsewhere

Pages about this product that the vendor does not control. The label states how independent each one is.

| Source | Kind | Read |
| --- | --- | --- |
| github.com | Platform record | 2026-08-23 |
| help.openai.com | A competitor's comparison | 2026-08-23 |
| help.openai.com | A competitor's comparison | 2026-08-23 |
| help.openai.com | A competitor's comparison | 2026-08-23 |
| help.openai.com | A competitor's comparison | 2026-08-23 |
| help.openai.com | A competitor's comparison | 2026-08-23 |
| help.openai.com | A competitor's comparison | 2026-08-23 |
| github.com | Platform record | 2026-08-23 |
| github.com | Platform record | 2026-08-23 |
| npmjs.com | Platform record | 2026-08-23 |

## What changed

- 2026-09-02 — Capabilities · Commercial terms · Free tier
- 2026-08-31 — Capabilities · Commercial terms · Free tier · Price
- 2026-08-23 — Alternatives · One-liner · Summary
- 2026-08-17 — Tag:multi-agent

## Correcting this record

Anything marked "Not established" is a question we have not answered — it is not a No. If you represent Codex CLI, or anything here is wrong or out of date, you can supply it with a source: the operations this site accepts from an agent are listed at https://theagentsindex.com/.well-known/agents.json — that catalogue needs no key to read, and each entry states its own auth.

Supplying evidence is free. Nothing that can be bought here changes what a field says, whether a gap is closed, or how this record is scored.
