OpenAI Codex
OpenAI's coding agent for terminal, editor, desktop app and cloud, billed via a ChatGPT plan or API key.
About
Codex is OpenAI's coding agent. It reads a repository, edits files, runs commands and reviews pull requests. It runs locally through a command-line tool, an IDE extension and the ChatGPT desktop app, or remotely in Codex cloud, where each task gets its own virtual machine and keeps running after the laptop is closed. Integrations cover GitHub, GitLab (beta), Slack and Linear.
Access comes with a ChatGPT plan or with an OpenAI API key billed per token. An API key only covers local work: Codex cloud and the cloud integrations such as GitHub code review and Slack need a ChatGPT sign-in. The CLI, SDK and app server are open source, but the repository does not accept outside pull requests, and the IDE extension and Codex cloud are closed.
Limits are loosely stated. OpenAI publishes message estimates per five hours for Plus and Business rather than fixed caps, says weekly limits may also apply without giving numbers, and gives no allowance figures at all for Free and Go. On individual plans, content may be used for model training unless you opt out.
Before you adopt it
6 of 6 key facts checked- API or SDKWhether you can build on it or only use it by hand
- Yes. The Codex SDK drives local Codex agents from code: a TypeScript package (@openai/codex-sdk, Node.js 18 or later, server-side use) and a Python package (openai-codex, Python 3.10 or later). An app server is offered for building custom clients, and the docs also list a non-interactive mode and a GitHub Action. The older 'codex mcp-server' command has been removed; existing integrations are told to move to the app server.Checked Nov 27, 2026 · source
- Underlying modelsSets quality, cost and which provider sees your data
- OpenAI's own GPT models. The models page recommends GPT-6.2 Astra for demanding work and GPT-6.2 Sol for everyday work, and also lists GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra and GPT-6 Luna. Free and Go plans get GPT-6 Luna. GPT-5.5 and older models have been retired for ChatGPT sign-in; GPT-5.5 remains for API-key sessions. With an API key, the models you can pick follow your API organisation and project.Checked Nov 27, 2026 · source
- Data retention and trainingWhether it is safe to paste proprietary work
- It depends on the account type. OpenAI says it does not train on business data by default: this covers ChatGPT Business, Enterprise, Edu and the API Platform, unless the customer opts in. API inputs and outputs may be kept for up to 30 days, and zero data retention can be requested for eligible endpoints with a qualifying use case. On Business and Enterprise, admins set retention and deleted conversations are removed within 30 days. This page does not name Codex specifically. On individual plans (Free, Go, Plus, Pro) the ChatGPT pricing page lists training as 'opt-out available', meaning content may be used for training unless you turn it off.Checked Nov 27, 2026 · source
- Free-tier limits and real priceCaps and per-seat or usage price, dated
- As of 2026-11-27: Free (US$0) and Go (US$8 a month) include limited Codex use with the GPT-6 Luna model in the desktop app, subject to rollout; no allowance numbers are published. Plus is US$20 a month and adds web, CLI, IDE extension, iOS and cloud integrations. Pro comes in US$100, US$200 and US$500 a month tiers. Business is US$20 per user a month billed annually (2 or more users) or US$25 billed monthly. Enterprise and Edu are priced by sales. With an API key you pay standard per-token API rates instead, for example US$2 input, US$0.10 cached input and US$10 output per million tokens on GPT-6.2 Sol. Extra usage beyond a plan's allowance is paid for with credits; the price per credit is not listed and depends on plan or agreement.Checked Nov 27, 2026 · source
- MCP and extensibilityWhether it connects to your own tools
- Codex connects to MCP servers as a client. The CLI, IDE extension and ChatGPT desktop app share one configuration in ~/.codex/config.toml; a project-level .codex/config.toml is read only for trusted projects. It supports local STDIO servers and Streamable HTTP servers, with bearer-token or OAuth sign-in for HTTP. Default timeouts are 10 seconds for server startup and 60 seconds per tool call. Limits: ChatGPT on the web does not read the local config and reaches remote MCP tools through plugins instead, local MCP servers may not be available in cloud runs, and OAuth client secrets are stored in config.toml.Checked Nov 27, 2026 · source
- Own key, self-host or local modelsCost control and data residency
- Own key: yes. The CLI, IDE extension and desktop app can run on your own OpenAI API key, and config.toml accepts custom model providers with their own base URL and key (the docs show Azure OpenAI and Mistral examples). Local models: the --oss flag runs Codex against Ollama or LM Studio on your machine. Self-hosting: the CLI, SDK and app server are open source and run locally, but Codex cloud cannot be self-hosted. Limits: provider settings are ignored in project-level config files and must go in ~/.codex/config.toml, and the models page says current releases need a Responses-API-compatible endpoint, not a Chat Completions-only one.Checked Nov 27, 2026 · source
- ComplianceSOC 2, ISO 27001, GDPR, HIPAA
- OpenAI's trust portal lists SOC 2 Type 2 and SOC 3 reports, ISO/IEC 27001:2022, 27017, 27018, 27701 and 42001, CSA STAR, GDPR and CCPA. The stated scope of the ISO 27001 certificate is the API, ChatGPT Enterprise and ChatGPT Edu; the 2025 SOC 2 report covers the API Platform, ChatGPT Enterprise, Edu and Team. The portal does not name Codex. Separately, the Codex docs say a HIPAA business associate agreement can cover local Codex (CLI, IDE extension, desktop app) on eligible healthcare or regulated workspaces, but not Codex cloud.Checked Nov 27, 2026 · source
- SSO and SCIMWhich plan includes team sign-in
- Sign-in is by ChatGPT account or API key. Codex cloud requires multi-factor authentication; for organisations using SSO, the SSO administrator is expected to enforce it. Admins can force one sign-in method (ChatGPT or API key) and restrict ChatGPT sign-in to a single workspace through managed configuration. The page does not say which plans include SSO.Checked Nov 27, 2026 · source
- Context and usage capsMessage limits, context window, file size
- Plus and standard Business: OpenAI gives estimated ranges of local messages per five hours, not fixed caps. Examples: 6-50 on GPT-6.2 Astra, 17-180 on GPT-6.2 Sol, 15-160 on GPT-6.1 Sol and 350-3,000 on GPT-6 Luna. Weekly limits may also apply, with no numbers given. Pro plans currently have no five-hour limit. Cloud tasks draw on the same allowance and may use more of it than local messages. Fast modes and image generation use the allowance up faster. Free and Go have no published figures.Checked Nov 27, 2026 · source
- Data residencyWhere data is hosted
- With ChatGPT sign-in, Codex follows the workspace's ChatGPT Enterprise retention and residency settings; with an API key it follows the API organisation's retention and data-sharing settings. The page lists no regions. Codex cloud always requires ChatGPT sign-in.Checked Nov 27, 2026 · source
- Export and lock-inWhether you can get your data out
- Local Codex works directly on files in your own checkout, so the code stays in your repository. In Codex cloud, saved virtual-machine state can be recovered for up to seven days after the last turn, and the docs warn that it is not a substitute for source control: commit work you want to keep. Cloud environments work with GitHub.com and GitLab.com repositories and do not support self-hosted GitHub Enterprise Server.Checked Nov 27, 2026 · source
- Changelog cadenceWhether it is actively developed
- Actively released. The three newest entries when checked were Codex CLI 0.172.0 on 2026-11-24, Codex app 26.1120 on 2026-11-23 and Codex CLI 0.171.0 on 2026-11-20. The changelog has monthly sections going back to May 2025.Checked Nov 27, 2026 · source
