
Imagine giving an AI coding agent a fairly ordinary ticket: update authentication across a service, repair the tests that break, and open a pull request. The interesting question is no longer whether the agent can edit files. Both Claude Code and Codex can do that. It's how much direction you give it, where the work runs, what you can inspect before merging, and how much it costs to get a usable result.
The timing matters. Anthropic released Claude Opus 5.5 on September 22 and Sonnet 5.5 on September 28. OpenAI released GPT-6.1 Sol on September 29; it became the Codex CLI default in October. Comparisons based on earlier models can still explain the products, but their benchmark and cost conclusions need updating.
This is a comparison of the tools as they exist in October 2026, not a claim that one agent wins every task.
The short version
Claude Code offers a particularly mature interactive workflow: planning, checkpoints, project instructions, permissions, and tools for guiding a long session.
Codex is strong at well-scoped work across local and cloud environments, with an integrated route from implementation to pull-request review.
Both support planning, skills, hooks, subagents, and unattended cloud tasks. The differences are in workflow and implementation, not a simple checklist of features one side lacks.
At maximum effort, Claude leads on the cited Terminal-Bench 4.0 agent leaderboard. That is a real result, but it is not proof that Claude is better at every type of software engineering.
GPT-6.1 Sol has a large cost-per-task advantage in the cited independent tests. Switching Claude Code to Sonnet 5.5 also changes the cost comparison considerably.
The choice is less about which logo is on the terminal and more about how your team wants to work.
Two tools, two philosophies
Claude Code
Claude Code grew out of the terminal and now runs through a CLI, desktop, web and mobile experiences, and IDE integrations. Its local mode reads and changes files on your machine. It can also run cloud sessions against GitHub repositories, continue working after you've left, and create a pull request when the task is finished.
The interactive experience is where its design is easiest to appreciate:
Plan mode lets you discuss an approach before edits begin.
Checkpoints provide a way to rewind changes and conversation state.
Hooks and skills let teams attach scripts and reusable instructions to workflows.
Subagents can work with separate context and permissions.
Permission controls and sandboxing help define what an agent may read, edit, or execute.
These controls are valuable when you're tracing a production bug or changing a subsystem you don't fully understand. They're also useful for stopping an agent from turning a small repair into a repository-wide rewrite.
One security distinction needs care. Local execution does not mean all code stays local. In a local Claude Code session, relevant repository content is sent to the model service as part of requests. In Anthropic-hosted cloud sessions, the repository is cloned into a remote environment. Data handling, retention, and training terms depend on the account and deployment. For sensitive code, review those terms and your file-access rules rather than treating “local” as a privacy guarantee.
Codex
Codex also works locally through its CLI and IDE integrations, as well as through cloud environments. You can make changes in your own checkout, delegate a bounded task to the cloud, or use its integrations to bring a result back into your normal review process.
Its strengths are practical: running multiple scoped tasks, working against reproducible environments, and reviewing changes through GitHub. Codex supports conventional pull-request review, and eligible accounts can request a separate security-focused review using @codex security review.
It is a mistake, however, to describe Codex as an agent without a supervised workflow. Codex has native Plan Mode in the app, CLI, and IDE extension; /plan creates a reviewable implementation approach before edits. It also has lifecycle hooks, skills, plugins, subagents, and permission controls. Claude Code has strong versions of these features too. The useful comparison is how each behaves with your repository and approval policy, not whether a checkbox exists.
The models behind them
A tool comparison can become misleading when it's really a comparison of the models selected by default. Below are standard published API list prices in US dollars per million input/output tokens, not the cost of a monthly subscription.
Tier | Claude family | OpenAI family |
|---|---|---|
Common coding default | Opus 5.5 — $4 / $20 | GPT-6.1 Sol — $2 / $10 |
Comparable-priced alternative | Sonnet 5.5 — $2 / $10 | GPT-6.1 Sol — $2 / $10 |
Budget | Haiku 5.5 — $0.10 / $0.50 for prompts up to 100K | GPT-6 Luna — $0.10 / $0.50 |
Premium frontier | Fable 5.1 — $10 / $50 | GPT-6 Astra — $10 / $50 |
Maximum published model context | About 1 million tokens | About 1 million tokens |
Claude Code currently resolves its default to Opus 5.5 on many direct Anthropic plans, but the effective default can depend on account, provider, and organization settings. In either tool, verify the selected model rather than assuming a comparison article knows your configuration.
Context pricing deserves separate attention. On the GPT-6.1 Sol API, prompts above 272K input tokens are charged 2× input and 1.5× output rates for the entire request. Opus 5.5 and Sonnet 5.5 publish standard pricing through their million-token windows; Haiku 5.5 has its own higher rates above 100K. This is an API billing comparison, not a promise about the usage deducted from a bundled coding subscription.
What the benchmarks say—and what they don't
Agentic benchmarks measure a model plus an agent harness: its tools, prompts, time limits, retries, and reasoning settings. A model can score differently when it is run in Claude Code, Codex, or a neutral evaluation harness. Keep those conditions attached to the numbers.
Terminal-Bench 4.0: the public agent leaderboard
The public Terminal-Bench 4.0 leaderboard reported the following results for maximum-effort configurations:
Agent and model | Resolved tasks |
|---|---|
Claude Code + Opus 5.5 | 64.8% ± 3.1 |
Claude Code + Sonnet 5.5 | 61.8% ± 2.9 |
Codex + GPT-6 Astra | 58.2% ± 2.8 |
Codex + GPT-6.1 Sol | 58.2% ± 3.1 |
Source: Snorkel AI's Terminal-Bench 4.0 leaderboard, checked October 22, 2026.
Claude Code with Opus leads Codex with Sol by 6.6 percentage points on this leaderboard. That's worth taking seriously. But the reported uncertainty ranges are not a substitute for a formal pairwise significance test, and the harnesses are not identical. A six-point lead here does not translate into “six percent better code” in your repository.
The cost difference runs the other way. The leaderboard lists roughly $4.7K in evaluation cost for the Opus run versus $0.6K for Sol, alongside markedly different aggregate token use. Those are costs of the reported evaluation runs, not universal prices for a developer ticket.
Independent runs change the size of the gap
Artificial Analysis evaluates models within its own setup and at several reasoning-effort levels. Its October results give a more useful view of the performance-versus-cost curve:
Model and effort | Terminal-Bench 4.0 | Average cost per Intelligence Index task |
|---|---|---|
Claude Opus 5.5, max | 59.6% | $5.98 |
Claude Opus 5.5, medium | 52.5% | $1.34 |
GPT-6.1 Sol, max | 56.1% | $0.72 |
GPT-6.1 Sol, medium | 48.0% | $0.21 |
Source: Artificial Analysis model comparison. The cost column is the evaluator's weighted average cost per Intelligence Index task, not specifically the cost of a Terminal-Bench task.
At medium effort, Opus leads Sol by about 4.5 points on Terminal-Bench, while costing about 6.4 times as much on the separate Intelligence Index cost measure. Push Sol to maximum effort and its Terminal-Bench result passes Opus at medium effort, though Opus at maximum still leads Sol at maximum. That makes reasoning effort a consequential purchasing decision, not a footnote.
A second evaluator, Vals AI, uses Mini-SWE-agent and reports 65.15% for Opus 5.5 versus 55.05% for GPT-6.1 Sol, with reported costs of $13.20 and $1.72 per test, respectively. The absolute scores and cost definitions differ from Artificial Analysis. You cannot combine the two tables into one precise ranking, but both show the trade-off: Opus is stronger on these terminal tasks at the tested settings; Sol generally costs much less to run. Vals AI results.
There are counterexamples to any universal winner. On DeepSWE, OpenAI's published evaluation puts GPT-6.1 Sol at approximately 75%, close to published Opus 5.5 and Astra figures. This is a vendor-reported result, not an independently controlled head-to-head. It is nevertheless a reminder that a Terminal-Bench lead is not the same as a lead on every coding workload. OpenAI's GPT-6.1 Sol report.
SWE-bench Verified is deliberately not used as the headline here. The better question for these newer agents is how they behave on harder, longer-running tasks and how much a correct result costs.
Cost: price per token is not price per task
Token rates alone miss how an agent works. A model that reads more files, retries more often, or writes a longer plan can consume enough extra tokens to outweigh a small price difference. That extra work may be wasted—or it may prevent a subtle regression.
Artificial Analysis's medium-effort measurements put Opus 5.5 at roughly 26,000 output tokens per Intelligence Index task and GPT-6.1 Sol at roughly 8,000. Opus's output token rate is also twice Sol's. In that specific evaluation, a 2× output-token price difference becomes a much larger difference in measured cost per task.
These are benchmark costs, not monthly-bill predictions. A task that needs three rounds of correction may be cheaper to generate but more expensive to ship.
For engineering work, the useful calculation is closer to:
Total task cost = model or subscription usage + developer review time + reruns + regression risk.
Plans and limits
The two products use different pricing systems. API rates, benchmark dollar costs, and subscription allowances are three separate things. If you're signed into a coding agent with a monthly plan, you don't simply receive an invoice for its model's list-price tokens on every included task. API-key use may be billed separately.
Claude Code is included with Claude Pro at $20/month, and Claude Max starts at $100/month. Claude's free chat tier does not include Claude Code. Claude Pro and Max have rolling five-hour limits and weekly allowances; available usage depends on the plan and your activity.
Codex is available on ChatGPT Free and Go, with broader model and cloud capabilities on eligible paid plans. ChatGPT Plus is $20/month, and the Pro options are $100, $200, and $500/month. The Pro tiers currently have a weekly Work/Codex allowance without a separate five-hour cap; other eligible plans may have both windows. Free and Go are not the same proposition as a fully featured paid cloud-coding workflow.
There's an immediate change for some Pro subscribers: users eligible for grandfathered Pro 200 usage keep their prior allowance through October 29, 2026; the lower allowance begins October 30. This does not mean every Pro 200 customer had the higher allowance—eligibility and the plan's current terms matter. Check your account's usage dashboard rather than relying on a fixed “tasks per month” promise.
Pricing and limits are especially perishable, so verify Claude's plan page, OpenAI's Codex usage guidance, and OpenAI's Pro plan terms before committing a team to a plan.
The winner by use case
The results above support a few clear choices. Others are editorial recommendations based on workflow design, not head-to-head measurements of that specific task.
Use case | Winner | Why |
|---|---|---|
Hard terminal-based tasks at maximum effort | Claude Code + Opus 5.5 | It leads Codex + Sol 64.8% to 58.2% on the cited Terminal-Bench 4.0 agent leaderboard. |
Interactive debugging and exploring an unfamiliar codebase | Claude Code | Checkpoints and a review-as-you-go workflow make it a strong default when you expect to change direction often. |
Repeated, well-specified fixes and refactors on a budget | Codex + GPT-6.1 Sol | The cited independent evaluations show substantially lower task costs at their tested settings. |
Multiple independent background tasks | Codex | Cloud delegation and pull-request handoff suit parallel, bounded work. Claude Code can run unattended cloud tasks too. |
Automated GitHub pull-request review | Codex | Native |
Teams already working inside ChatGPT | Codex | Eligible subscriptions include Codex usage, so adoption may not require another coding-tool subscription. |
Two cases resist a fair single-product verdict. For security-sensitive changes, permissions, tests, and independent human review matter more than the agent's brand. For frontend and UI work, the cited benchmarks do not establish a winner; test both against your design system and accessibility checks.
Using both without making a mess
One agent can review the other's diff for missed cases. That second opinion can help, but it still needs clear instructions and real tests.
Codex reads AGENTS.md with directory-aware scoping. Claude Code v2.1.277+ can use it when CLAUDE.md doesn't take precedence, or be configured to read both. Check which instructions each agent receives and resolve conflicts.
For concurrent changes, use separate branches or worktrees and distinct scopes. Run CI before merging; overlapping edits to migrations, lockfiles, or middleware can erase any time saved.
A practical pattern:
Write a small task specification with acceptance criteria and failure cases.
Ask either agent for a plan, and review it before implementation.
Run the change in a dedicated branch or worktree.
Have the other agent review the diff, then run deterministic tests and a human review.
Measure elapsed time, usage, review effort, and defects—not just whether the agent declared success.
How to choose
Try a real task from your repository—a cross-file refactor or a failing CI job—with identical success criteria. Record the model, effort setting, tests run, review time, and corrections each agent requires. Compare the completed, reviewed change, not just token prices.
A leaderboard cannot tell you which agent will follow your conventions or produce a patch that survives review. A task that needs frequent discussion may favor one workflow; a well-scoped change you can delegate may favor another. What matters is what reaches production, not which model finishes first.
Comments(0)
Join the discussion by logging into your account.
No comments yet. Be the first to comment!