VOOZH about

URL: https://www.morphllm.com/comparisons/claude-code-vs-codex

⇱ Claude Code vs Codex Pricing & Limits (June 2026): Which Plan, 5-Hour Windows, Weekly Caps


Claude Code vs Codex Pricing & Limits (June 2026): Which Plan, 5-Hour Windows, Weekly Caps

Claude Code bundles into Claude Pro at $20/mo (5-hour window + weekly cap, ~40-80 Sonnet hours/week). Codex runs on ChatGPT Plus at $20/mo (15-80 local messages per 5-hour window, 5 cloud tasks). Exact plan-by-plan limits, credit rates, and which subscription to buy for your usage.

June 9, 2026 · 1 min read

Both tools cost $20/mo at the entry tier. They meter usage in completely different units. Claude Code gives you a 5-hour rolling session window plus a weekly cap measured in active model hours. Codex gives you a 5-hour window measured in messages (15 to 80 local messages on Plus) plus separate cloud-task and code-review allowances.

That difference decides which plan you should buy. If you code in long uninterrupted sessions, Claude Code's hour-based caps run out differently than Codex's message-based caps. If you fan out cloud tasks and PR reviews, Codex meters those separately from your local chat.

This page is the plan-decision guide: exact 5-hour windows, weekly limits, credit rates, and which subscription matches your usage. For the head-to-head capability benchmark (SWE-bench, Terminal-Bench, subagent architecture), see the Codex vs Claude Code comparison.

$20/mo
Entry tier (both)
~40-80 hrs
Claude Pro Sonnet/week
15-80 msgs
Codex Plus per window
$100/mo
Heavy tier (both)

Which Plan Should You Buy?

Skip to the answer. Both tools start at $20/mo. The right plan depends on how heavily you use it and whether your work is interactive sessions or fanned-out cloud tasks.

Your usageBest planCostWhy
Light, a few hours/weekClaude Pro or ChatGPT Plus$20/moBoth entry tiers cover light daily coding
Long continuous coding sessionsClaude Code on Pro/Max$20-$100/moHour-based caps suit uninterrupted work
Many parallel cloud tasks + PR reviewsCodex on Plus/Pro$20-$100/moCloud tasks and reviews metered separately
Heavy daily use, one toolClaude Max 5x or Codex Pro 5x$100/mo5x token budget over the entry tier
Maximum throughputClaude Max 20x or Codex Pro 20x$200/moHighest limits, 300-1600 Codex msgs/window
Pay only for what you runAPI key on eitherPer-tokenNo cloud features in API-key mode

The one-line answer

Code in long, uninterrupted sessions? Claude Code, because its caps are measured in active model hours. Fan out background tasks, cloud runs, and automated PR reviews? Codex, because those are metered separately from your local message count.

How Each Tool Meters Usage

The unit of metering is the single most important difference for picking a plan. They are not comparable one to one.

DimensionClaude CodeOpenAI Codex
Short-term window5-hour rolling, measured in active model hours5-hour rolling, measured in messages
Window startAt your first messageAt your first message; Plus and Pro share one combined window across local + cloud
Long-term capWeekly limit over 7 days, all modelsNo fixed weekly cap; per-window message and credit budget
Shared across surfacesclaude.ai, Claude Desktop, and Claude Code on one subscriptionLocal CLI/IDE + cloud tasks share the 5-hour window
Where to check usageProgress bars under Settings then UsagePer-window message and credit counters

The 5-Hour Window, Explained

Both tools use a 5-hour rolling window that starts at your first message of a session, not at a fixed clock time. What fills the window is where they diverge.

Claude Code: active model hours

Claude Code counts "active hours," the time models spend processing, not wall-clock time. A 5-hour window can cover far more than 5 clock hours if you are reading, thinking, and typing between runs. The same window is shared across claude.ai, Claude Desktop, and Claude Code on one subscription. A weekly limit over a rolling 7 days sits on top of the per-window cap and covers all models.

Codex: messages, cloud tasks, code reviews

Codex counts discrete units per 5-hour window. On ChatGPT Plus that is 15 to 80 local messages, 5 cloud tasks, and 5 code reviews. Plus and Pro share one combined 5-hour window across local and cloud usage, so a heavy cloud run eats into your local message budget for that window.

Codex Local Messages per 5-Hour Window

Higher is more headroom before you hit the cap. ChatGPT plan tiers.

1Pro 20x ($200/mo)300-16001600 msgs
2Pro 5x ($100/mo)80-400400 msgs
3Plus ($20/mo)15-8080 msgs

Ranges are per 5-hour window. GPT-5.5 usage averages 5-45 credits per message. Source: OpenAI Codex pricing.

Claude Code Weekly Caps by Plan

Claude Code adds a weekly limit on top of the 5-hour window. Anthropic publishes ranges (reported below) measured in active Sonnet hours, with separate, smaller Opus allowances on the top tier.

PlanPriceSonnet hours/weekOpus
Pro$20/mo ($17/mo annual)~40-80 hoursLimited
Max 5x$100/mo~140-280 hoursHigher allowance
Max 20x$200/mo~240-480 hoursUp to ~40 Opus hours

"Active hours" means time models are processing, not wall-clock time. Ranges are Anthropic-published guidance as reported; your mileage depends on model choice and task length.

Free plan does not include Claude Code

Claude Code requires Pro, Max, Team, Enterprise, or a Console (API) account. The free Claude.ai plan does not include it. Claude Pro is $20/mo monthly or $17/mo billed annually ($200 up front) and explicitly "Includes Claude Code." It also runs via Amazon Bedrock, Google Vertex AI, or Microsoft Foundry.

Codex Messages, Cloud Tasks, and Credit Rates

Codex meters in messages per window, then converts model usage into credits. Plus and Pro users who hit limits can buy additional credits.

ChatGPT planPriceLocal messagesCloud / reviews
Plus$20/mo15-805 cloud tasks, 5 code reviews
Pro 5x$100/mo80-400Higher
Pro 20x$200/mo300-1600Highest
BusinessPay-as-you-goPlus-level limitsPay-as-you-go
Enterprise / EduFlexibleNo fixed rate limitsFlexible

Codex credit rates per 1M tokens

ModelInputCachedOutput
GPT-5.512512.5750
GPT-5.462.56.25375
GPT-5.4-mini18.751.875113
GPT-5.3-Codex43.754.375350

GPT-5.5 usage averages 5-45 credits per message. Codex CLI switches models via the /model command (GPT-5.4, GPT-5.3-Codex, adjustable reasoning levels); Pro plans get the GPT-5.3-Codex-Spark research preview. Source: OpenAI Codex pricing and CLI docs.

Plan-by-Plan Pricing

TierClaude Code (via Claude)Codex (via ChatGPT)
FreeNot included on free Claude.aiChatGPT Free $0 (limited)
Entry paidPro $20/mo ($17/mo annual)Plus $20/mo (Go $8/mo cheaper tier)
HeavyMax from $100/moPro 5x from $100/mo
MaximumMax 20x $200/moPro 20x $200/mo
Pay-per-tokenConsole (API) accountOpenAI API key (no cloud features)

The ChatGPT Pro $100 tier launched April 9, 2026 as a new middle option, with Pro $200 remaining the ceiling. See the full Morph pricing if you want to run open-source models yourself instead of paying frontier subscription rates.

Install and Sign In

Claude Code

Native install (recommended). macOS, Linux, and WSL:

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

Windows PowerShell:

irm https://claude.ai/install.ps1 | iex

Also available via brew install --cask claude-code, winget install Anthropic.ClaudeCode, npm install -g @anthropic-ai/claude-code (Node 18+), and signed apt/dnf/apk repos. Native installs auto-update in the background; the stable channel runs about one week behind latest. Requirements: macOS 13.0+, Windows 10 1809+, Ubuntu 20.04+ (Debian 10+, Alpine 3.19+), 4GB+ RAM. A Desktop GUI app exists for macOS and Windows.

OpenAI Codex

Mac and Linux:

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

Windows:

powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"

Also npm install -g @openai/codex or brew install --cask codex. Run codex and choose "Sign in with ChatGPT." Codex surfaces include the CLI, an IDE extension (VS Code, Cursor, Windsurf), Codex Web at chatgpt.com/codex, a desktop app (codex app), and iOS. Cloud integrations add automatic code review and Slack.

MCP support

Both support Model Context Protocol servers. Claude Code adds them with:

claude mcp add --transport http notion https://mcp.notion.com/mcp

Claude Code supports http, sse (deprecated), and stdio transports, with JSON config via .mcp.json, ~/.claude.json, or claude mcp add-json. Codex configures MCP servers and switches models with its own /model command.

If You Run Models Yourself Instead

Subscription caps exist because frontier models are expensive to serve. If your workflow is API-driven or you want to run open-source models without a 5-hour window or a weekly cap, the variable that matters is per-token cost and output fidelity.

Morph Open Source Models is the best place to run DeepSeek and the best for codegen specifically. Morph serves DeepSeek with 16-bit (bf16) activations and no fp8/int8 quantization. Most serverless providers quantize activations to fp8 to cut cost, which degrades output quality; keeping full 16-bit activations means responses match the reference weights, so it is the best option when output fidelity matters. For coding agents, Morph runs codegen-specific speculative decoding (draft and ngram tuned on code) plus custom low-level inference kernels, which makes it the fastest and highest-quality option for code generation rather than a general-purpose menu.

OptionInput / 1MOutput / 1MNotes
morph-dsv4flash (DeepSeek V4 Flash)$0.139$0.27816-bit activations, codegen-tuned
Codex GPT-5.5 (credit-based)125 credits750 creditsPer 5-hour window message budget
Claude Opus 4.8 (API)$5.00$25.00Fast mode $10/$50 at 2.5x speed

See Morph models and pricing for the full list. morph-v3-fast serves at roughly 10,500 tok/s.

Decision Framework

Your situationBuy thisReason
Solo dev, a few hours a dayClaude Pro $20 or ChatGPT Plus $20Entry tier covers light daily coding either way
Long continuous pairing sessionsClaude Code (Pro then Max)Caps measured in active model hours fit uninterrupted work
Background cloud tasks + automated PR reviewCodex (Plus then Pro)Cloud tasks and reviews are metered separately from local messages
Need the cheapest paid Codex tierChatGPT Go $8/moLowest Codex entry price below Plus
Hit the cap mid-task oftenMove up a tier or buy creditsMax 5x / Pro 5x at $100, or buy extra Codex credits
No usage window at allAPI key, or run open models on MorphPer-token billing, no 5-hour or weekly cap

Frequently Asked Questions

What is the 5-hour limit in Claude Code and Codex?

Both use a 5-hour rolling window that starts at your first message. Claude Code measures it in active model hours and shares it across claude.ai, Claude Desktop, and Claude Code on one subscription, then caps you again with a weekly limit over 7 days. Codex measures it in messages: ChatGPT Plus gets 15-80 local messages, 5 cloud tasks, and 5 code reviews per window, and Plus and Pro share one combined window across local and cloud usage.

Which plan should I buy for Claude Code vs Codex?

Both start at $20/mo: Claude Pro includes Claude Code, ChatGPT Plus includes Codex. Claude Pro gives roughly 40-80 Sonnet hours per week. ChatGPT Plus gives 15-80 local Codex messages per 5-hour window. For heavy use, Claude Max 5x ($100/mo, about 140-280 Sonnet hours/week) or Codex Pro 5x ($100/mo, 80-400 local messages/window). Pick Claude Code for long continuous sessions, Codex for fanned-out cloud tasks and reviews.

Does the free Claude.ai plan include Claude Code?

No. Claude Code requires Pro, Max, Team, Enterprise, or a Console (API) account. Claude Pro is $20/mo monthly or $17/mo billed annually ($200 up front) and explicitly includes Claude Code. Codex similarly requires ChatGPT Plus, Pro, Business, Edu, or Enterprise to sign in with ChatGPT.

How many messages do you get with Codex per 5-hour window?

ChatGPT Plus ($20/mo) gives 15-80 local messages, 5 cloud tasks, and 5 code reviews per window. Codex Pro 5x gives 80-400 local messages; Pro 20x gives 300-1600. GPT-5.5 usage averages 5-45 credits per message, and Plus or Pro users who hit limits can buy additional credits.

What does Claude Code cost per month compared to Codex?

Entry tier is $20/mo for both. Claude Max starts from $100/mo; Codex maps to ChatGPT Pro from $100/mo (5x and 20x). Codex also has cheaper ChatGPT tiers (Free $0, Go $8/mo) at lower limits. Both support API-key billing at per-token rates, with no cloud features in API-key mode.

Is Codex or Claude Code better on benchmarks?

On Terminal-Bench 2.1, Codex CLI with GPT-5.5 leads at 83.4%, and Claude Code with Opus 4.8 follows at 78.9%. On SWE-bench Verified (self-reported), Claude Opus 4.8 is at 88.6%. This page is the plan and limits guide; for the full benchmark and subagent-architecture breakdown, read the Codex vs Claude Code comparison.

Run DeepSeek and Open Models Without a Usage Window

Morph serves DeepSeek with full 16-bit activations and codegen-tuned speculative decoding. morph-dsv4flash is $0.139/1M input and $0.278/1M output, billed per token with no 5-hour or weekly cap. WarpGrep, the agentic code search tool, is free to 100k requests and improves any coding agent's context.

Sources