AI agents
OpenAI Codex: CLI, App, Pricing and Enterprise Security Explained
OpenAI Codex explained for enterprises: the CLI, desktop app, IDE extension and cloud, pricing by ChatGPT plan, sandboxing, admin controls, data and EU rollout.
In short
OpenAI Codex is OpenAI's coding agent. It reads a repository, edits files and runs commands through the open-source Codex CLI, an IDE extension, the ChatGPT desktop app or Codex Cloud. As of 19 November 2026, every ChatGPT plan includes it. Enterprises should enforce sandbox, network and MCP policy centrally before wide rollout.
Key takeaways
- Codex is one agent with several surfaces: the Apache-2.0 Codex CLI, an IDE extension for VS Code-compatible editors, the ChatGPT desktop app on macOS, Windows and Linux, ChatGPT on the web and mobile, and Codex Cloud.
- As of 19 November 2026, OpenAI includes Codex in the Free, Go, Plus, Pro, Business, Edu and Enterprise plans with a usage allowance, and local tools can also bill through an API key at API rates.
- Locally, Codex defaults to a workspace-write sandbox with approvals on request and network access off; admins can forbid full access, live web search and unapproved MCP servers through requirements.toml.
- Where data goes depends on the sign-in route: a ChatGPT workspace follows its retention and residency settings, an API key follows the API organisation's settings, and local transcripts stay on developers' machines unless you turn history off.
- Codex can run against Ollama or LM Studio with --oss, or against Amazon Bedrock, but each route changes which enterprise controls and features remain available.
This guide explains what Codex is today, how it is licensed and priced, where code and prompts go, and which controls a European enterprise should set before rollout. For the wider picture across vendors, see our guide to AI coding agents in the enterprise.
Codex changes quickly. Every product fact below was checked against OpenAI’s documentation on 19 November 2026.
What is OpenAI Codex, and where does it run?
OpenAI Codex is a coding agent: a language model that plans a software task, edits files, runs commands and tests, and repeats until the work is done or handed back. It runs on a developer’s machine through several clients, or in OpenAI’s cloud.
The model is only one part. The surrounding software, which gives the model tools, permissions and memory, is the agent harness; our explainer on what an agent harness is covers why that layer decides most of the risk.
OpenAI’s documentation now lives at learn.chatgpt.com; the old developers.openai.com/codex address redirects there. OpenAI presents Codex alongside ChatGPT Work, its agent for general work, and the same desktop app runs both.
| Surface | Where the agent runs | Open source | Notes (as of 19 November 2026) |
|---|---|---|---|
| Codex CLI | Developer’s machine | Yes, Apache-2.0 | Terminal tool; codex exec runs it in scripts and CI |
| IDE extension | Developer’s machine | No | VS Code, Cursor, Windsurf; JetBrains and Xcode have their own integrations |
| ChatGPT desktop app | Developer’s machine | Not listed as open source | macOS, Windows and Linux; projects, files, browser, plugins and scheduled tasks |
| ChatGPT web and mobile | OpenAI | No | Start and follow work from a browser or phone |
| Codex Cloud | OpenAI-run cloud workspaces | No (base image codex-universal is open) | Parallel tasks on GitHub or GitLab repositories |
The CLI is written mainly in Rust. Its repository also holds the Codex SDK and app server, and accepts issues but not external pull requests. Release 0.170.0 appeared on 18 November 2026, the third release that week, so version control matters.
How much does Codex cost, and which ChatGPT plans include it?
As of 19 November 2026, OpenAI’s pricing page says Codex is included in the ChatGPT Free, Go, Plus, Pro, Business, Edu and Enterprise plans. There is no separate Codex licence; you pay through the ChatGPT plan, credits or API usage.
The listed prices, in US dollars, are:
- Free at 0 and Go at 8 dollars a month.
- Plus at 20 dollars a month and Pro at 100, 200 or 500 dollars a month.
- Business at 20 dollars per user a month billed annually for two or more users, or 25 dollars billed monthly.
- Enterprise and Edu through OpenAI sales.
Usage, not seats, is the real constraint. For Plus and standard Business, OpenAI gives estimated message counts per five-hour window that vary by model. Pro currently has no five-hour limit. Enterprise and Edu workspaces on flexible pricing have no fixed rate limits and consume credits, which some plans can also buy when they run out.
An API key is the other route. It works for the CLI, SDK and IDE extension, not for cloud features, and is billed at API rates outside the ChatGPT allowance. Finance teams should decide which route each group uses, because it also decides which data terms and admin controls apply.
Where do your code and prompts go when you use Codex?
It depends on how developers sign in. A ChatGPT workspace, an API key and a third-party cloud each follow different retention, residency and logging rules, and local files stay on the developer’s machine in every case.
- ChatGPT sign-in. OpenAI’s HIPAA configuration guide says Codex use through ChatGPT sign-in follows the Enterprise workspace’s retention and residency settings, and that OpenAI does not train on ChatGPT Enterprise or Codex data. Audit records are available through the Compliance API for up to 30 days. For Business, confirm the terms in your agreement.
- API key. Retention follows the API organisation’s settings. OpenAI says API data is not used for training unless you opt in, abuse-monitoring logs are kept for up to 30 days, and zero data retention needs OpenAI’s prior approval.
- The developer’s machine. Codex stores state under
~/.codexand, by default, writes session transcripts there. OpenAI states that local retention is the customer’s responsibility. Set[history] persistence = "none"where transcripts should not persist. - Codex Cloud. Repositories are checked out into OpenAI-run workspaces. OpenAI’s HIPAA guide says Codex Cloud must not be used with protected health information; weigh that for other sensitive data too.
Data residency. OpenAI’s API offers a European region (EEA and Switzerland) at eu.api.openai.com, with storage and regional processing, for eligible organisations through sales. The region is fixed per project, and models released on or after 5 March 2026 carry a 10% price uplift there. That guide does not mention Codex, so ask OpenAI in writing which Codex surfaces and models your residency commitment covers. Amazon Bedrock is another route: requests go to an AWS region you choose instead of OpenAI’s API.
Under the GDPR, your organisation normally remains the controller for personal data in code, tickets and logs; check the vendor’s processor terms and transfer basis. Our guide to a GDPR-compliant LLM deployment sets out the checks. This is not legal advice.
How do Codex sandboxing and approvals work?
Codex separates what it can technically do (the sandbox) from when it must ask (the approval policy). In a Git repository, the default is the Auto preset: workspace-write with approvals on-request and network access off.
Sandbox modes:
read-onlyis the default outside version-controlled folders.workspace-writelimits writes to the workspace and keeps.git,.agents,.codexand.awsread-only.danger-full-accessremoves the sandbox.
Approval policies are on-request, never or a granular table that keeps chosen categories interactive and rejects the rest. An optional auto_review setting sends eligible requests to a reviewer agent instead of a person.
Isolation. Codex uses Seatbelt on macOS, bubblewrap and seccomp on Linux and a native Windows sandbox on Windows; WSL2 uses the Linux sandbox.
Network. Local network access is off until enabled. A network proxy can then apply domain allow and deny rules, with deny taking precedence. Web search defaults to a cached index rather than live browsing.
What to block. OpenAI marks --dangerously-bypass-approvals-and-sandbox, also called --yolo, and danger-full-access as not recommended. Sandboxes also have bugs: advisory CVE-2025-59532, fixed in version 0.39.0 in September 2025, let a model-chosen working directory widen the writable area. Since version 0.169.0 (13 November 2026), codex exec keeps project configuration and MCP servers disabled in untrusted directories unless you pass --trust.
Prompt injection, where text in a file, issue or web page steers the agent, remains the main residual risk. Treat repositories, issues and fetched web content as untrusted input, and keep approvals on for anything that leaves the sandbox.
What can administrators control in Codex?
ChatGPT workspace admins can set enforced requirements, defaults and role-based access from the Admin Console, by MDM or from a self-hosted endpoint. Requirements cannot be overridden by users.
Policy files. requirements.toml holds enforced constraints; config.toml holds defaults users may change. Admins edit them under Admin Console, Agent security, as a workspace default or as overrides for users, groups or roles. macOS MDM can deliver the same TOML. Where developers do not sign in with ChatGPT, the CLI and desktop app can fetch policy from an HTTPS endpoint you run.
What you can enforce includes:
- allowed approval policies, sandbox modes (or permission profiles from version 0.138.0) and web search modes;
- an approved list of MCP servers, where an empty list disables them all;
- command rules, file read denials, network domain rules and plugin marketplace sources;
- managed hooks only, ignoring user and project hooks.
Roles. Workspaces have Owner, Admin, Member and Analytics Viewer roles, plus custom roles that set each permission to Default, On or Off. On is additive across roles. Codex permissions include local use, cloud use, managing shared environments and cloud network access. Groups can sync through SCIM.
Evidence. The Compliance API exposes Codex records as codex_log events. OpenTelemetry export leaves prompt text out of logs unless you set log_user_prompt to true. OpenAI itself notes that these sources do not record every local command, file operation or approval, so keep your own logs where audit depends on it.
How do AGENTS.md, skills, plugins and MCP work in Codex?
AGENTS.md files give Codex standing instructions; skills package repeatable procedures; plugins bundle skills and connections; and MCP connects external tools. Each is a way to change the agent’s behaviour, so each needs an owner.
- AGENTS.md. Codex reads a global file in
~/.codex, then one file per directory from the repository root down to the working directory, with closer files taking precedence.AGENTS.override.mdreplaces the normal file in its directory. The combined size stops at 32 KiB by default. - Skills. Skills can come from the ChatGPT workspace, the local filesystem or plugins, and OpenAI governs each path separately. Moving a skill between paths does not move its permissions. See our guide to agent skills in the enterprise.
- Plugins. Installing a plugin does not grant access to its connectors or MCP servers; those are authorised separately. Admins can import and sync plugins from GitHub.
- MCP.
codex mcpadds local or remote Model Context Protocol servers. Allow-list them through requirements, and review each one as third-party code; our MCP security guide lists the threats.
Treat AGENTS.md and skills in a repository as code: review changes to them in pull requests, because they steer every later session.
Can Codex use local models or other providers?
Yes. The CLI can run against a local Ollama or LM Studio server with --oss, against custom providers defined by base URL, and against Amazon Bedrock.
Choose the local server per run with --local-provider, or set oss_provider as the default. If neither is set, the interactive CLI asks and codex exec stops with an error, which matters in pipelines. Custom providers go under [model_providers.<id>] with a base_url, for example a server on localhost:11434/v1.
Two limits apply. First, cloud features and workspace controls do not follow you. On Bedrock, for example, OpenAI lists cloud-managed policies, SCIM, enterprise retention and residency controls and analytics as unavailable, along with Codex Cloud. Second, the agent’s quality depends on the model’s tool use and context length, so test local models on real tasks.
If you serve open-weight models yourself, our guide to the llama.cpp server covers one way to expose an OpenAI-compatible endpoint inside your network.
Codex vs Claude Code: what is the difference?
Both are coding agents with a terminal tool, IDE integrations, a desktop app and cloud sessions. The main differences are the models, the licensing of the client and the vendor’s data and admin terms.
Codex runs OpenAI models and its CLI is Apache-2.0 open source. Claude Code runs Anthropic’s Claude models. Most Claude Code surfaces need a Claude subscription or Anthropic Console account, while its terminal, VS Code and JetBrains clients also support third-party providers. Both read AGENTS.md, support MCP and package procedures as skills, so instructions can be shared across tools.
Neither is the right answer for every organisation. Compare them on central policy, sandbox defaults, data terms, EU processing options, routes to private models and audit evidence, then pilot both on your own repositories.
How should a European enterprise roll out Codex?
Offer one managed route, block the unmanaged ones, and record the decisions. A typical sequence:
- Inventory current use. Find personal and Free-plan accounts already in use on company code.
- Choose the sign-in route. Decide between a ChatGPT workspace, API keys or a cloud provider, based on data terms, residency and the controls each route keeps.
- Set requirements first. Allow only
read-onlyandworkspace-write, keep network access off by default, use cached or disabled web search and allow-list MCP servers. - Keep Codex Cloud off until you have reviewed repository access, environment secrets and network settings.
- Decide on local history, retention and endpoint encryption for
~/.codex. - Send telemetry to your security monitoring, alongside Compliance API exports.
- Patch on a schedule you can evidence, given the release pace.
- Keep normal code review for every agent change.
Under the EU AI Act, coding agents are generally not high-risk systems, but Article 4 still applies. Since its amendment by the Digital Omnibus, providers and deployers must take measures to support the AI literacy of staff who use AI systems. National authorities have supervised this since 2 August 2026, and an internal training record is enough; no certificate is needed. Our page on AI literacy under the EU AI Act explains the duty. Where personal data is involved, assess whether a DPIA is needed. This article is not legal advice.
How SysArt helps
SysArt helps regulated organisations choose, configure and govern coding agents such as Codex: the sign-in route, managed requirements, sandbox and network policy, MCP and skill review, logging, routes to private models and the AI literacy evidence behind them. See our work on AI agents.
Featured image by Markus Spiske on Unsplash.
Frequently asked questions
What is OpenAI Codex?
OpenAI Codex is a coding agent: software in which a language model plans a software task, edits files, runs commands and tests, and repeats until the work is done. It runs locally through the Codex CLI, an IDE extension and the ChatGPT desktop app, and remotely in Codex Cloud. OpenAI now presents it alongside ChatGPT Work, and its documentation moved to learn.chatgpt.com.
Is OpenAI Codex free?
Partly. As of 19 November 2026, OpenAI's pricing page lists Codex as included in the ChatGPT Free and Go plans as well as Plus, Pro, Business, Edu and Enterprise. Each plan has a usage allowance, so heavier use needs a paid plan, purchased credits or an API key billed at API rates. The Codex CLI itself is open source under the Apache-2.0 licence.
How much does Codex cost for a business?
As of 19 November 2026, OpenAI lists ChatGPT Business at 20 US dollars per user per month billed annually, for two or more users, or 25 dollars billed monthly. Enterprise and Edu prices come from OpenAI sales. Usage limits are estimated per five-hour window and vary by model; flexible-pricing workspaces consume credits instead. Check the pricing page, because models and rates change often.
Is the Codex CLI open source?
Yes. The openai/codex repository on GitHub is licensed under Apache-2.0 and is written mainly in Rust. It also holds the Codex SDK and app server. OpenAI says the IDE extension and Codex Cloud are not open source. The repository accepts issues but not external pull requests. Version 0.170.0 was published on 18 November 2026, so plan for frequent updates.
Is OpenAI Codex safe to use at work?
It can be, once configured. Locally, Codex runs commands in an operating-system sandbox with network access off by default and protects folders such as .git and .codex. Admins can enforce allowed sandbox modes, approval policies, web search and MCP servers. Risks remain: prompt injection, approved commands, local transcripts and sandbox bugs, such as one fixed in version 0.39.0 in 2025.
Can Codex use local models such as Ollama?
Yes. OpenAI documents an --oss flag that points the Codex CLI at a local Ollama or LM Studio server, chosen per run with --local-provider or by default with oss_provider. You can also define custom providers with a base URL. Cloud features, ChatGPT-managed policies and analytics do not follow you there, and coding quality depends on the local model you choose.
What is the difference between Codex and Claude Code?
Both are coding agents with a terminal tool, IDE integrations, a desktop app and cloud sessions, and both read AGENTS.md, support MCP and use skills. Codex runs OpenAI models and its CLI is Apache-2.0 open source; Claude Code runs Anthropic's Claude models. Compare them on central policy, sandboxing, data terms, EU processing options, model routes and audit evidence rather than on benchmarks alone.
Sources
- OpenAI: Codex documentation, overview with the Codex CLI, IDE extension, ChatGPT desktop app, Codex Cloud, AGENTS.md, open-source and changelog pages (changelog entries 13 to 18 November 2026) · checked 19 November 2026
- OpenAI: Codex documentation, Pricing · checked 19 November 2026
- OpenAI: Codex documentation, Agent approvals and security · checked 19 November 2026
- OpenAI: Codex enterprise documentation, Managed configuration, with the admin rollout guide, roles and workspace permissions, governance and Compliance API pages · checked 19 November 2026
- OpenAI: Codex documentation, Advanced configuration (model providers, --oss, history and OpenTelemetry) · checked 19 November 2026
- OpenAI: Codex documentation, HIPAA configuration (retention, training and local data) · checked 19 November 2026
- OpenAI: Codex documentation, Amazon Bedrock · checked 19 November 2026
- OpenAI API documentation: Data residency · checked 19 November 2026
- OpenAI API documentation: Your data · checked 19 November 2026
- OpenAI: openai/codex repository on GitHub, including the Apache-2.0 licence, release 0.170.0 (18 November 2026) and advisory GHSA-w5fx-fh39-j5rw (CVE-2025-59532) · checked 19 November 2026
- Anthropic: Claude Code documentation, Overview · checked 19 November 2026
- European Commission: AI literacy, questions and answers (updated 20 October 2026) · checked 19 November 2026