Claude Code 与 Codex

根据 Artificial Analysis Coding Agent Index比较 Claude Code 与 Codex,包括基准测试得分、成本、执行时间和 token 用量。

有关我们方法论的详细信息,请参阅方法论页面

浏览其他比较
vs

亮点

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

比较

Claude Code 与 Codex 的并排比较。

编程智能体比较

指标
Claude Code
Opus 5 (xhigh)
Codex
GPT-5.6 Sol (max)
分析
智能体 Harness
Claude Code
Codex
代表模型
Opus 5 (xhigh)
GPT-5.6 Sol (max)
编程智能体指数
68
65
Claude Code 的编程智能体指数高于 Codex
DeepSWE
60%
69%
Codex 的 DeepSWE 分数高于 Claude Code
Terminal-Bench v2.1
89%
83%
Claude Code 的 Terminal-Bench v2.1 分数高于 Codex
SWE-Atlas-QnA
55%
43%
Claude Code 的 SWE-Atlas-QnA 分数高于 Codex
每个任务的成本
$8.17
$6.42
Codex 的每个任务成本低于 Claude Code
每个任务的时间
23.7m
10.2m
Codex 的每个任务时间短于 Claude Code
每个任务的轮次
152.1
112.3
Codex 的每个任务轮次少于 Claude Code
每个任务的 Token 用量
21.6M
13.2M
Codex 的每个任务 token 用量少于 Claude Code
缓存命中率
97%
90%
Claude Code 的缓存命中率高于 Codex

模型变体

Claude Code 与 Codex 的已评估模型变体。

模型变体

Claude Code
Opus 5 (xhigh)
68
60%
89%
55%
$8.17
23.7m
21.6M
Claude Code
Fable 5 (max) (with fallback)
67
66%
87%
49%
$11.69
23.5m
13.9M
Claude Code
Opus 5 (max)
67
63%
89%
49%
$8.94
24.2m
23.7M
Claude Code
Opus 5 (high)
66
61%
87%
49%
$3.92
14.0m
9.9M
Claude Code
Opus 5 (medium)
64
63%
85%
44%
$3.17
12.2m
8M
Claude Code
Opus 4.8 (max)
62
56%
84%
47%
$7.72
23.1m
17.9M
Claude Code
Qwen3.8 Max
61
52%
84%
48%
$3.23
29.9m
12.5M
Claude Code
Opus 5 (low)
59
57%
82%
39%
$2.30
10.0m
5.3M
Claude Code
Opus 4.8 (xhigh)
59
51%
83%
43%
$5.67
17.8m
13.6M
Claude Code
Opus 4.8 (high)
58
52%
82%
39%
$3.78
12.7m
9.2M
Claude Code
Opus 4.8 (medium)
56
49%
82%
36%
$3.30
12.0m
7.8M
Claude Code
Opus 4.7 (max)
52
40%
78%
37%
$5.92
15.8m
16.1M
Claude Code
Opus 4.8 (low)
49
41%
78%
28%
$2.18
8.6m
5.2M
Claude Code
GLM-5.2
43
29%
72%
29%
$6.66
25.1m
6.6M
Claude Code
Opus 4.7 (medium)
42
27%
77%
23%
$1.80
6.7m
4.6M
Claude Code
Sonnet 4.6 (medium)
39
29%
67%
20%
$2.04
13.8m
8.4M
Claude Code
Qwen3.7 Plus (thinking)
38
19%
72%
24%
$6.30
10.7m
8.8M
Claude Code
GLM-5.1
37
19%
67%
25%
$4.28
19.0m
25.8M
Claude Code
Kimi K2.6
34
17%
69%
16%
$1.22
40.7m
11.7M
Claude Code
DeepSeek V4 Pro (high)
33
9%
70%
20%
$0.25
17.9m
9.9M
Codex
GPT-5.6 Sol (max)
65
69%
83%
43%
$6.42
10.2m
13.2M
Codex
GPT-5.6 Sol (high)
64
65%
82%
45%
$3.85
6.2m
8M
Codex
GPT-5.6 Sol (xhigh)
63
67%
80%
43%
$4.80
7.3m
9.9M
Codex
GPT-5.6 Sol (medium)
62
64%
81%
40%
$2.81
5.0m
5.8M
Codex
GPT-5.5 (xhigh)
61
64%
83%
36%
$4.75
10.2m
12.2M
Codex
GPT-5.6 Terra (max)
60
67%
78%
36%
$2.70
8.2m
9.6M
Codex
GPT-5.6 Luna (max)
57
63%
75%
33%
$1.51
8.0m
16M
Codex
GPT-5.6 Terra (xhigh)
56
58%
77%
33%
$1.88
6.7m
6.6M
Codex
GPT-5.5 (medium)
55
57%
79%
31%
$2.65
6.4m
6.9M
Codex
GPT-5.6 Sol (low)
55
53%
78%
34%
$1.66
3.5m
3.2M
Codex
GPT-5.6 Terra (high)
55
60%
72%
31%
$1.56
6.0m
5.6M
Codex
GPT-5.6 Luna (xhigh)
53
57%
71%
31%
$1.21
6.9m
12.8M
Codex
GPT-5.6 Luna (high)
52
53%
73%
29%
$0.92
5.7m
9.6M
Codex
DeepSeek V4 Flash 0731 (max)
50
43%
68%
39%
$0.06
14.5m
20.8M
Codex
GPT-5.6 Terra (medium)
48
46%
70%
29%
$0.88
4.0m
3.2M
Codex
GPT-5.6 Sol (none)
43
35%
60%
34%
$1.40
3.3m
3.4M
Codex
DeepSeek V4 Pro 0813 (max)
43
16%
63%
49%
$0.09
12.4m
12.7M
Codex
GPT-5.6 Luna (medium)
42
37%
62%
27%
$0.44
3.2m
4.3M
Codex
GPT-5.6 Terra (low)
39
30%
63%
23%
$0.49
2.6m
1.7M
Codex
GPT-5.6 Luna (low)
25
10%
50%
15%
$0.19
1.7m
1.4M
Codex
GPT-5.6 Terra (none)
23
13%
37%
19%
$0.36
1.5m
1.1M
Codex
GPT-5.6 Luna (none)
19
6%
33%
17%
$0.33
2.2m
3.5M

性能

Artificial Analysis Coding Agent Index上的性能。

Artificial Analysis Coding Agent Index

Artificial Analysis Coding Agent Index v1.4 incorporates 3 benchmarks: DeepSWE, Terminal-Bench v2.1, and SWE-Atlas-QnA · Higher is better
Since benchmarking, we have observed a higher rate of content safety filtering on this endpoint.

The Artificial Analysis Coding Agent Index is a composite score built from DeepSWE, Terminal-Bench v2.1, and SWE-Atlas-QnA.

It is useful for quick comparison, but it should be read alongside the per-eval breakdowns. Two agents with similar index values can still have different strengths across repository tasks, terminal workflows, and rubric-based evaluations.

Token 用量

Artificial Analysis Coding Agent Index上的 token 消耗。

每个任务的 Token 用量

每个任务的平均输入、缓存和输出 token
Prompt cache hit rates can vary significantly by provider routing, which can materially change effective cost.

Non-cached input tokens sent to the model, including prompts, instructions, tool context, and task context that were not served from prompt cache.

Artificial Analysis Coding Agent Index vs. 总 Token

Artificial Analysis Coding Agent Index vs. 每个任务的平均总 Token
Most attractive quadrant

Each point represents a coding-agent variant. Farther left means lower average total token usage per task, while higher on the chart means higher benchmark performance. Agents toward the upper-left achieve stronger results with fewer tokens.

成本

基于当前按 token 计费价格的 Artificial Analysis Coding Agent Index按 token 计费 API 成本。

每个任务的成本

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

This chart shows the average pay-per-token API cost per task across the Artificial Analysis Coding Agent Index, spanning DeepSWE, Terminal-Bench v2.1, and SWE-Atlas-QnA.

Where applicable, that cost model includes standard input pricing, discounted cached-input pricing, separate cache-write charges, and output pricing rather than treating all prompt tokens as if they were billed at the same uncached input rate.

It is intended to show pay-per-token API cost, not consumer plan pricing or the full operational cost of deploying the system in production. Infrastructure, engineering, and supervision costs are not the focus of this metric.

Artificial Analysis Coding Agent Index vs. 每个任务的成本

Artificial Analysis Coding Agent Index vs. 每个任务的平均按 token 计费 API 成本(USD)
Most attractive quadrant
Pareto line

Each point represents a coding-agent variant. Farther left means lower average cost per task, while higher on the chart means higher benchmark performance. The most efficient agents sit toward the upper-left: stronger results at lower cost.

执行时间

Artificial Analysis Coding Agent Index上的智能体活跃运行时间。

每个任务的时间

Average agent wall time per task · Lower is better

This chart uses agent wall time: how long the agent process was actively running on each task.

It does not include environment startup, verifier or judge time, or other harness overhead, so it is a cleaner comparison of how long the agent itself was working.

Artificial Analysis Coding Agent Index vs. 执行时间

Artificial Analysis Coding Agent Index vs. 每个任务的平均智能体运行时间
Most attractive quadrant

Each point represents a coding-agent variant. Farther left means shorter average agent runtime per task, while higher on the chart means higher benchmark performance. Agents toward the upper-left deliver stronger results in less active agent time.