News
Same Model, Different Coding Agent: Up to 5.4x Cost Difference per Task — Interpreting Artificial Analysis Harness Comparisons
Artificial Analysis ran GPT-6 Luna and GLM-5.3-Flash through the same coding benchmark in 13 agent harnesses, including Claude Code, Codex and OpenCode. This article summarizes the scores, cost per task, step counts and token data, and uses two minimal harnesses to measure how tokens get amplified.
On this page
Key finding: Move the same model to a different coding agent harness and cost per task can differ by up to 5.4x, while scores differ by only 1.5x. This is the Harness Comparisons data published by Artificial Analysis in November 2026: GPT-6 Luna and GLM-5.3-Flash each run the same coding benchmark across 13 harnesses (Claude Code, Codex, OpenCode, and others). When choosing a coding agent, the model's list price is only half the story; the other half is how many steps the harness makes the model run and how many tokens it reads.
Below we summarize Artificial Analysis's raw data, three notable findings, and a controlled experiment we ran with two minimal harnesses built on HiAPI.

What is an agent harness
A harness is the layer of software wrapped around the model: it decides which tools the model gets (read files, run shell, search code), how the system prompt is written, how much history and tool output is sent back to the model each turn, and when to stop. Claude Code, Codex CLI, OpenCode and GitHub Copilot CLI are all harnesses. The model does the "thinking"; the harness decides "how it's done and in how many steps."
How Artificial Analysis tested
- Same model, 13 harnesses: Both GPT-6 Luna and GLM-5.3-Flash were run at their highest thinking level (Max). Each harness used default settings; where Z.ai or the harness developer published recommended settings for GLM-5.3-Flash, those recommendations were used. GPT-6 Luna used the same set of settings, changing only what was needed to connect to the OpenAI API.
- Score: Coding Agent Index v2.1, an equal-weight average of three benchmarks: FrontierCode-AA 2.0 (132 real open-source repository change tasks), Terminal-Bench 4.1 (66 terminal tasks), and SWE-Atlas-QnA-AA (124 codebase Q&A tasks), with each task run 3 times.
- Cost: Average cost per task calculated from pay-as-you-go API prices, using the token counts returned by each provider's API combined with the model's actual cache hit rate, not subscription plan pricing.
- Deployment: GLM-5.3-Flash was deployed by Artificial Analysis itself; both models in Devin CLI ran in Cognition's hosted environment.
For methodological details, see the Artificial Analysis methodology notes. The data below is taken from the Artificial Analysis page, read on 2026-11-24.
GPT-6 Luna: scores and costs across 13 harnesses
| Harness | Coding Agent Index | Avg. cost per task | Avg. steps | Avg. input tokens | Avg. output tokens | Avg. time |
|---|---|---|---|---|---|---|
| Codex | 25.9 | $0.192 | 89 | 10.04M | 100K | 24 minutes |
| mini-swe-agent | 25.1 | $0.160 | 72 | 7.82M | 100K | 24 minutes |
| Grok Build | 24.8 | $0.278 | 195 | 13.39M | 163K | 26 minutes |
| Muse Code | 23.2 | $0.616 | 259 | 26.63M | 308K | 71 minutes |
| OpenCode | 22.9 | $0.164 | 65 | 7.21M | 96K | 20 minutes |
| Claude Code | 22.2 | $0.179 | 84 | 9.1M | 105K | 23 minutes |
| DeepSeek Harness | 21.9 | $0.355 | 104 | 17.9M | 185K | 25 minutes |
| Mistral Vibe | 21.4 | $0.226 | 96 | 10.1M | 157K | 33 minutes |
| Pi | 21.2 | $0.114 | 59 | 5.52M | 69K | 19 minutes |
| GitHub Copilot | 21.1 | $0.157 | 220 | 7.07M | 109K | 27 minutes |
| Kimi Code CLI | 20.4 | $0.336 | 184 | 14.01M | 240K | 45 minutes |
| Devin CLI | 18.0 | $0.198 | 63 | 10.96M | 79K | 22 minutes |
| Qwen Code | 17.2 | $0.169 | 61 | 7.25M | 117K | 31 minutes |
Source: Artificial Analysis Harness Comparisons, GPT-6 Luna (Max). Sorted by Coding Agent Index from high to low.
GLM-5.3-Flash: scores and costs across 13 harnesses
| Harness | Coding Agent Index | Avg. cost per task | Avg. steps | Avg. input tokens | Avg. output tokens | Avg. time |
|---|---|---|---|---|---|---|
| Claude Code | 38.9 | $0.585 | 170 | 14.56M | 202K | 68 minutes |
| OpenCode | 38.5 | $0.601 | 117 | 17.04M | 116K | 73 minutes |
| mini-swe-agent | 37.9 | $0.646 | 136 | 18.27M | 104K | 96 minutes |
| Kimi Code CLI | 37.5 | $0.556 | 265 | 14.39M | 167K | 74 minutes |
| DeepSeek Harness | 37.4 | $0.699 | 135 | 19.69M | 122K | 64 minutes |
| Mistral Vibe | 36.8 | $0.381 | 104 | 9.85M | 124K | 100 minutes |
| Devin CLI | 36.4 | $0.906 | 146 | 25.75M | 143K | 45 minutes |
| Grok Build | 35.4 | $0.589 | 143 | 16.34M | 116K | 119 minutes |
| GitHub Copilot | 35.2 | $0.469 | 229 | 13.11M | 100K | 79 minutes |
| Qwen Code | 34.7 | $0.543 | 108 | 15.24M | 111K | 88 minutes |
| Muse Code | 32.4 | $0.802 | 246 | 21.89M | 134K | 86 minutes |
| Pi | 29.8 | $0.411 | 106 | 11.32M | 97K | 58 minutes |
| Codex* | 27.8 | $0.592 | 134 | 17.94M | 52K | 92 minutes |
Source: Artificial Analysis Harness Comparisons, GLM-5.3-Flash (Max). * Artificial Analysis notes that GLM-5.3-Flash produced short, "telegraphic" reasoning inside Codex, whereas it produced full reasoning text in the other harnesses.
Finding 1: The cost gap is larger than the score gap
| Model | Highest / lowest score | Score gap | Most / least expensive (per task) | Cost gap |
|---|---|---|---|---|
| GPT-6 Luna | 25.9 (Codex) / 17.2 (Qwen Code) | 1.5x | $0.616 (Muse Code) / $0.114 (Pi) | 5.4x |
| GLM-5.3-Flash | 38.9 (Claude Code) / 27.8 (Codex) | 1.4x | $0.906 (Devin CLI) / $0.381 (Mistral Vibe) | 2.4x |
The most expensive harness is not the highest-scoring one either. GPT-6 Luna costs $0.616 per task in Muse Code and scores 23.2; in Codex it costs $0.192 per task and scores 25.9. You pay about 3.2x more for a score that is 2.7 points lower.
Finding 2: The best harness depends on the model
Codex is the highest-scoring harness for GPT-6 Luna (25.9), yet it is the lowest-scoring harness for GLM-5.3-Flash (27.8). GLM-5.3-Flash scores highest in Claude Code (38.9), 11.1 points higher than in Codex.
One reason is that a harness's prompts, tool formats and reasoning settings are usually tuned around a particular model. When switching models, don't blindly keep the old harness; it's best to test 2–3 harnesses side by side.
Finding 3: Cost is driven mainly by input tokens and step count
- Input far exceeds output: Across the 26 data points, average input tokens per task are at least 58 times the output. The reason: on every step, the agent must resend the prior conversation, file contents and tool output back to the model.
- Step count drives input volume: GPT-6 Luna averaged 259 steps and 26.63M input tokens in Muse Code, versus 59 steps and 5.52M input tokens in Pi, at $0.616 and $0.114 per task respectively.
- Cache hit rate matters a lot: Cache hit rates across the groups ranged from 84% to 96%. Most of the repeatedly sent context is billed at the cached price; if a harness frequently changes earlier context and invalidates the cache, costs rise noticeably.
Our small experiment: changing only the tool design to see how tokens change
To see how the harness affects tokens, we built two minimal harnesses on HiAPI's GLM-5.3 (a model from the same family as GLM-5.3-Flash) and had it fix 2 bugs in the same small repository (3 files, 6 assertions):
- A: 4 fine-grained tools:
list_files,read_file,write_file,run_tests. - B: Just 1
bashtool, similar in approach to mini-swe-agent and Pi. Commands run in a sandbox with no network access and can only write to the task directory.
Same model, same task, same prompt, each harness run 3 times, 2026-11-24:
| Harness | Run | Tests pass | Turns | Tool calls | Cumulative input tokens | Cumulative output tokens | Time |
|---|---|---|---|---|---|---|---|
| A: 4 fine-grained tools | Run 1 | Yes | 6 | 7 | 5,214 | 1,150 | 55.9 s |
| A: 4 fine-grained tools | Run 2 | Yes | 5 | 6 | 3,840 | 556 | 28.8 s |
| A: 4 fine-grained tools | Run 3 | Yes | 5 | 6 | 3,880 | 659 | 32.0 s |
| B: 1 bash tool | Run 1 | Yes | 5 | 6 | 4,752 | 553 | 22.6 s |
| B: 1 bash tool | Run 2 | Yes | 4 | 3 | 2,672 | 464 | 17.6 s |
| B: 1 bash tool | Run 3 | Yes | 4 | 5 | 3,240 | 594 | 19.8 s |
All 6 runs fixed both bugs and none modified the test files. On average, B's cumulative input tokens were about 18% lower than A's (3,555 vs. 4,311), and its runtime was about 51% of A's (20.0 s vs. 38.9 s). Three mechanisms are visible in the logs:
- Tool definitions are paid for every turn: A's 4 tool descriptions raised the first turn's input from 224 tokens to 341. This portion is resent on every turn.
- History keeps growing: In one of A's runs, input tokens per turn were 341, 570, 816, 1,045 and 1,068. Every step resends everything before it, so the more steps there are, the faster cumulative input grows.
- Doing several things in one call: In B, the model chains multiple commands into a single call, e.g.
cat-ing two files at once. A can only read one file at a time. This matches Artificial Analysis's note that shell-style tools accept chained commands, letting one tool call cover multiple steps.
This task is very small, and the variation between two runs of the same harness is close to the variation between the two harnesses. So these numbers only illustrate the mechanisms; they don't show which design is better. Real projects routinely take hundreds of steps (the Artificial Analysis data averages 59–265 steps), so the gaps get amplified — run your own tasks several times before drawing conclusions.
How to use this data to choose a coding agent
- Pick the model first, then test 2–3 harnesses. The same model can differ by up to 1.5x in score and 5.4x in cost across harnesses, so it's worth testing.
- Look at cost per task, not just the per-token price. Record steps, input tokens, output tokens and cache hit rate for each task. A cheaper model that takes many more steps in your harness may not have a lower total cost.
- Re-evaluate the harness when you switch models. Codex is best for GPT-6 Luna and worst for GLM-5.3-Flash; no harness is best for all models.
- Control context: Choose a harness or configuration that compresses history, truncates long tool output, and keeps the prefix stable (which helps caching).
Comparing harnesses on HiAPI
HiAPI provides OpenAI-compatible and Anthropic-compatible APIs, so the same API Key can connect to Claude Code, Codex CLI, OpenCode, Pi and DeepSeek Harness; for configuration, see Agent tool integration. When you switch harnesses the model stays the same and billing is in one place, making it easy to compare token usage per task. The models mentioned in this article have pages at GPT-6 Luna and GLM-5.3; further reading: Switching models in Claude Code and Codex, How Codex's agent loop works.
FAQ
What is an agent harness?
A harness is the program wrapped around a large model that provides tools, organizes prompts, manages context and decides when to stop. Claude Code, Codex CLI and OpenCode are all coding agent harnesses.
Which is better, Claude Code or Codex?
It depends on the model. According to Artificial Analysis data, GPT-6 Luna scores 25.9 in Codex and 22.2 in Claude Code; GLM-5.3-Flash scores 38.9 in Claude Code and 27.8 in Codex.
Which saves more money, Claude Code or Codex?
Again, it depends on the model and the task. GPT-6 Luna averages $0.179 per task in Claude Code and $0.192 in Codex; GLM-5.3-Flash averages $0.585 and $0.592 respectively. What ultimately matters is the step count and token usage of your own tasks.
What is the Artificial Analysis Coding Agent Index?
It is Artificial Analysis's score for the coding ability of a "model + harness" combination; version v2.1 is the equal-weight average of three benchmarks: FrontierCode-AA 2.0, Terminal-Bench 4.1 and SWE-Atlas-QnA-AA.
Sources
- Artificial Analysis: Coding Agent Benchmarks · Harness Comparisons (data read on 2026-11-24)
- Artificial Analysis: Coding Agent Index v2.1 methodology notes
- Our experiment: HiAPI production endpoint
/v1/chat/completions, modelglm-5.3, 2026-11-24, 3 runs per harness
Related articles
View all articles →-
News
GLM-5.4 API Explained: Specs, Win Rates, Loop Transformer Architecture, and Release Progress
GLM-5.4 is Z.ai's first Loop Transformer flagship model, supporting video, image, text, and file input with a 1M context. This article covers the specs, official win rates, architecture highlights, and API release progress, plus code for integrating GLM-5.3 today.
-
News
AI Black Friday 2026: $650 API Credit for $500 + Free DeepSeek
Three offers, Black Friday prices for four models, and how to top up for the most credit
4 min read -
News
Is Lovable Just a Middleman? The Same Question Applies to API Gateways
A post with 1,166 likes asks why anyone still pays for Lovable or Bolt when Claude Code exists. The answer also decides how you should think about API aggregation layers.
6