Claude Code vs. Codex

Comparison between Claude Code and Codex across the Artificial Analysis Coding Agent Index, including benchmark scores, cost, execution time, and token usage.

For details relating to our methodology, see our methodology page.

Explore other comparisons
vs

Highlights

Updated
Artificial Analysis Coding Agent Index v1.5 · Higher is better
Average agent wall time per task · Lower is better
Average API cost per task (USD) · Lower is better

Comparison

Side-by-side comparison of Claude Code and Codex.

Coding Agent Comparison

Metric
Claude Code
Fable 5.1 (max) (with fallback)
Codex
GPT-6 Astra (max)
Analysis
Agent Harness
Claude Code
Codex
Representative Model
Fable 5.1 (max) (with fallback)
GPT-6 Astra (max)
Coding Agent Index
62
62
Claude Code has a higher Coding Agent Index than Codex
DeepSWE v1.1
64%
68%
Codex has a higher DeepSWE v1.1 score than Claude Code
Terminal-Bench 4.0
58%
56%
Claude Code has a higher Terminal-Bench 4.0 score than Codex
SWE-Atlas-QnA
65%
62%
Claude Code has a higher SWE-Atlas-QnA score than Codex
Cost per Task
$12.39
$7.47
Codex has a lower cost per task than Claude Code
Time per Task
34.8m
29.4m
Codex has a lower time per task than Claude Code
Turns per Task
36.7
39.4
Claude Code has a lower turns per task than Codex
Token Usage per Task
5.7M
3.3M
Codex has a lower token usage per task than Claude Code
Cache Hit Rate
92%
93%
Codex has a higher cache hit rate than Claude Code

Model Variants

Evaluated model variants for Claude Code and Codex.

Model Variants

Claude Code
Fable 5.1 (max) (with fallback)
62
64%
58%
65%
$12.39
34.8m
5.7M
Claude Code
Opus 5 (max)
60
63%
55%
62%
$10.79
41.9m
11.4M
Claude Code
Qwen3.8 Max
43
51%
17%
62%
$3.48
1.1h
8.7M
Codex
GPT-6 Astra (max)
62
68%
56%
62%
$7.47
29.4m
3.3M
Codex
GPT-6 Sol (max)
57
69%
43%
58%
$2.99
22.3m
9.8M
Codex
GPT-5.6 Sol (max)
55
72%
37%
54%
$6.35
20.6m
10.2M
Codex
GPT-5.6 Luna (max)
43
66%
15%
49%
$0.44
23.5m
14.9M
Codex
DeepSeek V4 Pro 0813 (max)
43
57%
10%
62%
$0.24
40.3m
24.2M
Codex
GPT-6 Luna (max)
41
64%
15%
44%
$0.18
21.4m
10.2M
Codex
DeepSeek V4 Flash 0731 (max)
39
54%
11%
51%
$0.09
18.3m
15.4M

Performance

Performance across the Artificial Analysis Coding Agent Index.

Artificial Analysis Coding Agent Index

Artificial Analysis Coding Agent Index v1.5 incorporates 3 benchmarks: DeepSWE v1.1, Terminal-Bench 4.0, and SWE-Atlas-QnA · Higher is better

Artificial Analysis Coding Agent Index vs. Cost per Task

Artificial Analysis Coding Agent Index vs. average pay-per-token API cost per task (USD)
Most attractive quadrant
Pareto line

Token Usage

Token consumption across the Artificial Analysis Coding Agent Index.

Token Usage per Task

Average input, cache, and output tokens per task
Prompt cache hit rates can vary significantly by provider routing, which can materially change effective cost.

Artificial Analysis Coding Agent Index vs. Total Tokens

Artificial Analysis Coding Agent Index vs. average total tokens per task
Most attractive quadrant

Cost

Pay-per-token API cost across the Artificial Analysis Coding Agent Index, based on current per-token pricing.

Cost per Task

Average pay-per-token API cost per task (USD) · Lower is better

Execution Time

Active agent runtime across the Artificial Analysis Coding Agent Index.

Time per Task

Average agent wall time per task · Lower is better

Artificial Analysis Coding Agent Index vs. Execution Time

Artificial Analysis Coding Agent Index vs. average agent wall time per task
Most attractive quadrant