Small local model cuts Claude Code agent costs by two thirds

A University of Waterloo preprint keeps an expensive frontier model in charge of coding and search tasks. Routine legwork goes to a small model on a single GPU, and the authors report no loss in tasks solved.

5 min readIIIOpen sourcePreprint, not peer reviewed
Save
A brass magnifying glass on warm off-white paper next to small cards, with a tiny blue wheelbarrow carrying a larger card stack.AI illustration
Illustration: AI generated

What the study shows

Lingwei Gu and Jimmy Lin at the University of Waterloo built a harness, the software that runs an AI agent's loop of thinking and tool use. It sits on top of Claude Code, Anthropic's coding agent. A frontier model, meaning a large, top-tier commercial model, leads every task. It plans, writes the code changes and gives the final answer. A small language model (SLM) on a local GPU does the legwork: finding relevant code, reproducing bugs, running tests and searching documents. The SLM sends back only a short report, which the frontier model reads before acting. No model is trained or fine-tuned. The paper is a preprint and has not been peer reviewed.

The main frontier model was GPT-6.1-Sol. The SLMs were Qwen3.8-27B in a compressed 8-bit form, which needs one workstation GPU, and MiniCPM5-2B, which fits on a laptop. The baseline was the same frontier model working alone in the same setup, with prompt caching on, so repeated input was already billed at a discount.

The authors report that on DeepSWE, a benchmark of long software tasks, the frontier model's cost fell from about $2.11 to $0.70 per task. It solved 29 of 50 tasks either way. The 2B laptop model gave almost the same saving. On two versions of SWE-bench, a widely used set of real code fixes, cost fell to between about a third and a half.

On 694 search questions, the system answered exactly as many correctly as the frontier model alone, at 41% of the cost. Savings were largest where the model had to read whole documents, and smallest on one benchmark where a command-line search returned only matching lines.

Savings grew with task length. On short tasks, delegation cut cost to about 60% and sometimes cost more. On tasks needing over 200 steps, cost fell to about a quarter. A short written instruction telling the frontier model what to delegate mattered a lot. Without it, the 2B model lost 7 of 29 solved tasks. Delegation also made work slower: the median DeepSWE task took 38 minutes instead of 25.

Our reading

In our reading, the useful idea is the division of labour. Earlier cost-saving methods mostly pick one model to handle a whole task, so a weak model can fail the whole job. Here the expensive model never hands over the decision. It hands over chores and checks what comes back. That explains why even a 2B model did not hurt results once the instruction was in place.

The second lesson is that Claude Code already splits work into subagents, but by default those subagents also run on the frontier model. The authors find that these subagents accounted for about half of the frontier bill on DeepSWE. Much of the saving comes simply from sending that existing work to a cheaper model, and from telling the frontier model to take fewer steps itself.

A concrete example: a team running overnight coding agents on large bug backlogs might cut its frontier API bill by more than half, if it has a spare workstation GPU. A developer waiting at the keyboard for a quick fix gains less. Short tasks save little and take about twice as long.

Free membership

Read the rest of this story

Membership is free. You get every article in full, and can save stories and follow topics.

We send a sign-in link, no password needed. Already a member? Sign in

Readiness assessment

III
Open source
LevelStatusEvidence
I  Lab onlyMetWorking system with a defined method and experiments.
II  BenchmarkedMetResults on public benchmarks: SWE-bench Verified, SWE-bench Pro, DeepSWE, BrowseComp-Plus, TRQA, HotpotQA and DSQA, compared with a frontier-only baseline.
III  Open sourceMetThe abstract links to a GitHub repository, and the paper says the harness is open source and task lists are released. We did not inspect the repository.
IV  In productionNot yetNo documented use by a named organisation in production. All evidence is from the authors' benchmark runs.

What would move it up
Documented deployment by a named team on real workloads, with measured cost and latency. Independent replication across more frontier models, with repeated runs and confidence intervals, would also help.

The study

Lingwei Gu, Jimmy Lin. Delegent: A Multi-Agent Harness That Reduces Cost without Sacrificing Performance. arXiv, 24 November 2026. Read the paper

Preprint, not peer reviewed · Licence CC BY 4.0 · University of Waterloo, Waterloo

Notes

  1. Gu, L. and Lin, J. Delegent: A Multi-Agent Harness That Reduces Cost without Sacrificing Performance. arXiv preprint, 24 November 2026, not peer reviewed. CC BY 4.0. Source
  2. Code repository linked by the authors. We have not inspected it. Source
  3. DeepSWE, 50 tasks, GPT-6.1-Sol at high effort: frontier cost $2.110 per task alone, $0.704 with Qwen3.8-27B-FP8 (33%), $0.712 with MiniCPM5-2B (34%). Solved 29, 29 and 30 of 50. Total with Qwen priced at Chutes API rates: $0.806 (38%).
  4. Search, 694 questions: 663 correct alone and with delegation; frontier cost $0.091 against $0.037 per question (41%). BrowseComp-Plus over its own corpus: 63% of cost, 192 against 193 correct.
  5. Instruction ablation on DeepSWE: without the instruction, Sol plus MiniCPM5-2B solved 22 of 50 at 51% cost; with it, 30 of 50 at 34%. Claude Opus 5.5: 69% of cost, 38 against 34 solved.

Edited and signed by

Stefan PerdalFounder. Twenty-five years of building digital products.160 stories edited

Stefan read the study, set the readiness level and approved this story. An AI system found the paper and wrote the first draft.

How this was made

An AI model read the study and wrote this article in the structure Science Underway uses. An editor reviewed it and approved it for publication. Check the original study before you rely on the details.

More on Agents