This comparison reflects product documentation as of 28 September 2026. Both products change weekly, and both vendors released new models in September 2026. INVISOM has no commercial relationship with Anthropic or OpenAI. This article was researched and drafted with AI assistance, including tools from one of the vendors compared, and was reviewed for factual accuracy and balance.
Two converged products
A year ago, AI coding tools were mostly autocomplete with a chat window. Anthropic's Claude Code and OpenAI's Codex are now something different: agents that read a repository, plan a change across many files, run the tests, fix what fails and open a pull request, in a terminal, an IDE, a desktop app, a web interface or a CI pipeline.
On the capabilities most teams ask about first, the two have largely converged:
| Capability | Claude Code | OpenAI Codex |
|---|---|---|
| Surfaces | Terminal, VS Code and JetBrains, desktop, web, mobile, Slack | CLI, IDE extensions, desktop (within the ChatGPT app), web, mobile, Slack |
| Where the agent runs | Locally by default; cloud sessions in Anthropic-managed or self-hosted environments | Locally, or in Codex cloud containers with network access off by default during the agent phase |
| Extensibility | MCP, hooks, skills, plugins, Agent SDK | MCP, hooks, skills, plugins, Codex SDK |
| Headless and CI | claude -p; official GitHub Action; GitLab integration in beta | codex exec; official GitHub Action; GitLab in Codex cloud in beta |
| Managed code review | Code Review (research preview), billed per review | Cloud code review on GitHub; GitLab in preview |
| Business data used for training | Not by default on commercial plans | Not by default on Business, Enterprise and API |
Feature lists will not separate them for long. The differences that matter in an enterprise sit elsewhere.
Where they differ in practice
1. Your route to the model changes the product
Many enterprises want to consume AI through an existing cloud agreement. Both tools support that, but neither is the same product on every route.
Figure 1
Same product name, different product by route
Documented differences when consuming each tool through a cloud provider
- Vendor's own platformClaude CodeFull feature setOpenAI CodexFull feature set
- Amazon BedrockClaude CodeSupported; no ultrareview; Code Review billed by AnthropicOpenAI CodexLocal surfaces only; no Codex cloud, GitHub review, Slack, SAML SSO or SCIM
- Google CloudClaude CodeSupported; no ultrareview; Code Review billed by AnthropicOpenAI CodexNot found in documentation
- Microsoft Azure / FoundryClaude CodeSupported; defaults to an older Sonnet model; no ultrareviewOpenAI CodexCLI and VS Code supported; Entra ID authentication not available
According to OpenAI's documentation, Codex on Amazon Bedrock supports the local surfaces but not Codex cloud, hosted integrations such as GitHub code review and Slack, or SAML single sign-on and SCIM. Microsoft's documentation for Codex with Azure OpenAI notes that Entra ID authentication is not available for Codex. On the other side, Claude Code runs on Amazon Bedrock, Google Cloud and Microsoft Foundry, but Anthropic's documentation shows that Foundry defaults to an older Sonnet model, that the deeper cloud "ultrareview" is unavailable on all three, and that the managed Code Review service is billed by Anthropic directly even for organizations using Bedrock or Google Cloud.
Build the comparison for your route, not the vendor's headline.
2. Execution and sandboxing
Both tools sandbox commands on macOS and Linux, and both offer graduated permission modes, from asking before every action to running autonomously within limits. Codex cloud runs tasks in containers where network access during the agent phase is off unless enabled with an allowlist. Claude Code's cloud sessions keep repository credentials outside the session environment and route egress through a proxy, and organizations can run cloud sessions in their own environment. Native Windows sandboxing is documented for Codex; Claude Code's sandbox on Windows requires WSL2.
3. CI/CD integration
Both vendors publish an official GitHub Action. The security posture of each default is worth comparing directly:
- Claude Code's action supports OIDC workload identity federation, so pipelines need not store a long-lived API key. Its official GitHub App requests broad permissions; Anthropic documents using a custom app to narrow them.
- Codex's action removes sudo from the runner by default and offers stricter unprivileged and read-only modes. OpenAI's guidance is to restrict triggers to trusted events and sanitize prompt inputs.
Neither default is sufficient on its own. Both need the pipeline hardening described below.
4. Cost model
Both vendors bundle their coding agent into broader subscription plans and combine seats with metered usage. Agent features multiply consumption: Anthropic's documentation puts its managed Code Review at an average of US$15 to US$25 per review, and OpenAI notes that cloud tasks consume allowances faster than local ones. A seat price tells you little about total cost. Spend caps, per-repository budgets and pinned model versions belong in the managed configuration from day one.
Benchmarks will not settle it
Vendor announcements lead with benchmark scores. For this decision they are a floor check, not a selection tool.
Figure 2
Model scores depend on the referee, and change monthly
Terminal-Bench 4.0 task success rate (%), latest flagship model from each vendor as of 28 September 2026
Three caveats apply. First, these benchmarks measure models, usually inside a neutral test harness, not the Claude Code or Codex products, which add their own planning, tools and context handling. Second, the same model scores differently depending on who runs the test and how: GPT-6 Astra scores 57.9% on Terminal-Bench 4.0 in OpenAI's reporting and 59.6% in Vals AI's independent run. Third, the leaderboard turns over every few weeks as each vendor ships a new model. OpenAI has also stopped reporting SWE-bench Verified, the most widely cited coding benchmark of 2024 and 2025, citing contamination and flawed tests.
The only benchmark that matters is a bake-off on your own repositories: the same tasks, both tools in their native form, measured on merged pull requests, rework and review time.
The productivity evidence is more sobering than the marketing
The strongest independent evidence says two things: AI coding tools can speed up delivery, and people are poor judges of whether they have.
Figure 3
The perception gap
Experienced open-source developers, change in task completion speed with early-2025 AI tools
In a randomized controlled trial published in July 2025, METR found that 16 experienced open-source developers took 19% longer to complete 246 real tasks when using AI tools of that period, even though they had expected a 24% speedup and afterwards believed they had been sped up by 20%. The tools were early-2025 versions and the setting, large mature codebases maintained by experts, is demanding. A 2026 follow-up by METR was inconclusive, which the researchers attributed to selection effects in their own data.
Google's DORA research, based on surveys of thousands of technology professionals, adds an organizational view. In 2024, higher AI adoption was associated with slightly lower delivery throughput and noticeably lower delivery stability. In 2025, the association with throughput had turned positive, but the association with stability remained negative. DORA describes AI as an amplifier of the engineering system it is placed in.
The implication for rollout: measure delivery performance before you start, keep test gates and human review mandatory, and watch stability metrics as closely as speed.
Treat the repository as untrusted input
The most important lesson from the last eighteen months is not about either vendor. It is that a coding agent turns repository content, such as configuration files, branch names and rendered documentation, into something that can trigger actions. Both tools have had serious, now-fixed vulnerabilities on exactly this boundary.
Figure 4
Repository content became an attack path on both sides
Selected publicly disclosed issues, all fixed
Aug 2025Ecosystem
s1ngularity npm compromise invokes installed AI CLIs to hunt for secrets; entry point was a misconfigured CI workflow
Aug 2025Codex CLI
Project-local config could launch MCP commands without approval (CVE-2025-61260); fixed in 0.23.0, disclosed Dec 2025
Dec 2025Codex cloud
Crafted GitHub branch names could inject commands and expose tokens; reported to OpenAI and fixed
Feb 2026Claude Code
Repository hooks, MCP settings and API URL override could act before trust approval (CVE-2025-59536, CVE-2026-21852); fixed before disclosure
The incidents share a pattern. In Claude Code, researchers at Check Point showed that repository-controlled configuration, including hooks, MCP settings and an API base-URL override, could run commands or leak API keys before the user approved the project. In the Codex CLI, project-local configuration could launch MCP commands without approval. In Codex cloud, BeyondTrust researchers showed that a crafted GitHub branch name could inject commands and expose repository tokens. All were fixed after responsible disclosure.
The wider supply-chain risk is illustrated by the August 2025 "s1ngularity" compromise of Nx packages on npm, whose malicious payload looked for locally installed AI command-line tools and invoked them with permission checks bypassed to search for secrets. The entry point was a misconfigured CI workflow, not a flaw in any AI tool.
Whichever tool you choose, ask four questions:
- What runs before the trust prompt? Nothing from the repository should execute before a human approves it.
- Can project configuration override organization policy? Managed settings must win.
- Is network egress allowlisted by default in local, cloud and CI execution?
- Are CI triggers limited to trusted events, with agents running as unprivileged users on ephemeral runners and short-lived credentials?
Patch speed and transparency matter more than any single feature, because new issues on both sides are a certainty.
The Gulf view: two residency questions
For organizations in Saudi Arabia and the UAE, residency needs two separate answers: where is data stored, and where does inference run?
- OpenAI offers data residency at rest and inference residency in the UAE for eligible ChatGPT business customers, but its help article does not list Codex among the covered features. Confirm Codex coverage in writing.
- Claude models on Amazon Bedrock can be called from the UAE and Bahrain regions, but AWS's launch announcement describes global cross-Region inference, meaning data at rest stays in the source region while inference may run elsewhere. Anthropic's own API offers US or global inference only.
For code subject to national data classification or personal data rules, covered in our NDMO implementation guide, the defensible pattern is often a locally running agent, an in-region model endpoint where one exists, and zero-data-retention terms, each verified separately.
A rollout plan that works with either tool
- Baseline first. Record DORA-style metrics, including deployment frequency, lead time, change failure rate and recovery time, before any rollout.
- Run a two-to-four-week bake-off on your own repositories with both tools, on the cloud route you will actually use.
- Harden the pipeline before enabling CI agents: OIDC or short-lived credentials, minimal GitHub App permissions, trusted triggers only, unprivileged ephemeral runners.
- Centralize policy through managed settings or managed requirements files, with bypass modes disabled for most users and egress allowlists by default.
- Keep humans accountable for merges. Treat AI code review as an additional signal; both vendors' review bots are advisory by design.
- Govern cost and models: budgets per team or repository, pinned model versions, deliberate upgrades.
- Re-evaluate quarterly. Models, prices and capabilities on both sides change faster than annual procurement cycles.
Coding agents are a governed AI capability like any other. The decision rights and risk tiers in The Enterprise AI Operating Model apply directly.
Frequently asked questions
Is Claude Code or OpenAI Codex better for enterprises?
Neither is better in general as of September 2026. Both offer agentic coding across terminal, IDE, desktop, web and CI, with MCP, hooks and SDKs. The meaningful differences are in feature parity on your cloud route, CI security defaults, residency and cost model. Run a bake-off on your own code.
Do AI coding agents improve developer productivity?
The evidence is mixed. A 2025 METR trial found experienced developers were 19% slower with early-2025 tools while believing they were faster. DORA's 2025 research links AI with higher throughput but lower delivery stability. Measure your own baseline before and after.
Are AI coding agents secure?
Both Claude Code and Codex have had serious vulnerabilities, since fixed, where repository content could trigger actions before user approval. Treat repositories as untrusted input, enforce managed settings, allowlist network egress and harden CI pipelines.
Can Claude Code and Codex run through AWS, Azure or Google Cloud?
Claude Code runs through Amazon Bedrock, Google Cloud and Microsoft Foundry. Codex runs through Amazon Bedrock and Azure OpenAI. On both, some features differ from the vendor's own platform, so check feature parity for your route.
Sources and further reading
- Anthropic documentation: Claude Code overview, data usage, enterprise deployment, GitHub Actions, Code Review. Accessed 28 September 2026.
- OpenAI documentation: Codex changelog, approvals and security, GitHub Action, Codex on Amazon Bedrock. Accessed 28 September 2026.
- Use Codex with Azure OpenAI, Microsoft.
- Benchmarks: Introducing Claude Opus 5.5, Anthropic, 22 September 2026; GPT-6 Astra, OpenAI, 3 September 2026; Terminal-Bench 4.0 leaderboard, Vals AI.
- Productivity: METR, July 2025; DORA 2024 report; 2025 DORA report announcement, Google Cloud.
- Security: Check Point on Claude Code, 25 February 2026; Check Point Research on Codex CLI, 1 December 2025; SecurityWeek on Codex cloud, 31 March 2026; Nx s1ngularity postmortem.
- Residency: OpenAI data residency; AWS Bedrock Middle East cross-Region inference, 24 February 2026.