AI News

Codex vs Claude Code (2026): Models, Costs and Tested Tasks

Choose Codex if your work already spans ChatGPT, local projects and delegated repository tasks. Choose Claude Code if its terminal workflow and Claude outputs already suit your codebase. Neither product earns a universal coding win from the evidence here. Start with the tool that completes your own acceptance tests with less repair, then buy enough allowance to keep that workflow running.

Model, price and limit guidance checked September 29, 2026. The paired coding fixtures were run September 26 Pacific using existing ChatGPT Pro and Claude Pro subscriptions; Claude Max remains untested.

For the broader landscape, visit our AI coding agents hub, Codex product record and Claude Code product record.

Codex vs Claude Code: choose by working pattern

On a narrow screen, scroll tables sideways to see every column.

Editorial recommendations, not measured performance rankings
Your working patternWhere to startWhat to check before committing
You already use ChatGPT for research and Codex for implementationCodexWhether the shared Work/Codex allowance covers both activities
You already get dependable patches from Claude CodeClaude CodeThe model you select, session and weekly limits, and time spent reviewing patches
You want repository work to continue away from your laptopEvaluate each product’s hosted workflowRepository access, setup, available models and secrets; local and hosted environments differ
You need strict control over file and network accessEvaluate both against your actual policyEnforced sandbox boundaries, approvals and organization controls
You have no established preferenceTrial bounded tasks on an entry plan firstCorrect output and repair time before a $100 or $200 subscription

These recommendations preserve the useful question behind any agent comparison: can the product operate effectively inside your working environment? A model score cannot tell you whether the agent found the right files, had permission to run the build, or handed back a change your team can maintain.

Current models and product surfaces

Codex and Claude Code are coding products. Astra and Opus are models those products can use. An agent adds tools, instructions, execution controls and a working environment around the model. Changing any of those can change the result.

QuestionCodexClaude Code
Current model choices to evaluateGPT-6 Astra, GPT-6.1 Sol (rolling out), GPT-6 Sol and GPT-6 LunaClaude Sonnet 5.5, Opus 5.5 and Fable 5.1, alongside other supported Claude models
Where it runsDesktop app, CLI, IDE extension and hosted repository workflows; model availability varies by surfaceTerminal, IDE integrations, desktop and web workflows; availability and setup vary
Important availability distinctionOpenAI lists Astra for local Codex surfaces but not Codex cloud in its model tableModel availability can depend on plan and provider; verify the selected model in your session
Settings to record in a comparisonExact model, effort, speed mode, permissions and local/cloud environmentExact model, effort, permissions, provider and local/hosted environment

Sources: OpenAI’s current models and surface availability, Anthropic’s model catalog and Claude Code’s product overview.

Claude Sonnet 5.5 was released on September 28, 2026. Model choices were rechecked September 29; GPT-6.1 Sol availability depends on account, client and workspace rollout. The paired results below record the earlier Astra and Opus 5.5 configuration. Source: Anthropic’s Sonnet 5.5 release.

OpenAI recommends GPT-6.1 Sol for complex coding and agentic work when available, and Luna for focused, repeatable tasks. Astra remains an option for especially demanding work. That is vendor guidance, not a result from our paired fixtures. Matching the “medium” label across products does not calibrate their compute. Record the settings rather than silently treating them as equal.

What Kingy tested on September 26, 2026

On September 26, 2026 Pacific, we ran three small, deliberately broken Python fixtures through Codex CLI and Claude Code. Each product had two fresh scored attempts per fixture, starting from the same files and prompt. Runs used Python 3.14, medium effort and a 15-minute ceiling. We selected gpt-6-astra and claude-opus-5-5. Codex used an existing ChatGPT Pro subscription; Claude Code used first-party Claude Pro authentication. These runs predate the September 28 Sonnet 5.5 release and do not evaluate that model. We did not test Claude Max.

Scored attempts passing all supplied and frozen hidden checks
FixtureCodex CLIClaude CodeEvidence
Merge reservation windows2 of 2; 13 supplied and 5 hidden checks each2 of 2; 13 supplied and 5 hidden checks eachDownload interval evidence (ZIP)
Decimal ledger and CLI2 of 2; 10 supplied and 8 hidden checks each2 of 2; 10 supplied and 8 hidden checks eachDownload ledger evidence (ZIP)
Discount, tax and shipping checkout2 of 2; 5 supplied and 8 hidden checks each2 of 2; 5 supplied and 8 hidden checks eachDownload checkout evidence (ZIP)

Both products passed all six scored attempts on these checks. The hidden tests were frozen before the scored runs and executed after each agent finished. No human code correction was applied before grading. An earlier, unscored Astra checkout run exposed a wrong expected total in one supplied test. We corrected it, froze the revised fixture and restarted all four scored checkout attempts; the archive retains the invalidated run note.

The frozen scores did not cover every valid input. In a later probe, both Claude interval patches raised OverflowError on a valid integer endpoint of 10**400; both Codex patches returned the expected merged interval. In another later probe, one Claude ledger CLI patch printed a traceback for malformed JSON instead of exiting 2 with a concise error. These probes were devised after the scored runs and do not change the frozen-test results.

Three synthetic Python tasks do not establish a general coding winner or production reliability. Tool access also differed: some Claude shell calls were denied in the ledger and checkout runs, although its patches passed the frozen checks. The short timings do not support a speed ranking. No account-wide quiet period was verified, so coarse subscription-meter changes cannot be assigned to individual tasks or used to compare plan endurance.

Our earlier Astra-only evidence archive records two separate, low-effort Codex runs. Those observations are not part of the six matched Astra attempts above.

Repository instructions and integrations

Repository instructions help an agent discover build commands, coding conventions and review expectations. They still need to be accurate: a stale test command can waste a session regardless of the model.

Claude Code now supports AGENTS.md directly, with conditions. Anthropic documents this from version 2.1.277. By default, AGENTS.md applies when there is no competing CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md in the relevant current or ancestor directories. Where Claude instruction files exist, use the documented import or configuration approach. Older clients and some earlier configurations have additional limitations. The claim that Claude Code simply cannot read AGENTS.md is outdated. Source: Claude Code memory and instruction precedence.

Codex supports repository guidance in its GitHub review workflow. OpenAI documents requested reviews through @codex review and configured automatic reviews. Claude Code offers a GitHub Actions integration with its own setup and authentication requirements. Neither integration removes the need for tests or branch protection. Codex GitHub setup; Claude Code GitHub Actions.

Claude Code also supports MCP connections to external tools. A connector’s existence is only the first check: confirm that your account can authenticate, the needed operation is available and the agent has suitable permissions. Tool access in a desktop session should not be assumed to carry into a hosted job. Claude Code MCP documentation; OpenAI’s local and cloud environment distinctions.

Permissions and sandboxing: inspect the actual controls

Both products document execution controls. Approvals determine when an action needs permission; a sandbox restricts what execution can access. A sentence in an instruction file is not a substitute for an enforced filesystem or network boundary. Codex permissions; Codex sandboxing; Claude Code permissions; Claude Code sandboxing.

For team adoption, test concrete questions. Can the agent read outside the intended project? Can a build command reach the network? Who can change those rules? What happens when an action is denied? Make that evaluation on the operating system and execution surface you will actually deploy. This article does not establish a privacy or compliance winner.

Subscription costs and practical limits

For individual web subscriptions in US dollars, ChatGPT Plus and Claude Pro each start at $20 monthly. ChatGPT Pro has $100, $200 and $500 tiers; Claude Max has $100 and $200 tiers. Taxes and regional or app-store prices may differ. OpenAI pricing; Claude pricing.

ChatGPT Pro $200 is available for new subscriptions again. New subscribers who do not qualify for grandfathering receive a lower allowance than the earlier $200 plan. Eligible existing or recently lapsed subscribers retain the previous allowance through October 29, 2026. Pro $500 adds Astra Ultrafast; buying credits on Pro $100 or $200 does not unlock it. Source: OpenAI’s current Pro tiers and allowance eligibility.

OpenAI’s pricing page now says Pro plans have no five-hour limit in Work/Codex. Other applicable allowances still constrain use; check your account’s usage display. Claude Max retains five-hour session and weekly limits. Source: OpenAI’s current pricing and usage guidance. Claude Max limits.

Work and Codex share usage capacity, including local and cloud work. Claude Code and other Claude interfaces also share subscription limits. These are separate providers’ pools with different rules; Claude’s capacity multipliers cannot be used to infer OpenAI allowance. Our ChatGPT Pro vs Claude Max guide compares the tiers, reset behavior, model restrictions and paid continuation.

API billing is separate from an ordinary subscription allowance. Check how the CLI authenticates: an API key can change the billing route. Anthropic specifically warns that an ANTHROPIC_API_KEY environment variable can select API billing even when you also have a subscription. Claude Code subscription authentication; OpenAI billing guidance.

Context capacity and usage allowance are different constraints. Summarizing an old conversation can help a model continue working, but it does not create an unlimited context window or reset the subscription meter. Buying usage credits is likewise not a fix for every oversized input. Diagnose the limit before paying to continue.

How to run a comparison that helps your team

  1. Start from the same repository state. Include a reproducible environment and completion criteria written before either run.
  2. Choose representative work. Use one bug fix, one change across files and one task requiring unfamiliar code. Our three synthetic fixtures are a small starting point.
  3. Record the whole configuration. Include model, client version, effort, tools, permissions and authentication route.
  4. Measure finished work. Inspect the diff, run acceptance checks and record manual repair time. Keep failed attempts.
  5. Evaluate capacity separately. Quiet the account before usage measurements, capture every applicable window and record the actual observation period.

For published model evaluations, compare the same benchmark, version, metric and setup. A GDPval result and a GPQA score cannot be placed in one “quality” row as if they measure the same thing. Our Astra vs Opus 5.5 model comparison separates model evidence from this product and workflow decision.

Frequently asked questions

Which is better for autonomous coding?

The better choice is the one that completes your scoped task with acceptable review effort under your permissions and budget. In our three synthetic Python fixtures, both products passed six of six scored attempts on the frozen checks. We did not conduct a long-running autonomy study or establish a general winner.

Do I need a $100 plan to try these workflows?

Not necessarily. Start with the relevant entry plan and verify its current model access and allowance. Upgrade when a specific limit interrupts useful work, rather than assuming a more expensive tier will improve every patch.

Can I compare the tools using the same AGENTS.md?

Yes, with attention to client versions and instruction precedence. Current Claude Code supports it under the documented conditions above. Verify what each agent loaded before treating a run as equivalent.

Does a passing test suite prove the change is ready to merge?

No. Tests establish the behaviors they cover. Review the patch, missing cases, dependencies and operational effects before merging.

Update note: the original April publication date is retained. The September 29 update adds GPT-6.1 Sol, restores the current Pro $200 purchase guidance and separates current plan limits from the dated paired test results.