Benzi on SWE-bench Verified

391 of 500 resolved (78.2%), pass@1, on DeepSeek v4-flash, for $37.33 total — 9.5¢ per resolved instance.

One configuration, one attempt per instance, no ensembling, no test-time selection, graded by the official SWE-bench harness. This report describes the system, the setup, the results, and how to reproduce them.


1. Headline results

Resolved 391 / 500 (78.2%)
Attempts per instance 1 (pass@1)
Model (all roles) DeepSeek v4-flash
Total generation cost, all 500 $37.33
Cost per resolved instance $0.095
Source lines read — total / median per instance 231,574 / 379
Model turns — total / median per instance 16,091 / 27
Input tokens served from prompt cache 97%
Output tokens, total 22.0M

Grading: swebench.harness.run_evaluation (swebench 5.0.2), official per-instance Docker images, official Hugging Face dataset. 499 generated patches were graded; one instance (django__django-13513) produced no patch and counts as unresolved without grading.

By repository

Repository Instances Resolved Rate
flask 1 1 100.0%
requests 8 8 100.0%
seaborn 2 2 100.0%
scikit-learn 32 29 90.6%
pytest 19 16 84.2%
sympy 75 61 81.3%
django 231 181 78.4%
xarray 22 17 77.3%
sphinx 44 32 72.7%
matplotlib 34 25 73.5%
astropy 22 15 68.2%
pylint 10 4 40.0%

Every instance's turns, lines read, wall time, tokens, and cost are published row-by-row at benzi.fly.dev/benchmark_swebench.

2. The system

Benzi is a code-index agent: before the model sees anything, a tree-sitter-based compiler parses the entire repository and resolves it into a queryable map — symbols, call edges (with the evidence that resolved them), references, inheritance, per-scope data and control flow. Ambiguous calls keep their candidate lists instead of a guess; calls the compiler cannot classify are tagged as declared unknowns. The agent then works through ~36 structured tools over that index (profile, get_callers, backflow, trace_path, skim_source, …), each an O(1) lookup rather than a search. Writes are syntax-gated against the real language parser (a broken parse auto-reverts) and every landed edit reports its blast radius: the changed symbol, its callers, its holders.

The benchmark configuration adds three thin, deterministic layers around that core — all running on the same v4-flash model, all fail-open:

No FAIL_TO_PASS or PASS_TO_PASS test names, files, or contents were ever shown to the agent at solve time. The agent sees the issue text and the repository — nothing else.

3. Setup

4. Efficiency

The index is the efficiency story. A median instance is solved after reading 379 lines of source — not the repository, not a retrieval dump; the 27-turn median is mostly map queries whose answers are a few hundred tokens each. In our separate 24-bug cross-harness benchmark (benzi.fly.dev/benchmark), where reading is measured identically across harnesses, Benzi read 9,125–16,407 lines total (Sonnet / DeepSeek worker) against 20,704 for Claude Code and 43,598 for a plain DeepSeek harness on the same bugs — and the gap widens with difficulty. Lines-read is the one metric we compare across harnesses, because it is the one metric whose measurement we can make identical; wall-clock and dollar comparisons across differently-hosted models are published but not claimed.

5. Limitations

6. Reproducibility

The harness entry points are benzi_headless.py (the agent, one process per instance) and benchmark/swebench_docker.py (container orchestration, mounts, env). The benchmark configuration is env-flag complete: BENZI_VERIFIER=1, BENZI_VERIFIER_MODEL=deepseek, symptom map and scope cards on by default (BENZI_NO_SYMPTOM_MAP / BENZI_NO_SCOPE_CARDS unset). Generation ran on a single EC2 host (docker 25, python 3.12, swebench 5.0.2); grading used the official harness against the official dataset. The full per-instance ledger — including crashed attempts — is public at benzi.fly.dev/benchmark_full.


Benzi — an AI coding agent that doesn't read, it queries. benzi.fly.dev · github.com/oooscoos/Benzi