vbtnl_Connect to AI
Comparisons8 min read

Codex vs Claude Code in 2026: price, limits, features

codex vs claude codeclaude code vs codexclaude codecodexcodex climcp server

Codex and Claude Code do the same job. You describe what you want, and the agent reads your files, writes code, runs commands and fixes what breaks. Codex is made by OpenAI and comes with ChatGPT plans. Claude Code is made by Anthropic and comes with Claude plans.

This page compares them on price, limits, where each one runs, how you add tools, and what happens to your project if you switch.

A note for honesty: we build vbtnl, a hosting that both agents can use. We don't sell either agent. We checked the facts on OpenAI's and Anthropic's own pages on 24 November 2026. Prices and limits change often, so check them again before you buy.

The short version

CodexClaude Code
Made byOpenAIAnthropic
Cheapest plan with the terminal agentChatGPT Plus, $20/moClaude Pro, $20/mo, or $17/mo billed yearly
Bigger plansPro at $100, $200 or $500/moMax $100/mo, Ultra $200/mo
Free planA smaller model in the desktop app onlyNo
LimitsA five-hour limit on Plus, none on Pro for now. A weekly limit may applyA five-hour limit and a weekly limit on Pro and Max. Weekly only on verified Ultra accounts
Pay by API keyYesYes
TerminalYesYes
EditorsVS Code, Cursor, Windsurf. JetBrains and Xcode have their own Codex integrationsVS Code, Cursor, JetBrains
Desktop appmacOS, Windows, LinuxmacOS, Windows, Linux (beta)
PhoneiOSiOS and Android
Cloud sessionsYesYes
Instructions fileAGENTS.mdCLAUDE.md, and it can read AGENTS.md
Add a remote MCP servercodex mcp add <name> --url <url>claude mcp add --transport http <name> <url>
Run without a chatcodex execclaude -p
Open sourceThe CLI is, under Apache-2.0No

Price

Both start at $20 a month, and neither sells the agent on its own. You buy a ChatGPT or Claude plan and the agent comes with it.

Codex. ChatGPT Plus costs $20 a month and includes Codex in the terminal, in the editor, on the web and on iOS. Pro comes in three sizes: $100, $200 or $500 a month. Business costs $25 per user a month, or $20 billed yearly. The Free and Go plans get a smaller model in the desktop app, and OpenAI says this is still rolling out.

Claude Code. Claude Pro costs $20 a month, or $200 for a year. Max costs $100 a month and Ultra $200. A Team seat costs $25 a month, and a Premium seat $125. The free Claude plan doesn't include Claude Code.

By API key. Both agents also work with an API key, and then you pay for tokens. OpenAI doesn't name one default model for Codex. Its docs use GPT-6.2 Sol in examples, and the pricing page lists it at $2 per million input tokens and $10 per million output tokens for usage-based billing. Claude Code uses Opus 5.5 by default: $4 per million input tokens and $20 per million output tokens. With an API key, Codex doesn't get its cloud features, such as code review on GitHub.

The price per token doesn't tell you what a task costs. One agent can use more tokens than the other for the same work.

Limits

On a plan you don't pay per task. You get an amount of use, and it comes back after some time.

Codex. On Plus, the limit counts messages in a five-hour period. OpenAI gives estimates, not fixed numbers. For GPT-6.2 Sol it is 17 to 180 local messages per five hours, because a big task uses more than a small one. Pro plans have no five-hour limit for now. OpenAI adds that weekly limits may apply, and that cloud tasks use more of your limit than local ones. When you run out on Plus or Pro, you can buy credits.

Claude Code. Pro and Max have a five-hour limit and a weekly limit. The five hours start with your first message. Ultra has a weekly limit, and verified Ultra accounts have no five-hour limit. The limits are shared between Claude Code and the normal Claude chat, so a long chat leaves less for coding. Anthropic doesn't publish exact numbers. When you run out, you can add credits at API prices.

Where each one runs

Both started in the terminal and now run in many places.

Codex has a CLI, an extension for VS Code, Cursor and Windsurf, and a place in the ChatGPT desktop app on macOS, Windows and Linux. It has cloud sessions that you start on the web, in the desktop app or with codex cloud. On a phone it works on iOS. It can also review pull requests on GitHub when you write @codex review.

Claude Code has a CLI, extensions for VS Code, Cursor and JetBrains, and a desktop app for macOS and Windows, with Linux in beta. Cloud sessions run at claude.ai/code. On a phone it works in the Claude app on iOS and Android. It also works from Slack.

Install on macOS or Linux:

bash
# Codex
curl -fsSL https://chatgpt.com/codex/install.sh | sh

# Claude Code
curl -fsSL https://claude.ai/install.sh | bash

Both are also in Homebrew and npm, and both run on Windows.

Tools: MCP servers

Both agents take new tools from MCP servers, and both can log in to a remote server in the browser with OAuth. The commands differ a little.

bash
# Codex
codex mcp add vbtnl --url https://api.vbtnl.com/mcp
codex mcp login vbtnl

# Claude Code
claude mcp add --transport http vbtnl https://api.vbtnl.com/mcp
claude mcp login vbtnl

Codex keeps its servers in ~/.codex/config.toml. Claude Code keeps them in ~/.claude.json, or in .mcp.json in the project when you want to share them with your team. Full steps: MCP in Codex and MCP in Claude Code.

Other differences

  • Instructions for the agent. Codex reads AGENTS.md before it starts. Claude Code reads CLAUDE.md, and it can read AGENTS.md when there is no CLAUDE.md. One AGENTS.md file works for both.
  • Safety. Codex runs commands in a sandbox by default. In a git project it can write in the project folder and asks before it goes further. In a folder without git it starts read-only. Claude Code asks for permission step by step by default, and its sandbox is off until you turn it on with /sandbox.
  • Undo. Claude Code saves checkpoints of the files it edits. You go back with /rewind. A file that only shell commands changed is not tracked.
  • Subagents, skills, plugins, hooks. Both have all four, and they work in a similar way.
  • Source code. The Codex CLI is open source under Apache-2.0 and written in Rust. Claude Code is not open source.

Pick Codex if

  • you already pay for ChatGPT Plus or Pro,
  • you want an open-source CLI,
  • you want a sandbox that is on by default,
  • you want pull request reviews on GitHub from the same plan.

Pick Claude Code if

  • you already pay for Claude Pro, Max or Ultra,
  • you want to use it from an Android phone,
  • you want checkpoints and /rewind.

You can use both

You don't have to choose forever. Both read AGENTS.md, both use the same MCP servers, and the code they write is plain code in your project.

Hosting works the same way. vbtnl is one MCP server that you add to Codex, Claude Code, Cursor or ChatGPT. The agent writes the code on a vbtnl server, runs it, reads the logs and gives you a link. If you switch agents next month, the project stays where it is, and the new agent picks it up.

The free plan has 1 project and needs no card. On the free plan the live site sleeps after 30 minutes without visits and wakes on the next one.

Setup takes one command: vbtnl in Codex or vbtnl in Claude Code.

FAQ

Is Codex cheaper than Claude Code?

The entry price is the same: $20 a month for ChatGPT Plus or Claude Pro. At the listed usage prices, GPT-6.2 Sol costs half as much per token as Opus 5.5. What one task costs depends on how many tokens the agent uses, and that changes from task to task.

Is Claude Code free?

No. Claude Code needs a paid Claude plan, from Pro at $20 a month, or an API key. The free Claude plan doesn't include it.

Is Codex free?

Partly. OpenAI lists a smaller model in the desktop app for the Free and Go plans, and says this is still rolling out. Codex in the terminal, in the editor and on the web starts with Plus at $20 a month.

Can I use Codex and Claude Code in the same project?

Yes. They don't get in each other's way. Keep the instructions in AGENTS.md: Codex reads it, and Claude Code reads it when there is no CLAUDE.md. Each agent keeps its own list of MCP servers.

Which one is open source?

The Codex CLI. Its code is on GitHub under the Apache-2.0 license. Claude Code is not open source.

Do both work with MCP servers?

Yes. Both add local and remote MCP servers and both log in with OAuth. See MCP in Codex and MCP in Claude Code.

← back to comparisons