# OpenAI Codex — OpenAI's coding agent across terminal, IDE, desktop app and cloud, included in ChatGPT plans.

> Source: The Agents Index — https://theagentsindex.com/openai-codex (structured, researched, re-verified)

Codex is OpenAI's coding agent for inspecting, editing, running and reviewing code from a terminal, an IDE extension, the ChatGPT desktop app and the web. Cloud tasks run in hosted environments and open pull requests.

**Not for:** Teams that want a non-OpenAI model or a predictable bill. Usage is capped per five hours and metered in credits beyond that.

**Best for:** Developers who want one coding agent in their terminal, IDE and the cloud

| Fact | Value |
| --- | --- |
| Website | https://openai.com/codex/ |
| Category | Coding agents |
| API | Yes |
| Open source | Partly |
| Price | $8 a month |
| Price source | https://learn.chatgpt.com/docs/pricing |
| Price checked | 24 October 2026 |
| MCP server | Partly |
| Self-host | Partly |
| Facts | 38 facts from 17 sources |
| Facts checked | 24 October 2026 |

Screenshot of OpenAI Codex: https://theagentsindex.com/img/1920/screenshots/openai-codex.webp, captured 27 October 2026

**What we checked**

- Pages last read: 24 October 2026
- Facts checked: 38 facts (From 17 sources)
- AI answers: Named in 9 of 151 (Our October check)

## What we checked on OpenAI Codex

### What it does

**Writes code** · Yes — Codex authors new code from a prompt across CLI, IDE, desktop app and cloud tasks, editing files in the repository it is pointed at.

> Inspect code, make changes, run commands, and automate repeatable work without leaving your terminal.
> — https://learn.chatgpt.com/docs/codex/cli · Codex CLI, 'Inspect, edit, and run code from your terminal' section, checked 24 October 2026

**Debugs and fixes** · Yes — The docs give a bug-fixing workflow where Codex reproduces the failure locally, proposes a patch and runs checks, so it lands fixes rather than only describing them.

> Use this when you have a failing behavior you can reproduce locally.
> — https://learn.chatgpt.com/docs/prompting · Prompting, 'Fix a bug' workflow section, checked 24 October 2026

**Writes tests** · Yes — A documented workflow has Codex write a unit test for a selected function following the conventions of existing tests, in the IDE or the CLI.

> Use this when you want to define the exact scope to test.
> — https://learn.chatgpt.com/docs/prompting · Prompting, 'Write a test' workflow section, checked 24 October 2026

**Reviews code** · Yes — A dedicated reviewer reads a diff someone else wrote and reports prioritized findings without touching the tree; GitHub PR review is GA, GitLab merge requests are in preview.

> Codex starts a dedicated reviewer that reads the selected diff and reports prioritized, actionable findings without changing your working tree.
> — https://learn.chatgpt.com/docs/code-review · Code review, 'Review local changes' section, CLI mode, checked 24 October 2026

**Whole-codebase work** · Partly — Cloud tasks take whole repositories and the local review pane spans several Git repositories, but no page states a repository size or file-count ceiling for a migration.

> Choose repositories. Codex inspects the project, works through setup, and asks you for missing details or access.
> — https://learn.chatgpt.com/docs/cloud · Codex Cloud, 'Why use Codex Cloud' bullet 'Start with your project', checked 24 October 2026

**Ships it** · Partly — Cloud tasks can commit or open a pull request, and the GitHub Action posts results in CI, but reviewing in chat explicitly does not merge and no page claims deployment.

> Reviewing a pull request in chat doesn't post comments, approve it, or merge it.
> — https://learn.chatgpt.com/docs/code-review · Code review, 'Share feedback and follow up' section, checked 24 October 2026

### How much it does unattended

**Runs autonomously** · Partly — Cloud tasks keep working unattended and the approval policy can be set to never stop, but the default local mode pauses at the sandbox boundary and asks.

> For most work, start with **Ask for approval**. It lets ChatGPT work within the current workspace and pauses before reaching beyond that boundary.
> — https://learn.chatgpt.com/docs/permission-modes · Permissions, 'Permission modes' intro, checked 24 October 2026

**Multi-agent** · Yes — Codex spawns parallel subagents whose results it consolidates into one response; the docs warn each subagent does its own model and tool work, so runs cost more tokens.

> 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, checked 24 October 2026

**Agent permissions** · Yes — A sandbox sets which files and networks commands may touch while an approval policy decides when it stops; modes run from read-only to danger-full-access with approvals off.

> The **sandbox** defines which files and network resources ChatGPT can access. - **Approvals** determine when ChatGPT pauses before an action or sends the request to automatic review.
> — https://learn.chatgpt.com/docs/permission-modes · Permissions, 'How permissions work' bullets, checked 24 October 2026

### Which models it runs on

**GPT** · Yes — The model picker and --model flag select OpenAI GPT models, with GPT-6.1 Sol recommended for complex agentic coding and Luna for focused repeatable tasks.

> For complex coding and agentic workflows, use GPT-6.1 Sol when available to your account and client. Use Luna for focused, repeatable tasks.
> — https://learn.chatgpt.com/docs/models · Models, 'Recommended models' section, checked 24 October 2026

**Model choice** · Partly — You choose the model and reasoning effort per session, and can route requests through Amazon Bedrock or a company gateway, but every model the pages name is an OpenAI model.

> Codex uses the configured `model_provider` to choose which models appear in the model picker
> — https://learn.chatgpt.com/docs/amazon-bedrock · Amazon Bedrock, 'Choose a model' section, checked 24 October 2026

### Where you use it

**In your editor** · Yes — A Codex IDE extension is a first-class surface, available on Plus, Pro, Business, Enterprise and with an API key, and shares MCP configuration with the CLI.

> The ChatGPT desktop app, Codex CLI, and IDE extension support MCP servers and share MCP configuration for the same Codex host.
> — https://learn.chatgpt.com/docs/extend/mcp · Model Context Protocol, 'Supported MCP features' intro, checked 24 October 2026

**On the command line** · Yes — The Codex CLI is the primary terminal surface, installed by script, npm or Homebrew, with an interactive TUI and a non-interactive codex exec mode.

> Use Codex interactively or call codex exec from repeatable workflows and pipelines.
> — https://learn.chatgpt.com/docs/codex/cli · Codex CLI, 'Why use Codex CLI' bullet 'Compose with scripts and CI', checked 24 October 2026

**In your pipeline** · Yes — An official GitHub Action runs codex exec in CI to apply patches or post reviews, and automatic cloud review can comment on a pull request before you open it.

> Use the Codex GitHub Action (`openai/codex-action@v1`) to run Codex in CI/CD jobs, apply patches, or post reviews from a GitHub Actions workflow.
> — https://learn.chatgpt.com/docs/github-action · Codex GitHub Action, opening paragraph, checked 24 October 2026

**In a browser** · Yes — Cloud tasks are started and reviewed from ChatGPT on the web, mobile or the desktop app, with each task getting its own workspace.

> Give Codex coding tasks to work through in the cloud, from investigating bugs to building features. Review changes and continue from the web, mobile, or desktop app.
> — https://learn.chatgpt.com/docs/cloud · Codex Cloud, 'Run coding tasks in the cloud' intro, checked 24 October 2026

### Whose machine it runs on

**Self-hosted** · Partly — The CLI, SDK and app server run on your own machine and can be pointed at your own gateway or AWS account, but the cloud execution environment is OpenAI-operated only.

> Customers don't provide, host, or manage Work Cloud containers.
> — https://learn.chatgpt.com/docs/enterprise/chatgpt-work-cloud-security · ChatGPT Work cloud security, 'Where cloud tasks run' section, checked 24 October 2026

**Open source** · Partly — The CLI, both SDKs, the skills, plugins and app-server sources are on GitHub, while the IDE extension and Codex cloud are listed as not open source.

> IDE extension | - | Not open source | Codex cloud | - | Not open source
> — https://learn.chatgpt.com/docs/open-source · Open Source, 'Open-source components' table, last rows, checked 24 October 2026

**Licence** · Partly — Mixed: the CLI, SDKs and app server are developed in the open on GitHub, the IDE extension and cloud are not, and the repo refuses outside code contributions.

> It doesn't accept external code contributions or pull requests.
> — https://learn.chatgpt.com/docs/open-source · Open Source, 'Where to report issues and request features' closing paragraph, checked 24 October 2026

**Open-source runtime** · Partly — The open-source CLI still needs credentials: a ChatGPT sign-in or an OpenAI API key, or AWS Bedrock credentials, which is the one path that needs no OpenAI account.

> Users authenticate with a Bedrock API key or AWS IAM credentials. They do not use ChatGPT sign-in or `OPENAI_API_KEY` for this provider.
> — https://learn.chatgpt.com/docs/amazon-bedrock · Amazon Bedrock, 'How it works' callout, checked 24 October 2026

**Runs in your cloud** · Partly — Local surfaces can send model requests to OpenAI models in your own AWS account via Bedrock or your own LLM gateway, but cloud tasks and hosted Work are unavailable on that route.

> Hosted ChatGPT Work on the web, Codex cloud, and features that depend on OpenAI-hosted cloud services or cloud-managed discovery aren't currently available.
> — https://learn.chatgpt.com/docs/amazon-bedrock · Amazon Bedrock, 'Feature availability' section, checked 24 October 2026

### Building with it

**SDK languages** · Yes — Two official SDKs: Python (3.10+, drives the local app server over JSON-RPC) and TypeScript (Node 18+, server-side), both controlling local Codex threads.

> The Python SDK controls the local Codex app-server over JSON-RPC. It requires Python 3.10 or later.
> — https://learn.chatgpt.com/docs/codex-sdk · Codex SDK, 'Python library' section, checked 24 October 2026

**Tracing and evals** · Yes — Local execution emits OpenTelemetry events to a collector you configure, and Enterprise workspaces stream codex_log records; the docs warn neither is a complete record of every action.

> Local execution also generates OpenTelemetry (OTel) events, which you can collect by configuring an OTel collector endpoint.
> — https://learn.chatgpt.com/docs/enterprise/compliance-api · Compliance API, 'Audit records for Local computer access with Work Cloud' section, checked 24 October 2026

### What it costs to run

**How it meters** · Yes — Two models at once: a per-seat subscription that includes usage, plus credits metered in credits per million input, cached and output tokens once the included limits run out.

> The rates below are for Standard speed, quoted in credits per million input tokens, cached input tokens, and output tokens.
> — https://learn.chatgpt.com/docs/pricing · Pricing, 'Token rates' section, checked 24 October 2026

**Cost of one job** · Partly — A developer-month starts at $8 (Go) or $20 (Plus); Plus buys roughly 15-160 local GPT-6.1 Sol messages per five hours, and the vendor says similar tasks can cost very different amounts.

> Tasks that look similar can consume different amounts of your allowance. Model choice, context, reasoning, tool use, retrieval, and caching all affect usage, so prompt length alone isn't a reliable estimate.
> — https://learn.chatgpt.com/docs/pricing · Pricing FAQ, 'What are the usage limits for my plan?', checked 24 October 2026

**Free tier** · Yes — A standing $0 Free plan gives Codex on quick coding tasks in the desktop app with GPT-6 Luna, subject to rollout; no sales call is involved.

> Free | Explore Codex capabilities on quick coding tasks. | $0 /month
> — https://learn.chatgpt.com/docs/pricing · Pricing, Individual plan cards, Free card, checked 24 October 2026

**API access** · Yes — You can drive Codex from your own stack with the TypeScript and Python SDKs, codex exec, the app-server protocol and the GitHub Action, authenticating with an API key.

> 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, checked 24 October 2026

**MCP server** · Partly — Codex is an MCP client: it connects to STDIO and streamable-HTTP servers with OAuth. Exposing Codex itself as an MCP server for another agent was removed in favour of the app server.

> The `codex mcp-server` command and standalone `codex-mcp-server` binary have been removed. Use the [Codex app server] for existing integrations.
> — https://learn.chatgpt.com/docs/codex-sdk · Codex SDK, callout above 'TypeScript library', checked 24 October 2026

**Bring your own key** · Yes — Sign in with your own OpenAI API key and pay API rates, or route requests through your own Bedrock account or company gateway credential instead of a ChatGPT subscription.

> 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 · Authentication, 'Sign in with an API key' section, checked 24 October 2026

### Buying it for a team

**A company can buy it** · Yes — Business is sold to organisations from two users up, and Enterprise/Edu is quote-only through sales with workspace-wide security controls.

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

**Seat model** · Yes — Priced per user per month with a two-seat floor: $20 per user billed annually, $25 per user when billed monthly, and no published seat ceiling.

> *2+ users, billed annually. $25 per user per month when billed monthly.
> — https://learn.chatgpt.com/docs/pricing · Pricing, Business card footnote, checked 24 October 2026

**Pooled budget** · Partly — Business, Edu and Enterprise buy workspace credits that members draw on, and eligible Enterprise and Edu admins cap each user; individual Plus and Pro buy their own credits.

> Business, Edu, and Enterprise plans with flexible pricing can purchase additional workspace credits to continue working.
> — https://learn.chatgpt.com/docs/pricing · Pricing FAQ, 'What happens when you hit usage limits?', checked 24 October 2026

**Admin controls** · Yes — Admins set Agent Security policies that constrain approvals, web search, MCP hooks and sandbox requirements, and can force the login method or lock users to one workspace.

> In managed environments, admins may restrict how users are allowed to authenticate:
> — https://learn.chatgpt.com/docs/auth · Authentication, 'Enforce a login method or workspace' section, checked 24 October 2026

**Audit log** · Partly — Enterprise and Edu workspaces stream append-only compliance records including codex_log events, but the docs say not every command, file operation or approval appears in an export.

> Don't assume every shell command, browser interaction, app invocation, file operation, or approval appears in a customer-visible compliance export.
> — https://learn.chatgpt.com/docs/enterprise/chatgpt-work-cloud-security · ChatGPT Work cloud security, 'Audit and compliance visibility', checked 24 October 2026

**Single sign-on** · Yes — SAML SSO comes with the Business plan alongside MFA; Enterprise adds SCIM provisioning and RBAC. The pages do not name OIDC for workspace sign-in.

> A secure, dedicated workspace with essential admin controls, SAML SSO, and MFA
> — https://learn.chatgpt.com/docs/pricing · Pricing, Business card feature bullets, checked 24 October 2026

### What happens to your code

**Opt out of training** · Partly — Business, Enterprise and Edu workspace data is not used for training by default; the vendor makes that commitment for those plans and not for the individual Free, Go, Plus or Pro tiers.

> Business, Enterprise, and Edu workspace data is encrypted in transit and at rest and is not used to train OpenAI models by default.
> — https://learn.chatgpt.com/docs/enterprise/chatgpt-work-cloud-security · ChatGPT Work cloud security, 'Security at a glance' bullets, checked 24 October 2026

**Data residency** · Partly — Data and inference residency controls exist for Enterprise, but cover only eligible content, regions and workloads; residency also disables local computer access, and Work is unsupported with UAE inference residency.

> 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 · ChatGPT Work cloud security, 'Data handling and retention', checked 24 October 2026

**Getting out** · Partly — Member self-export is an admin-controlled permission and deleted chats are scheduled for deletion within 30 days, but retention differs per data class and credit expiry is not stated.

> Deleted chats are generally scheduled for permanent deletion within 30 days, subject to published security, legal, and de-identification exceptions.
> — https://learn.chatgpt.com/docs/enterprise/chatgpt-work-cloud-security · ChatGPT Work cloud security, retention table, 'Work conversations' row, checked 24 October 2026

**Certifications** · Partly — The pages document encryption in transit and at rest, no training on business data by default and conditional HIPAA/BAA coverage, but name no SOC 2 or ISO 27001 certification.

> HIPAA and Business Associate Agreement coverage depend on the features and agreement in use.
> — https://learn.chatgpt.com/docs/enterprise/work-admin-faq · ChatGPT Work admin FAQ, Compliance section, checked 24 October 2026

## OpenAI Codex price and terms

**Terms**

- Free to start: Partly — Standing $0 Free plan, not a trial, but limited to GPT-6 Luna at Standard speed in the desktop app and subject to rollout; image generation is not available on Free, and the plan feature matrix covers only Plus, Pro, Business, Enterprise and API key.

**What needs a higher plan**

- Business, Enterprise & Edu: Pooled budget
- Enterprise & Edu: Audit log, Data residency

## For AI agents

- MCP server: Partly
- API: Yes

Read on https://learn.chatgpt.com/docs/pricing, 24 October 2026.

## OpenAI Codex alternatives

- [Factory](https://theagentsindex.com/factory-ai) · From $20 a month: Droid coding agents that run in the desktop app, CLI, IDEs, CI and Factory-managed cloud computers.
- [Google Antigravity CLI](https://theagentsindex.com/antigravity-cli) · Free plan, then $30 a seat a month: Terminal agent (agy) that runs Google Antigravity coding agents and parallel subagents.
- [Junie](https://theagentsindex.com/junie) · Free plan, then €10 a seat a month (about $11): JetBrains coding agent for the terminal, JetBrains IDEs and CI, running on hosted or your own model keys.
- [Muse Code](https://theagentsindex.com/muse-code) · From $5 a month: Meta's terminal and CI coding agent, built on the Muse Spark model.
- [OpenCode](https://theagentsindex.com/opencode) · Free plan, then $10 a month: Open source AI coding agent for the terminal, desktop, IDE and browser, with any LLM provider.
- [Cursor](https://theagentsindex.com/cursor) · Free plan, then $8 a month: Coding agent in a desktop editor, terminal CLI, cloud VMs and CI, priced per seat plus token usage.
- [Letta](https://theagentsindex.com/letta) · Free plan, then $20 a month: Stateful agent harness, cloud and SDK for agents with persistent, git-versioned memory.
- [Aider](https://theagentsindex.com/aider) · Free plan: Open-source terminal AI pair programmer that edits your local git repo.
- [Devin](https://theagentsindex.com/devin) · Free plan, then $20 a month: Cloud AI software engineer that takes a ticket, works in its own VM, and opens a pull request.

All 9 publish a price.

[All 9 alternatives](https://theagentsindex.com/openai-codex/alternatives/)

## Questions about OpenAI Codex

### How much does OpenAI Codex cost?

OpenAI Codex costs $8 a month. From learn.chatgpt.com/docs/pricing, checked 24 October 2026.

### Does OpenAI Codex have an API or an MCP server?

It has an API. It has a limited MCP server.

### Is OpenAI Codex open source, and can you host it yourself?

Part of it is open source. You can host part of it yourself.

### What have we checked on OpenAI Codex?

38 facts, under these headings: What it does, how much it does unattended, which models it runs on, where you use it, whose machine it runs on, building with it, what it costs to run, buying it for a team, what happens to your code.

### How do we check OpenAI Codex?

We hold 38 facts on OpenAI Codex, quoted from 17 pages. Facts and price last checked 24 October 2026.

How we check every listing: https://theagentsindex.com/methodology/

## Sources and changes

Last changed 26 October 2026

**Sources on learn.chatgpt.com** (17)

- https://learn.chatgpt.com/docs/pricing, read 24 October 2026
- https://learn.chatgpt.com/docs/enterprise/chatgpt-work-cloud-security, read 24 October 2026
- https://learn.chatgpt.com/docs/amazon-bedrock, read 24 October 2026
- https://learn.chatgpt.com/docs/codex-sdk, read 24 October 2026
- https://learn.chatgpt.com/docs/auth, read 24 October 2026
- https://learn.chatgpt.com/docs/cloud, read 24 October 2026
- https://learn.chatgpt.com/docs/code-review, read 24 October 2026
- https://learn.chatgpt.com/docs/codex/cli, read 24 October 2026
- https://learn.chatgpt.com/docs/open-source, read 24 October 2026
- https://learn.chatgpt.com/docs/permission-modes, read 24 October 2026
- https://learn.chatgpt.com/docs/prompting, read 24 October 2026
- https://learn.chatgpt.com/docs/agent-configuration/subagents, read 24 October 2026
- https://learn.chatgpt.com/docs/enterprise/compliance-api, read 24 October 2026
- https://learn.chatgpt.com/docs/enterprise/work-admin-faq, read 24 October 2026
- https://learn.chatgpt.com/docs/extend/mcp, read 24 October 2026
- https://learn.chatgpt.com/docs/github-action, read 24 October 2026
- https://learn.chatgpt.com/docs/models, read 24 October 2026

## Is this yours?

AI assistants like ChatGPT and Claude opened The Agents Index pages 2,746 times in September. Claim OpenAI Codex: https://theagentsindex.com/claim/openai-codex

Report an error if a fact is wrong: hello@theagentsindex.com, subject "Report an error: OpenAI Codex (openai-codex)".
