# Codex vs Claude Code

Codex is OpenAI's coding agent and Claude Code is Anthropic's. Both run locally (a CLI and IDE extensions) and as cloud coding agents that keep working after you close your laptop, and both are included in a $20 a month plan. The biggest difference is the model family and the account behind it: Codex runs OpenAI models on a ChatGPT plan, and Claude Code runs Claude models on a Claude plan.

In the cloud they work in a similar way. Each Codex cloud task runs in its own VM inside ChatGPT, started from an environment Codex prepares for you. Each Claude Code cloud session runs in its own Anthropic-managed VM, started from claude.ai/code, the Claude apps, the terminal or Slack.

If you already pay for ChatGPT, start with Codex. If you already pay for Claude, start with Claude Code. If you are choosing fresh, the deciding factors are which models you prefer for your codebase, how you want to move work between your terminal and the cloud, and what your team's plan costs per seat.

## At a glance

| | Codex | Claude Code |
|---|---|---|
| Local tools | CLI, IDE extension | Terminal CLI, VS Code and JetBrains, desktop app |
| Cloud coding agent | Codex cloud, in ChatGPT | Claude Code on the web |
| Where the cloud agent runs | OpenAI VM per task | Anthropic-managed VM per session |
| Models | OpenAI models only | Claude models only |
| How you start a cloud task | ChatGPT web or desktop, mobile, CLI, Enterprise Slack | Web, Claude apps, CLI, Slack, scheduled tasks |
| What you get back | Diff and test results; commit or open a PR | A branch with a diff; you create the PR |
| Between tasks | Task VM state kept up to 7 days | VM pauses with files saved; may be reclaimed |
| Entry price with cloud agent | ChatGPT Plus, $20 per month | Claude Pro, $20 per month |
| Team plan | Business, $25 per user per month | Team standard, $25 per seat per month |

## What is Codex?

Codex is OpenAI's coding agent. It runs [on the web, in the CLI, in the IDE extension and on iOS](https://learn.chatgpt.com/docs/pricing), and is included in ChatGPT plans. Locally you can also use it with an API key, billed at API rates.

Codex cloud is the cloud coding agent, found under Work in > Cloud in ChatGPT. [Each cloud task runs in a VM](https://learn.chatgpt.com/docs/environments/cloud-environments) started from a published cloud environment: you pick GitHub repositories, Codex inspects them, installs dependencies and tests the workflow, and you review and publish the result. You start tasks from ChatGPT on the web or desktop, the mobile app, or the terminal with `codex cloud exec`, and Enterprise workspaces can delegate from Slack or Microsoft Teams with @ChatGPT. You get changed files and test results back, then [commit or open a pull request](https://learn.chatgpt.com/docs/cloud) when you are ready, or pull the diff into your local checkout with `codex apply`.

## What is Claude Code?

Claude Code is Anthropic's agentic coding tool. It is [available in your terminal, IDE, desktop app and browser](https://code.claude.com/docs/en/overview), with extensions for VS Code and JetBrains, and it can use a Claude subscription or an Anthropic Console account.

Claude Code on the web is the cloud coding agent. Each session runs [in an isolated, Anthropic-managed VM](https://code.claude.com/docs/en/claude-code-on-the-web), started from claude.ai/code, the Claude mobile and desktop apps, the terminal with `claude --cloud`, Slack or cloud scheduled tasks. Claude pushes changes to a branch, you review the diff and create a pull request, and an optional Auto-fix mode watches the PR and pushes fixes for CI failures and review comments. You can pull a cloud session back into your terminal with `--teleport`.

## Key differences

### Models and account

Codex uses OpenAI models only, and Codex cloud [requires a ChatGPT sign-in](https://learn.chatgpt.com/docs/pricing): with an API key you get the local CLI, SDK and IDE extension, but not cloud tasks. Claude Code uses Claude models only, and cloud sessions [require a claude.ai subscription sign-in](https://code.claude.com/docs/en/claude-code-on-the-web), not an API key, Bedrock or Vertex. In both cases the cloud agent comes with the subscription, so the account you already have usually decides the first one you try.

### Cloud environment and machine size

Codex builds the environment for you: it installs dependencies, tests the setup and saves it as a script you publish, and you change it later by describing the change. [Default VMs](https://learn.chatgpt.com/docs/environments/cloud-environments) are 2 vCPUs, 8 GiB of RAM and 8 GiB of disk on Plus, and 4 vCPUs, 16 GiB and 32 GiB on Pro, Business and Enterprise. Codex cloud also supports Tailscale for private networks and short-lived cloud credentials through OIDC. Claude Code cloud sessions get [Ubuntu 24.04 with 4 vCPUs, 16 GB of RAM and 30 GB of disk](https://code.claude.com/docs/en/cloud-environments) on every plan, with Docker, PostgreSQL and Redis preinstalled, and you write the setup script yourself. Its result is cached for later sessions.

### Moving work between laptop and cloud

Both connect the CLI to the cloud. Codex starts cloud tasks with `codex cloud exec` and brings a cloud task's diff down with `codex apply`. Claude Code starts cloud sessions with `claude --cloud` and moves a whole session and its branch into your terminal with `--teleport`. Claude Code also has Auto-fix for open PRs. Codex keeps each task's VM state, including uncommitted changes and installed tools, for up to seven days after the last turn. A Claude Code session's VM pauses with its files saved and can later be reclaimed, in which case you get a fresh VM with the conversation restored.

### Where it works

Neither cloud agent can push to GitLab today. Codex cloud lists GitLab and self-hosted GitHub Enterprise Server, as well as computer and browser use, as not yet supported. Claude Code on the web needs GitHub to clone repositories and create PRs (other hosts can only upload a one-way bundle), supports GitHub Enterprise Server on Team and Enterprise plans, and can route sessions to [self-hosted environments](https://code.claude.com/docs/en/self-hosted-environments) in public beta. For Slack, Claude Code has an @Claude app on Pro and Max (Team and Enterprise use Claude Tag), while Codex's @ChatGPT delegation is for Enterprise workspaces.

## Pricing compared

As of October 2026, both cloud agents are included in their vendor's plans with no separate VM charge, and both draw on the plan's usage limits. Codex comes with [ChatGPT Plus at $20 a month, Pro from $100 a month](https://learn.chatgpt.com/docs/pricing) (plans at $100, $200 or $500) and Business at $25 per user per month billed monthly ($20 billed annually). Cloud tasks share usage with local messages and may use more of it. Claude Code comes with [Claude Pro at $20 a month](https://claude.com/pricing) billed monthly ($17 billed annually), Max from $100 a month, and Team standard seats at $25 per seat per month billed monthly ($20 annually). Claude Code is not included on the Claude Free plan.

For one developer the entry price is the same: $20 a month. For a team of five on monthly billing, ChatGPT Business is 5 × $25 = $125 a month and Claude Team standard seats are 5 × $25 = $125 a month. The real difference is how much work each plan's usage limits allow, which depends on the models and tasks you run.

## When to choose Codex

- You already pay for ChatGPT, or prefer OpenAI models for your code.
- You want the agent to prepare and test the cloud environment for you.
- You need private network access through Tailscale, or short-lived cloud credentials through OIDC.
- You want each task's VM state kept for up to seven days, resumable from any device.

## When to choose Claude Code

- You already pay for Claude, or prefer Claude models for your code.
- You live in the terminal and want `--cloud` and `--teleport` to move sessions between laptop and cloud.
- You want Auto-fix to keep pushing fixes to a PR for CI failures and review comments.
- You want the same 4 vCPU, 16 GB machine on the $20 plan, with Docker and databases preinstalled.

## Run both from Slack

You don't have to pick one for the whole team. [OpenComputer](/) runs both Claude Code and Codex in its cloud: you mention @Computer in a Slack thread, pick the agent per request, and get a pull request back. It can sign in with the Claude or ChatGPT subscription you already have. Each Slack workspace gets one cloud Linux machine, and each thread works in its own copy of the repos on its own branch. It is billed per workspace for work minutes, on top of your model plan. See [OpenComputer vs Codex cloud](/compare/opencomputer-vs-codex) and [OpenComputer vs Claude Code on the web](/compare/opencomputer-vs-claude-code) for the details.

## FAQ

### Is Codex or Claude Code better?

Neither is better for every team. Both are cloud coding agents included in a $20 a month plan, and the main difference is the model family: OpenAI models for Codex, Claude models for Claude Code. Try both on a real task in your own repository, and weigh the plan you already pay for.

### Can I use Codex and Claude Code together?

Yes. They are separate tools with separate subscriptions, so you can run both on the same repository. Each needs its own plan for cloud tasks: a ChatGPT plan for Codex cloud and a Claude plan for Claude Code on the web.

### Do Codex and Claude Code run in the cloud or on my machine?

Both do both. Each has a CLI and IDE extensions that run on your machine, and each has a cloud agent that runs tasks on a vendor-managed VM: Codex cloud inside ChatGPT, and Claude Code on the web at claude.ai/code.

### How much do Codex and Claude Code cost?

As of October 2026, Codex cloud is included in ChatGPT Plus at $20 a month and Claude Code on the web in Claude Pro at $20 a month. Higher tiers start at $100 a month on both, and team plans are $25 per user or seat per month billed monthly. Neither charges separately for the cloud VM.

### Can I use an API key for cloud tasks?

Not on either one. Codex cloud needs a ChatGPT sign-in, and Claude Code on the web needs a claude.ai subscription sign-in. API keys work with the local CLIs.

## Sources

- [Codex cloud](https://learn.chatgpt.com/docs/cloud)
- [Codex cloud environments](https://learn.chatgpt.com/docs/environments/cloud-environments)
- [Codex pricing](https://learn.chatgpt.com/docs/pricing)
- [Claude Code overview](https://code.claude.com/docs/en/overview)
- [Claude Code on the web](https://code.claude.com/docs/en/claude-code-on-the-web)
- [Claude Code cloud environments](https://code.claude.com/docs/en/cloud-environments)
- [Claude Code self-hosted environments](https://code.claude.com/docs/en/self-hosted-environments)
- [Claude pricing](https://claude.com/pricing)
