Join our Newsletter — 33% off our NHI Course
Home› Guides› Claude Code vs OpenAI Codex: Plans, Surfaces, Models…
Guide AI Platforms

Claude Code vs OpenAI Codex: Plans, Surfaces, Models and Data Handling Side by Side

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 15 November 2026 15 min read
On this page

Claude Code and OpenAI Codex are both agentic coding tools that read a repository, edit files, run commands and open changes for review, and teams evaluating them need the same facts laid out the same way. Claude Code is the agentic coding tool from Anthropic, first released as a limited research preview on 24 February 2025. OpenAI Codex is OpenAI's software engineering agent family, which began with the open source Codex CLI in April 2025 and a cloud research preview on 16 May 2025. This page sets the two products side by side on plans and prices, surfaces, models, permission and sandbox controls, admin controls, data handling and release history, using identical fields for each and only the providers' own documentation. It is written for developers, engineering managers and platform owners. Products are listed alphabetically, and the order is not a ranking. Last checked: 2026-11-15.

This is an independent reference page from NHI Mgmt Group based on public provider documentation; it is not sponsored or endorsed by any provider. Sources are Anthropic's Claude Code documentation and OpenAI's Codex documentation as of November 2026. Features and prices change, so confirm against each provider's current pages.

Key takeaways

  • Both are bundled with subscription plans. As of 15 November 2026, Claude Code is included in Claude Pro, Max, Ultra, Team and Enterprise, and Codex is included in every ChatGPT plan from Free upwards, subject to rollout; both can also run on API billing.
  • Both run locally and in the cloud. Each has a terminal CLI, IDE extensions, a desktop app, a web surface, mobile access and CI integrations, and each separates local execution from provider-hosted cloud sessions.
  • Each uses its own provider's models. Claude Code selects Anthropic Claude models through aliases such as opus and sonnet; Codex lists GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra and GPT-6 Luna.
  • Control models differ in shape. Claude Code uses six named permission modes plus a separate Bash sandbox; Codex combines three sandbox modes with approval policies, enforced by operating system sandboxes.
  • Retention follows the account type. Anthropic documents 30-day standard retention for commercial Claude Code use and a consumer training choice; OpenAI documents that Codex usage follows the ChatGPT workspace or API organisation settings, and that business data is not used for training by default.

What are Claude Code and OpenAI Codex?

Claude Code: Anthropic's documentation describes it as "an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools", available in the terminal, IDE, desktop app and browser. Anthropic states that each surface connects to the same underlying engine, so a repository's CLAUDE.md files, settings and MCP servers work across all of them. The CLI is proprietary software used under Anthropic's Consumer or Commercial Terms.

OpenAI Codex: OpenAI's documentation describes Codex as available in the ChatGPT desktop app, ChatGPT mobile app, ChatGPT on the web, the Codex CLI, the Codex IDE extension and Codex Cloud. The Codex CLI is open source at github.com/openai/codex under the Apache-2.0 licence; the cloud, app and mobile surfaces are part of ChatGPT.

Neither product is a code completion plugin in the older sense: both plan multi-file changes, run tests and commands, and can work unattended in CI. For the general difference between assistants and autonomous agents, see the AI Coding Assistants vs Autonomous Coding Agents guide. Full single-product profiles are in What Is Claude Code? and What Is OpenAI Codex?; this page compares only.

Key facts side by side

As of 15 November 2026, from each provider's documentation, pricing page and announcements.

FieldClaude CodeOpenAI Codex
ProviderAnthropicOpenAI
First releaseLimited research preview, 24 February 2025Codex CLI, April 2025; Codex cloud research preview, 16 May 2025
General availability milestone"Generally available", 22 May 2025Available to ChatGPT Plus users from 3 June 2025
LicenceProprietary, under Consumer or Commercial TermsCodex CLI Apache-2.0; other surfaces part of ChatGPT
Lowest plan that includes itPro, $20 per monthFree, $0, subject to rollout
Organisation plansTeam, EnterpriseBusiness, Enterprise, Edu
Sign-in optionsClaude subscription, Anthropic Console account, third-party providersSign in with ChatGPT, API key, Codex access tokens for Enterprise automation
Project instruction fileCLAUDE.md (can read AGENTS.md instead)AGENTS.md
ExtensibilitySkills, hooks, subagents, MCP, Agent SDKSkills, hooks, subagents, MCP, Codex SDK, App Server
Docs homecode.claude.com/docslearn.chatgpt.com/docs

How much do Claude Code and Codex cost?

Both are sold as part of a wider subscription rather than as a separate seat. Prices are in US dollars as listed on each pricing page on 15 November 2026, excluding tax.

Claude Code plans

PlanMonthly billingAnnual billingIncludes Claude Code
Free$0$0No
Pro$20$17 per month ($200 up front)Yes
Max$100Monthly onlyYes
Ultra$200Monthly onlyYes
Team, standard seat$25 per seat$20 per seatYes
Team, premium seat$125 per seat$100 per seatYes
EnterpriseAnnual only$20 per seat, 20-seat minimum, plus usage at API ratesYes

OpenAI Codex plans

PlanMonthly billingAnnual billingIncludes Codex
Free$0$0Yes, GPT-6 Luna at Standard speed in the desktop app, subject to rollout
Go$8Not stated by OpenAI on the Codex pricing pageYes, same GPT-6 Luna access as Free
Plus$20Not stated by OpenAI on the Codex pricing pageYes, web, CLI, IDE extension and iOS
Pro$100, $200 or $500Not stated by OpenAI on the Codex pricing pageYes; Ultrafast mode on the $500 tier
Business$25 per user$20 per user, 2 or more usersYes
Enterprise and EduContact salesContact salesYes
  • API billing, Claude Code: with an Anthropic Console account or a third-party provider, usage is billed per token by that provider. Enterprise seats add usage at API rates on top of the seat price; Anthropic's pricing page states that usage cost scales with model and task.
  • API billing, Codex: OpenAI states "Pay for Codex usage based on API pricing" for API key sign-in, which covers the CLI, SDK and IDE extension but not cloud features such as GitHub code review and Slack.
  • Usage limits, Claude Code: included usage differs by plan; per-model message allowances are not stated by Anthropic on the Claude pricing page.
  • Usage limits, Codex: OpenAI publishes estimated local messages per five-hour window for Plus and Standard Business (for example about 15 to 160 for GPT-6.1 Sol), states that these are estimates, that weekly limits may apply and that Pro plans currently have no five-hour limit.

For every AI coding tool's plans in one table, see the AI Coding Tools Pricing Tracker.

Where do they run? Surfaces and platforms

As of 15 November 2026. Each row uses the provider's own surface names.

SurfaceClaude CodeOpenAI Codex
Terminal CLINative installer for macOS, Linux and WSL; Windows PowerShell and CMD; Homebrew, WinGet, apt, dnf and apk. Native installs update automaticallyCodex CLI, open source; installers and package managers per the openai/codex repository
IDEVS Code extension (also installable in Cursor); JetBrains plugin, which requires the CLICodex IDE extension
Desktop appmacOS (Intel and Apple silicon), Windows x64 and ARM64, Ubuntu and Debian in beta; paid subscription requiredChatGPT desktop app; Windows and Linux desktop apps; Windows sandbox and WSL
Web and cloudclaude.ai/code; cloud sessions in Anthropic-managed VMs or a self-hosted environmentChatGPT on the web and Codex Cloud
MobileClaude app for iOS and AndroidChatGPT mobile app
Chat and trackersSlack (@Claude), Channels for Telegram, Discord, iMessage and webhooksSlack, Linear
Source control and CIGitHub Actions, GitLab CI/CD, GitHub Code ReviewGitHub, GitLab (beta), GitHub Action
Non-interactive useclaude -p, Agent SDKNon-interactive mode, Codex SDK, App Server

Both products let a session move between surfaces. Claude Code documents Remote Control, Dispatch, claude --teleport and /desktop for this; Codex documents shared access across the app, IDE extension, web and mobile under one ChatGPT account.

Which models do they use?

FieldClaude CodeOpenAI Codex
Model familyAnthropic Claude (Fable, Opus, Sonnet, Haiku)OpenAI GPT-6 and GPT-6.1
How models are chosenAliases: opus, sonnet, haiku, fable, best, opusplanModel identifiers: gpt-6-astra, gpt-6.1-sol, gpt-6.1-terra, gpt-6-luna
DefaultOpus 5.5 on the Anthropic API and Claude plans (differs by cloud provider)A recommended model when none is set; the docs' sample configuration sets gpt-6.1-sol
Third-party model hostsAmazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform, Microsoft FoundryCustom providers in the CLI, including Amazon Bedrock and Google Cloud Vertex AI
Recent retirementsAlias targets change with model releases; see the model configuration pagegpt-5.4 and gpt-5.4-mini retired 31 August 2026; gpt-5.3-codex-spark 14 September 2026; gpt-5.5 14 October 2026 (ChatGPT sign-in)

For the underlying models, see the Coding LLMs Compared page.

How do permissions and sandboxing compare?

Both tools decide what an agent may do without asking, but they express it differently. These settings carry most of the safety weight when an agent runs commands.

ControlClaude CodeOpenAI Codex
Named levelsSix permission modes: Manual (default), acceptEdits, plan, auto, dontAsk, bypassPermissionsThree sandbox modes: read-only, workspace-write, danger-full-access; approval policies on-request and never
Starting pointauto for interactive terminal and VS Code sessions from v2.1.283; Manual for claude -p and SDK runs with no mode set from v2.1.302Sandboxing applies automatically; workspace-write is described as the default low-friction mode for local work
Automated reviewerIn auto, a classifier reviews actions in the backgroundapprovals_reviewer = auto_review sends eligible prompts to a reviewer agent (default user)
OS-level isolationBash sandbox on macOS, Linux and WSL2, enabled with /sandbox; strict sandbox mode turns off retries outside the sandboxSeatbelt on macOS, native Windows sandbox, bubblewrap on Linux and WSL2
Full access settingbypassPermissions, documented for isolated containers and VMs only; deny rules still applydanger-full-access removes filesystem and network boundaries
Protected pathsWrites to .git, .claude and shell config files are never auto-approved outside bypassPermissionsWrites outside the workspace require approval under workspace-write with on-request

The configuration-file attack surface is similar for both, since each reads instruction files from the repository. See the Coding Agent Config File Attacks guide.

What enterprise and admin controls does each offer?

Claude Code

  • Managed settings: permissions.disableAutoMode and permissions.disableBypassPermissionsMode set to "disable", and permissions.defaultMode as the organisation starting mode. Project-level settings files cannot set auto or bypassPermissions.
  • HIPAA configuration: the built-in default is Manual rather than auto.
  • Zero data retention: available to qualified Claude for Enterprise accounts, enabled per organisation by the account team.
  • Telemetry and monitoring: usage metrics can go to the organisation's own OpenTelemetry collector; Anthropic-bound metrics, error reports and feedback can be switched off by environment variable.
  • Self-hosted environments: cloud sessions can run on infrastructure the organisation controls.

OpenAI Codex

  • Managed configuration: forced_login_method ("chatgpt" or "api") and forced_chatgpt_workspace_id; if credentials do not match, Codex logs the user out and exits.
  • Credential storage: cli_auth_credentials_store set to file, keyring, auto or ephemeral.
  • Enterprise and Edu features: SCIM, EKM, RBAC, domain verification, audit logs through the Compliance API, and data retention and residency controls.
  • Automation identities: Enterprise admins can let permitted members create Codex access tokens for trusted, non-interactive workflows such as private CI runners.
  • Business plan: SAML SSO and MFA.

Both products create non-human credentials when used in automation (Anthropic Console API keys and CI secrets for Claude Code; API keys and Codex access tokens for Codex). Give each an owner, a scope and a rotation date. See the How to audit AI coding assistant tokens and config files guide and, for rollout governance across tools, the AI Coding Tools Enterprise Controls Compared page.

Do they train on your code? Data handling side by side

FieldClaude CodeOpenAI Codex
Individual plans, trainingFree, Pro and Max: user setting; data used to train new models when the setting is onServices for individuals: OpenAI "may use your content to train our models"; opt out in the privacy portal or Data Controls
Business plans, trainingTeam, Enterprise, API and third-party platforms: not used to train generative models under commercial terms unless the customer opts inBusiness: "Business data isn't used for training by default"; business users and API are opted out unless they opt in
Retention, individual5 years if training use is on; 30 days if offFollows the ChatGPT account's settings; Codex docs give no separate period
Retention, business30 days standardChatGPT sign-in follows workspace retention and residency settings; API key follows the API organisation's settings (abuse monitoring logs up to 30 days by default)
Zero data retentionQualified Claude for Enterprise accounts, per organisationAPI: ZDR and Modified Abuse Monitoring with prior approval from OpenAI
Local filesSession transcripts in plaintext under ~/.claude/projects/ for 30 days by default (cleanupPeriodDays)Credentials in ~/.codex/auth.json (treat like a password) or the OS credential store
Cloud executionRepository cloned into an isolated VM; GitHub credentials stored encrypted and attached by a proxy, never entering the VMCloud tasks run in OpenAI-hosted environments; cloud use requires Sign in with ChatGPT

For every tool's policy in one table, see the AI Coding Tools Data Retention and Training Tracker, and for model providers generally the LLM Data Retention and Training Policies Compared page.

When was each released? Release history

DateProductMilestone
24 February 2025Claude CodeLimited research preview, announced with Claude 3.7 Sonnet as Anthropic's first agentic coding tool
April 2025OpenAI CodexCodex CLI released as a lightweight open source terminal agent
16 May 2025OpenAI CodexCodex cloud research preview with codex-1, a version of OpenAI o3 tuned for software engineering, for Pro, Enterprise and Business
22 May 2025Claude CodeGeneral availability with Claude 4; beta VS Code and JetBrains extensions, GitHub Actions background tasks and the Claude Code SDK
3 June 2025OpenAI CodexAvailable to ChatGPT Plus users
14 October 2026OpenAI CodexGPT-5.5 retired from Codex with ChatGPT sign-in

For the wider category timeline, see the AI Coding Tools Timeline.

How to choose between them: factual criteria

These criteria come from the documented facts above. They describe fit, not quality.

  • Existing subscription: organisations already on Claude Team or Enterprise get Claude Code within those seats; organisations on ChatGPT Business or Enterprise get Codex within those seats.
  • Free access: Codex is listed on the ChatGPT Free plan, subject to rollout; the Claude Free plan does not include Claude Code.
  • Open source requirement: the Codex CLI is Apache-2.0; Claude Code is proprietary.
  • Cloud model hosting: teams that must keep inference on a particular cloud can check the providers each lists (Claude Code: Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform, Foundry; Codex CLI: custom providers including Bedrock and Vertex AI).
  • Control style: teams that want named approval modes enforced by managed settings and teams that want OS sandbox modes paired with approval policies can map their policy to the table in the permissions section.
  • Retention requirements: where ZDR is needed, Claude Code offers it to qualified Enterprise accounts and OpenAI offers it on the API with approval; confirm the route that matches your sign-in method.

Many organisations end up with both. The AI Coding CLI Agents Compared page covers other terminal agents, and the AI Coding Tools Hub lists every profile.

Security guidance for running either tool

Each product has its own NHI Mgmt Group security guide: the Claude Code Security Guide and the OpenAI Codex Security Guide. The points below apply equally to both.

  • Pin the sign-in route: enforce the corporate account (Claude Team or Enterprise login; forced_chatgpt_workspace_id for Codex) so personal accounts do not reach company repositories.
  • Restrict full access: disable bypassPermissions by managed setting, and keep danger-full-access for isolated containers or VMs.
  • Treat local state as sensitive: transcripts under ~/.claude/projects/ and tokens in ~/.codex/auth.json can contain secrets; exclude them from backups that leave the device and from repositories. See the AI Coding Tools and Secrets Sprawl guide.
  • Review agent pull requests as you would a contractor's: see the AI Coding Agent Pull Request Governance Guide.

Practitioner checklist

  • Record which plan, sign-in method and model host each team uses for each tool, with the date checked.
  • Confirm the retention period and training setting that apply to that sign-in route, and record ZDR status if required.
  • Set organisation-wide managed settings: disable full-access modes, set a starting permission or sandbox mode, and force the corporate workspace.
  • Register every API key, Codex access token and CI secret used by either tool as a non-human identity with an owner and rotation date.
  • Route telemetry to your own OpenTelemetry collector and enable Compliance API or equivalent audit export where the plan includes it.
  • Set local transcript retention (cleanupPeriodDays) and credential storage (cli_auth_credentials_store = keyring) to match policy.
  • Pin CLI versions in managed fleets and review each provider's changelog before upgrading.
  • Recheck plans, models and retention pages each quarter, since both providers change them often.

Standards and references

Related NHI Mgmt Group resources: What Is Claude Code?, What Is OpenAI Codex?, AI Coding Tools Hub, Vibe Coding Tools Compared, AI Agent Platforms Compared.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 15 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org