Claw-SWE-Bench: A Benchmark for Evaluating OpenClaw-style Agent Harnesses on Coding Tasks

Mengyu Zheng, Kai Han, Boxun Li, Haiyang Xu, Yuchuan Tian, Wei He, Hang Zhou, Jianyuan Guo, Hailin Hu, Lin Ma, Chao Xu, Guohao Dai, Lixue Xia, Yunchao Wei, Yunhe WangarXiv 2026

TL;DR

Claw-SWE-Bench is a new evaluation benchmark and adapter protocol designed to test general-purpose AI agents (like OpenClaw) on complex, repository-level coding tasks. By decoupling the underlying Large Language Model (LLM) from the agent's scaffolding ("harness"), the benchmark reveals that a well-designed agent harness is just as critical to coding success and cost-efficiency as the choice of the LLM itself.

What Problem Does This Paper Address?

Evaluating AI agents on real-world software engineering tasks typically relies on benchmarks like SWE-bench. However, SWE-bench enforces a strict contract: the agent must operate within a clean Docker environment and output a precise Git patch file (.patch) to resolve a specific GitHub issue.

General-purpose agents are not built for this. They communicate via conversational text, generate non-solution artifacts, and lack native workspace management. To get them to work, researchers usually bundle the LLM, prompt templates, agent loops, and patch extraction tools into a single monolithic system.

This creates an entanglement problem. When a system scores well, it is impossible to tell whether the success is due to a superior LLM, a clever prompting strategy, or highly optimized agent tools. Furthermore, this entanglement hides the massive API token costs and resource consumption variations between different agent architectures.

Methods

The authors introduce CLAW-SWE-BENCH, which solves the entanglement problem by introducing a standardized Adapter Protocol and a Shared Orchestrator.

Figure 2. Contract mismatch between OpenClaw-style harnesses and SWE-bench. The adapter converts a general agent interaction into a SWE-bench-scored patch prediction, while outer controls ensure fairness, comparability, and traceable cost.
  • The Adapter Protocol: Instead of forcing every agent to use the same internal loop, it standardizes lifecycle methods (like create_agent, send_task, and delete_agent). Crucially, it collects solutions directly from the repository's state modifications rather than parsing the agent's text output.
  • The Shared Orchestrator: This layer fixes all experimental constants: the task prompt, the Docker runtime environment, a 3600-second timeout budget, and worker concurrency. This isolates the agent harness (the "claw") as a controlled independent variable.
  • Future-Commit Cleanup: The authors discovered that some SWE-bench Docker images accidentally exposed Git commits dated after the issue's base commit, allowing agents to "cheat" by reading the history. CLAW-SWE-BENCH programmatically strips these future commits to ensure strict evaluation fairness.
  • Cost-Aware Lite Subset Selection: To lower the financial barrier to benchmarking, the authors used a rank-aware, cost-aware optimization procedure to select an 80-instance subset (Claw-SWE-Bench Lite) that mirrors the difficulty, language distribution, and cost profile of the full set at a fraction of the price.

Datasets

The full benchmark consists of 350 real-world GitHub issue-resolution instances spanning 8 programming languages and 43 repositories:

  • 300 non-Python instances curated from SWE-bench-Multilingual (covering Java, Go, Rust, JavaScript/TypeScript, C/C++, Ruby, and PHP).
  • 50 human-validated Python instances from SWE-bench-Verified-Mini.

Claw-SWE-Bench Lite scales this down to 80 instances (exactly 10 per language), carefully balanced across difficulty quartiles.

Key Insights and Ideas

  • Scaffolding is a First-Class Factor: Changing only the agent harness while keeping the LLM identical can alter the task success rate by up to 27.4 percentage points. The harness is not just a wrapper; it is a core driver of performance.
  • Raw Diff Generation is Too Fragile: Asking an LLM to directly write a unified diff string results in a dismal 19.1% success rate because minor syntax errors (like incorrect line numbers or trailing newlines) cause patch application failures. Letting the agent naturally edit files and programmatically extracting the diff boosts performance to 73.4%.
  • The Accuracy-Cost Pareto Frontier: Higher accuracy does not always mean higher efficiency. Agents with similar success rates can differ by orders of magnitude in API costs due to differences in token usage, turn counts, and caching strategies.
Figure 1. Resolve-rate–cost Pareto frontier. Data are from the five-claw × two-model sweep in

Key Results

The authors conducted two major sweeps: a 9-model sweep using OpenClaw, and a 5-claw × 2-model cross-evaluation.

  • Adapter Impact: Using a GLM 5.1 backbone, a bare-minimum adapter achieved only a 19.1% Pass@1 (with a 69.1% patch application failure rate). The full CLAW-SWE-BENCH adapter achieved 73.4% Pass@1 with less than 1.5% patch failures.
  • Model Sweep (with OpenClaw): GPT 5.5 achieved the highest accuracy (78.0% Pass@1), but cost a staggering $1,399.10 for the 350-instance run. In contrast, DeepSeek-V4 Flash achieved a highly competitive 70.3% Pass@1 for a mere $8.20, thanks to an exceptional 98.5% cache hit rate.
  • Harness Sweep: When paired with the budget-friendly Qwen 3.6-flash model, the choice of harness caused performance to swing wildly: OpenClaw led at 66.0%, followed by Hermes (62.6%), ZeroClaw (58.3%), Nanobot (47.4%), and a basic GenericAgent baseline (38.6%).
  • Lite Parity: Validation of the Lite-80 subset showed a mean Pass@1 of 64.3% compared to 63.9% on the full dataset, confirming it accurately preserves system rankings while slashing evaluation costs to 22.9% of the original total.

Limitations and Future Work

While Claw-SWE-Bench provides a rigorous framework for agent evaluation, the authors highlight several limitations:

  1. Single-Run Variance: The main benchmarks rely on single-run aggregates due to cost constraints; future work should incorporate multi-seed replication to quantify statistical randomness.
  2. Limited Model-Harness Combinations: The claw sweep was restricted to two models (GLM 5.1 and Qwen 3.6-flash). A wider model axis is required to fully map out the complex cross-dependencies between specific LLM architectures and agent frameworks.
  3. Generalizability: It remains an open question whether the model-harness non-separability discovered here applies equally to other agent domains, such as web automation or general computer-use tasks.

Summary updated

BibTeX
@misc{zheng2026claw,
  author = {Mengyu Zheng and Kai Han and Boxun Li and Haiyang Xu and Yuchuan Tian and Wei He and Hang Zhou and Jianyuan Guo and Hailin Hu and Lin Ma and Chao Xu and Guohao Dai and Lixue Xia and Yunchao Wei and Yunhe Wang and Yu Wang},
  title = {{Claw-SWE-Bench: A Benchmark for Evaluating OpenClaw-style Agent Harnesses on Coding Tasks}},
  year = {2026},
  eprint = {2606.12344},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.12344},
}
Figure