What can a harness for coding agents bring? Mainly token consumptionWhat Does a Harness Buy? Tokens, Mostly
The authors fix the model and compare three production harnesses on SWE-bench Verified, stating that the effect of switching harnesses on pass rate is comparable to rerun noise, but that per-task cost differs by up to 3×.
- Most engineering of coding agents happens in the harness (system prompt, tool set, context management), and vendors and leaderboards advertise score gains from harness changes, but how much the harness itself can move the score when the model is fixed, and whether that exceeds rerun noise, had not previously been measured on the same batch of tasks and models.
- With five models fixed, run three production harnesses (Claude Code, mini-SWE-agent, OpenCode) at factory configuration on SWE-bench Verified over the 45 hardest tasks and a large pool of 447 tasks, and rerun the same configuration ten times; compare paired differences with the McNemar test and Newcombe intervals, and compute cost from token counts using a unified price table.
- The authors report: on hard45, the median task flip rate is 13% for both swapping harnesses and rerunning the same harness; on pool447, Claude Code and mini-SWE-agent are equivalent within ±5 points, and the only thing beyond noise is OpenCode trailing by up to 9 points; under the same model, per-task cost differs up to 3×, mainly determined by the preamble carried at each step and the number of steps.
- The authors note that the results come from a single benchmark, and that on Terminal-Bench 2.1 only a single-model transfer check was done; the closed-source anchor model was run only inside Claude Code, so it cannot be determined whether closed-source frontier models show the same gap. The experiments cover five models plus the Opus 5 anchor and two task sets; pool447 covers only the two local Qwen models.
- Evaluated models
- Qwen3.6-35B-A3BQwen3.8-27BDeepSeek-V4-FlashGLM-5.3-FlashHY4-PreviewClaude Opus 5
- Benchmarks
- SWE-bench VerifiedTerminal-Bench 2.1
- Metrics
- pass rateflip ratecost per task (CNY)input tokens per step
The authors connected five models to three production-grade harnesses—Claude Code, mini-SWE-agent, and OpenCode—ran them on SWE-bench Verified, and reran the same configurations, measuring the effect of the harness on scores when the model is fixed. On a hard subset of 45 tasks and five models, the proportion of tasks flipped by switching harnesses was the same as when rerunning the same harness, both 13%; a task on which one run was superior was not necessarily superior again the next time; on 447 tasks and two of the models, the score gap between the heaviest, Claude Code, and the lightest, mini-SWE-agent, was within 5 points. The only effect exceeding noise was loss: OpenCode trailed by up to 9 points on the large task pool, and for one model half of the gap came from runs truncated by the output limit. The rerun data also give the resolution needed for comparison: 45 tasks have only a half probability of capturing a 13-point gap, and 447 tasks can resolve 5 points, still coarser than the gains claimed by many harness changes.
Related events and news
1 events · 1 news mentions
News that mentions this paper
研究称编码Agent框架差异多在噪声内 成本可差三倍
- The Decodercites the paper's id or link研究发现,花哨的脚手架让编码 Agent 更昂贵但并不更好
Liu and Han ran five models through three harnesses in their shipped versions: Claude Code, OpenCode, and mini-SWE-agent. mini-SWE-agent gives the model only a Bash tool and skips context management.
Paper analysis
What problem does this paper attempt to solve?
With the model fixed, how much the harness itself can move the SWE-bench score—a real effect or rerun noise.
Core question: when the model is held fixed, how much can the coding agent's harness (scaffold) itself move benchmark scores, and does that movement exceed the noise of rerunning the same configuration.
- Problem setting: a coding agent is a model plus a harness (system prompt, tool set, context management); day-to-day engineering mostly happens on the harness: popular harnesses release more than two versions a day, vendors advertise score gains from harness changes, and leaderboards mix different harnesses (introduction).
- Existing evidence is hard to read: existing comparisons run almost every cell only once, while the same configuration rerun ten times on SWE-bench Verified already spreads 2.2–6.0 points (Bjarnason et al., 2026); and the compared harnesses differ in how well they are adapted to the benchmark: in the same study the same backbone model scores 19.1% and 73.4% under minimal and full adaptation respectively (Zheng et al., 2026).
- Core observation: the authors argue that the question harness claims depend on—whether swapping harnesses moves scores more than rerunning the same harness—had not previously been tested on the same set of tasks and models; the closest study (Vats & Golev, 2026) ran once per cell on 50 tasks and cannot distinguish whether an 8-point difference comes from the harness or from the run.
- What the paper did: a measurement study. Three production harnesses (Claude Code, mini-SWE-agent, OpenCode) at factory configuration with pinned versions, run on five models plus a Claude Opus 5 anchor, compared on the 45 hardest tasks of SWE-bench Verified and on a 447-task pool, with noise calibrated by ten reruns of the same configuration; all runs offline, billed by a unified price table.
- Conclusion preview: the authors report that the harness basically does not move pass rate, and the only thing beyond noise is OpenCode's score loss; what the harness really determines is the bill, with cost differing up to 3× under the same model and same task.
What related research exists?
Existing harness comparisons report large gaps but run each cell only once; this paper adds two things: reruns and a unified bill.
Overall harness comparisons
- Yao et al. (2026), Zheng et al. (2026), Alier Forment et al. (2026): with the model fixed and the whole harness swapped, they report gaps of 23.8 points (six harnesses), 27.4 points Pass@1 (five harnesses), and a 139× token difference between the worst and best scaffold on a single git task. The paper notes that studies in this line run only one to two times per cell.
- Vats & Golev (2026): three production harnesses differ by 0–8 points on the same terminal task, with intervals mostly covering zero, and token differences of 40× per solved task; the paper calls this the closest work to this paper.
- Ben Sghaier et al. (2026): 35 consecutive versions of one harness show no significant score gain on a fixed model, while token usage nearly doubles.
- Mahmud et al. (2026), Zhang et al. (2026): model rankings on robustness to semantics-preserving rewrites change with the harness; a position paper requires disclosing the harness when comparing.
Harness internal components
- Rombaut (2026): a source-level taxonomy of coding agents listing twelve design dimensions, and requiring the control approach adopted in this paper—fix the model, vary the scaffold.
- Lieret et al. (2026), Anthropic (2026), Anomaly Innovations (2026): the three harnesses in this paper sit at different positions in that taxonomy: mini-SWE-agent gives only a single bash tool and about one hundred lines of Python to reach SWE-agent's score; Claude Code and OpenCode have typed file tools, long system prompts and automatic compaction.
- Fan et al. (2026), Lewis (2026), Yang et al. (2026), Thangarajah et al. (2026): component-level studies—context management yields gains when the window tightens, capable models are cheaper with a bash-only tool set; a model fine-tuned on a single scaffold's trajectories drops by up to 29 points when the scaffold is swapped.
Evaluation noise and statistical power
- Bjarnason et al. (2026): ten reruns on SWE-bench Verified spread 2.2–6.0 points, standard deviation still exceeds 1.5 points at temperature zero, and reported gains of 2–3 points may be noise.
- Srinivasan (2026), Starace (2026), Miller (2024), Kapoor et al. (2025): a generalizability-theory decomposition says agent main effects explain less than 3% of the variance; a pre-registered comparison on GAIA fits a scaffold×model interaction and calls it significant; and calls to add error bars to evaluations.
Baselines and positioning
- This paper is a measurement study with no methodological baseline; the controls are reruns of the same configuration (ten-rerun pairs), and a "home-field" check of DeepSeek's own harness dsh.
- Authors' positioning: keep the whole line's unit of "the whole production harness" and supply the two things it lacks—reruns of the same cell and the bill under a unified price table; the pass rate conclusion agrees with existing work, but now with the power to bound effect sizes.
How does the paper address this problem?
Three production harnesses run the same batch of models and tasks at factory configuration, with reruns to calibrate noise, paired tests for comparison, and billing on a unified price list.
Overall approach: treat the three production harnesses as the whole artifact users actually run, fix the model and tasks, use reruns of the same configuration as the yardstick, read each harness gap next to the rerun gap, and compute the token bill with a single price list.
Harnesses and fixed conditions
- Three harnesses: Claude Code 2.1 (scored arms 2.1.259–2.1.273), mini-SWE-agent 2.4.6, OpenCode 1.18 (1.18.30/1.18.31), with versions pinned per arm; DeepSeek's own command-line harness dsh is also run as a home-field check.
- Design differences: mini-SWE-agent exposes only one bash tool, has no context management, and hard-stops at the window; Claude Code and OpenCode have typed file/search/edit tools, long system prompts, and automatic compaction.
- Unified budget: one step is one model call, 300 steps per trial; wall-clock serves only as a safety net and is asymmetric on the local Qwen arms (Claude Code 36,000 s, OpenCode's own soft timeout 5,760 s; the authors list this as an uncontrolled factor, Appendix A).
- Everything else left at factory: none of the three sends sampling parameters, so decoding is the vendor default; all three pin reasoning effort to high on the GLM arm; factory configuration details are in Table A1.
Models and tasks
- Five models run on all three harnesses: Qwen3.6-35B-A3B, Qwen3.8-27B (local vLLM 0.27.1, bfloat16, 131k window), DeepSeek-V4-Flash (0731), GLM-5.3-Flash, HY4-Preview (vendor API); Claude Opus 5 runs only inside Claude Code as the top anchor.
- Task sets: of the 500 SWE-bench Verified tasks, 8 requiring public-network verification were dropped, leaving 492; hard45 is all 45 tasks in the two hardest annotated difficulty tiers (42+3, no sampling), and pool447 is the remaining 447 tasks; pool447 is run only on the two self-hosted Qwen models.
- Offline execution: the agent phase has no network other than the model endpoint; in early networked runs, 71% of DeepSeek/Qwen trials fetched the upstream fix, and these runs were discarded; the offline condition is enforced at the network layer (Appendix D); OpenCode's search tool fails offline, so the reported arm is pre-provisioned with ripgrep (marked rg in the tables).
Runs and scoring
- Scoring rule: the reported score for each cell is the first planned run per task for that configuration (a rule fixed before reading results); trials with infrastructure anomalies are removed from the denominator, while trials that hit the step/time/window/output limit are kept and counted as failures; orchestration is by Harbor 0.22.0, one container per trial, scored with the benchmark's own tests.
- Statistics: task-level results are paired across harnesses on the same model, using exact McNemar tests and Newcombe intervals, with no multiple correction across pairs (Holm-corrected results are also reported); equivalence on pool447 is judged by two one-sided tests at δ=5 points; the smallest gap resolvable at 80% power for each task set is computed from the observed discordance.
- Cost basis: each trial's own token counts (cache-hit input, cache-miss input, output) multiplied by the vendor list price; local models have only token counts, and Opus is on a subscription with no per-token price.
Bill decomposition
- Per-step input reconstruction: each step's input is split into four parts—fixed preamble (system prompt + tool schema + message wrapper), the model's own text and reasoning, tool returns, and tool-call arguments; Claude Code's reconstruction closes only if its reasoning blocks are resent every turn (the authors note this is inferred from fitting rather than directly observed, Appendix G).
- Three key quantities: the input volume of the first call, the per-step growth rate, and the number of steps; the cache-hit price only scales the bill and does not change the harness ordering.
What experiments did the paper conduct?
Switching harnesses and rerunning both have a flip rate of 13%; on pool447 only OpenCode trails beyond noise; cost differs by up to 3×.
Experimental setup
- Models tested: Qwen3.6-35B-A3B, Qwen3.8-27B (local vLLM), DeepSeek-V4-Flash, GLM-5.3-Flash, HY4-Preview (API)—five models run on all three harnesses; Claude Opus 5 only inside Claude Code; dsh (DeepSeek's own harness) runs DeepSeek-V4-Flash.
- Datasets: hard45 (all 45 tasks in the two hardest tiers) and pool447 (the remaining 447 tasks, only the two Qwen models) from SWE-bench Verified; the transfer check uses 53 tasks from Terminal-Bench 2.1 that need no network.
- Metrics and tests: pass rate (judged by the benchmark's own tests), paired difference ∆ (Newcombe 95% interval), exact McNemar test, flip rate (share of tasks whose result flips between two runs), per-task cost (CNY, vendor list price).
- Sample and repeats: 45 tasks per cell on hard45, with 2–3 reruns for the Qwen arms and DS Flash/Claude Code and Opus 5 (superscripts in Table 2); about 444–446 scored tasks per cell on pool447; ten rerun pairs in total used for noise calibration.
Main results
pool447 paired comparisons (from Table 1, ∆ is the former minus the latter, pp):
Swipe horizontally to read the table
Model Pair ∆ (pp) 95% CI McNemar p Verdict Qwen3.6-35B-A3B CC−mini −1.8 [−5.2, +1.6] .37 equivalent Qwen3.6-35B-A3B CC−OC +2.9 [−0.9, +6.7] .16 inconclusive Qwen3.6-35B-A3B mini−OC +4.7 [+1.1, +8.4] .02 inferior B Qwen3.8-27B CC−mini −1.4 [−4.2, +1.5] .43 equivalent Qwen3.8-27B CC−OC +7.9 [+4.3, +11.5] <.001 inferior B Qwen3.8-27B mini−OC +9.2 [+5.5, +12.9] <.001 inferior B hard45 pass rate (from Table 2, first run, passes/45):
Swipe horizontally to read the table
Model Claude Code mini-SWE-agent OpenCode (rg) Qwen3.6-35B-A3B 11/45 (24%) 15/45 (33%) 11/45 (24%) Qwen3.8-27B 19/43 (44%) 17/45 (38%) 17/45 (38%) DeepSeek-V4-Flash 21/45 (47%) 22/45 (49%) 19/45 (42%) GLM-5.3-Flash 22/45 (49%) 20/45 (44%) 18/45 (40%) HY4-Preview 23/45 (51%) 26/45 (58%) 21/45 (47%) Claude Opus 5 36/45 (80%) — — - Authors' reading: on pool447, the heaviest Claude Code and the lightest mini-SWE-agent are equivalent within ±5 points; every pair beyond noise is OpenCode trailing, and after Holm correction the two Qwen3.8-27B gaps remain while the Qwen3.6-35B-A3B one does not.
- On hard45, the spread across the three harnesses is 2–5 tasks per model, and rerunning the same cell moves at most 3; mini-SWE-agent leads on three of the five models, and all paired intervals cover zero (Figure 1b).
- The authors state that on hard45 the harness ranking and the run ranking are indistinguishable.
Noise floor and resolution
- flip rate: on hard45, rerun pairs flip a median 13%, harness pairs also 13%, model pairs 22% (Figure 2); on pool447, rerun pairs 13% and harness pairs 9–16% (Appendix F).
- Task-level non-reproduction: among the six harness pairs run twice, of the tasks split in run 1, 5 go the same way in run 2 and 7 the opposite way (binomial p=.77); for model pairs, 10 of 15 go the same way. The authors state that harness gaps behave like a fresh sample of the same noise.
- Resolution: at 14% discordance, 45 tasks catch a 12.9-point gap only half the time, and no gap reaches 80% power; 447 tasks can resolve 5.2 points at 80% power (Figure A2).
How harnesses lose tasks
- Output truncation: on pool447 × Qwen3.8-27B, OpenCode has 33 trials truncated by the 32k output limit with no retry, while Claude Code hits the same limit but retries and loses only 1; counting only untruncated tasks roughly halves the OpenCode gap (Table A7).
- Early stopping: on the Qwen3.6-35B-A3B pool, OpenCode stops at a median of 28 calls, versus 71 for mini-SWE-agent and 55 for Claude Code; the authors state the data do not show what makes the model stop earlier in OpenCode.
- Other failures are all lost points: mini-SWE-agent has no compaction, and on Qwen3.8-27B 11/45 hard tasks and 18 pool tasks overflow the window, but most are tasks the model was already losing; OpenCode has 6 trials on Qwen3.8-27B × hard45 that hit the 5,760 s soft timeout (Claude Code can run 36,000 s on the same model), which the authors list as an uncontrolled factor rather than a harness effect.
Bill
- Cost gaps up to 3×: on GLM-5.3-Flash, per trial 1.81 CNY (Claude Code) vs 0.97 (mini-SWE-agent) vs 0.56 (OpenCode); on DeepSeek-V4-Flash, 0.98 vs 1.02 vs 0.66 (Figure A3).
- Sources: the preamble per call is 16,581 (Claude Code) / 7,025 (OpenCode) / 829 (mini-SWE-agent) tokens; first-call input is 17.1k / 7.6k / 1.4k; per-step growth rates differ by within 1.5×; tool returns per call are similar across the three (Table A4).
- Cache pricing: 96–99% of input is cache hits in each arm; Zhipu's hit price is 0.287× the miss price and DeepSeek's is 0.033×; swapping price lists leaves the ordering of the three harnesses unchanged (Appendix G).
Other ablations and analyses
- Home-field check: dsh on DeepSeek-V4-Flash scores 21/45, the same as Claude Code and 1 fewer than mini-SWE-agent; 1.04 CNY per trial, higher than Claude Code's 0.98 (Appendix B).
- Tool ablation (Opus 5 × Claude Code): removing the edit tool, removing the shell, and the old version 1.0.100 all land at 34–37/45, within one task of the three controls' 35–36; the old version costs 0.44× (Table A5).
- thinking switch: with thinking off for Qwen3.6-35B-A3B, mini-SWE-agent −11.1 points (p=.04), Claude Code +2.2, OpenCode +3.4; turning thinking off for HY4-Preview inside Claude Code costs 11 points (Table A6).
- Recovery port: porting Claude Code's recovery prompt into OpenCode raises mean reward on 41 tasks from 0.585 to 0.634 (p=.29), a rate the authors call indistinguishable from zero (Appendix H).
- Transfer check: on the 50 commonly scored tasks of Terminal-Bench 2.1, mini-SWE-agent 19, OpenCode 20, Claude Code 20, with paired p all 1.0 (Appendix L).
What are some points that can be further explored?
The authors list two scope limitations: a single benchmark and a closed-source anchor; thinking interaction is the lead the authors want to pursue.
Limitations and future directions noted by the authors
- Single benchmark: the results come from one benchmark; the single-model check on Terminal-Bench 2.1 is only a transfer check, and general-purpose agents may be a different regime (Discussion, "Two limits on scope").
- The closed-source anchor runs only inside Claude Code: the three-harness ladder stops at HY4-Preview, so it cannot be determined whether closed-source frontier models show the same gap (Discussion).
- The thinking interaction mechanism is unclear: turning thinking off costs 11 points each for mini-SWE-agent × Qwen3.6-35B-A3B and Claude Code × HY4-Preview; the authors state the grid is too small to identify the mechanism and call it "a lead we will pursue" (Discussion).
- The reason OpenCode stops early is unknown: the data do not show what makes the model stop earlier in OpenCode; all that is known is that short runs and lost tasks co-occur (Section 4.3).
- Recommend reporting reruns: the authors recommend reporting a second run of the same cell next to any harness gap—the cheapest control that most comparisons skip (Conclusion).
Scope of the experiments
- The models tested are five models run on all three harnesses plus Claude Opus 5 (only inside Claude Code), six in total; pool447 covers only the two local models Qwen3.6-35B-A3B and Qwen3.8-27B.
- The task sets are hard45 (45 tasks) and pool447 (447 tasks) from SWE-bench Verified; the transfer check is 53 tasks from Terminal-Bench 2.1 (50 scored by all three), with only one model, Qwen3.6-35B-A3B, and one run per cell.
- Rerun coverage: on hard45, the two Qwen arms, DS Flash × Claude Code, and Opus 5 have 2–3 runs, while the GLM/HY4 arms have one run per cell; on pool447, only Qwen3.6 × mini-SWE-agent has a second run.
- The cost analysis covers only the two vendor API models (DeepSeek-V4-Flash, GLM-5.3-Flash); local models have only token counts, and Opus has no per-token price.
- The paper does not report the sampling parameters of each harness arm (none of the three sends them; decoding is the vendor default); OpenCode's 6 timeout trials on Qwen3.8-27B × hard45 stem from asymmetric wall-clock, which the authors list as an uncontrolled factor.
Summarize the main content of the paper
With the model fixed, the harness barely moves pass rate; it only determines the way tasks are lost and the bill; most reported gains are within noise.
A controlled measurement study of coding agent harnesses that answers "what does the harness itself buy when the model is fixed".
- Question: harness engineering is widely believed to raise scores, and vendor claims and leaderboards are built on this, but existing comparisons run each cell only once, while rerunning the same configuration ten times already spreads 2.2–6.0 points; harness effects and run noise have never been separated on the same batch of tasks and models.
- Method: three production harnesses—Claude Code, mini-SWE-agent, OpenCode—run at factory configuration with versions pinned, across five models (plus a Claude Opus 5 anchor) on the hard45 and pool447 task sets of SWE-bench Verified, with ten reruns to calibrate noise, McNemar paired tests for comparison, billing on a unified price list, and fully offline execution.
- pass rate: on hard45, the median flip rate for switching harnesses and for rerunning the same harness is both 13%, and the tasks a harness wins are not reproduced run to run; on pool447, Claude Code and mini-SWE-agent are equivalent within ±5 points on both Qwen models.
- The only thing beyond noise is lost points: OpenCode trails on pool447 by +4.7 points (Qwen3.6) to +7.9/+9.2 points (Qwen3.8), and half the gap comes from not retrying after 32k output truncation; the authors state that every nameable harness effect is a way of losing tasks, and none is a way of winning tasks.
- Bill: under the same model and tasks, per-task cost differs by up to 3×, determined by the preamble carried at each step (829–16,581 tokens) and the number of steps; cache pricing only scales the bill and does not change the ordering.
- Resolution and recommendation: 45 tasks cannot resolve any gap at 80% power, while 447 tasks can resolve 5.2 points; the authors state that many reported harness gains are below these two numbers, and recommend reporting a second run of the same cell next to any harness gap.