Delegent: A Multi-Agent Harness That Reduces Cost without Sacrificing Performance

Lingwei Gu, Jimmy LinarXiv 2026

TL;DR

Running AI agents powered by giant frontier models is painfully expensive because you pay top-dollar API rates for every mundane file search, test run, and document scan. Delegent solves this by putting the frontier model in a managerial role while offloading the tedious legwork to a tiny, local Small Language Model (SLM) running on hardware you already own. Without any model training or loss in accuracy, this plug-and-play setup slashes frontier API costs by up to two-thirds—even when the assistant is a 2-billion-parameter model small enough to fit on a laptop.

What Problem Does This Paper Address?

Imagine hiring a world-renowned principal architect and paying their hourly rate while they spend all afternoon walking around a warehouse looking for a screwdriver. That is essentially how modern AI agents work.

An AI agent is just a language model calling tools in a loop: search code, read file, run test, repeat. With every step, the conversation history grows, and the model re-reads the entire context. On a 100-step software bug, those API token bills—or subscription quota burnouts—compound fast. Yet most of those steps are routine legwork like grepping for a function name or skimming web pages.

Previous cost-saving strategies usually rely on routers or cascades, which pick either a cheap model or an expensive model to handle an entire query from start to finish. That fails on complex, long-horizon tasks where a small model quickly gets lost on its own. The authors ask a simpler question: what if the frontier model always stays in charge, but delegates easy subtasks to a local SLM?

Methods

Instead of training new neural networks or custom routers, the authors turn to harness engineering—building Delegent on top of Anthropic's unmodified Claude Code harness.

Figure 1: The Delegent harness. It starts from the stock Claude Code harness, and everything in orange is what we add. The user talks to the main loop, where the frontier model leads the task and spawns subagents. The loops share most tools, and each adds a few.

Here is how the division of labor works:

  • Role-Based Relay: Delegent places a proxy relay between Claude Code and the models. Main-loop calls go to the frontier model (e.g., GPT-6.1-Sol or Claude Opus 5.5), while subagent calls are routed to a local SLM served via vLLM (Qwen3.8-27B-FP8 on a workstation GPU, or MiniCPM5-2B on a laptop). Both sides maintain prompt caching so repeated context prefixes stay cheap and fast.
  • Isolated Subtasks & Clean Reports: For coding, the frontier model uses Claude Code's native Agent tool to brief subagents. For search, the authors add a Delegate tool using prompts adapted from AREX-Turbo (designed specifically for small 4B-scale models). Crucially, the frontier model never sees the subagent's messy intermediate tool outputs—only a clean final summary. For search tasks, the harness also automatically verifies whether quoted evidence appears verbatim in the cited source.
  • Economic Steering: A short system prompt explains the token economics to the frontier model, instructing it to delegate tool-heavy legwork while keeping core reasoning and final code edits to itself.

Datasets

Because Delegent is completely training-free, datasets are used strictly for evaluation across two domains (no new benchmarks are introduced):

  • Long-Horizon Coding: Random samples of SWE-bench Verified (50 tasks), SWE-bench Pro (75 tasks), and DeepSWE v1.1 (50 hard, multi-step engineering tasks).
  • Agentic Search (694 questions total): BrowseComp-Plus (evaluated both over its native file corpus and over ClimbMix, a 400B-token web corpus accessed via BM25 search), plus three datasets from the CMASS benchmark over ClimbMix: Total Recall QA (TRQA), HotpotQA, and DeepSearchQA (DSQA).

Key Insights and Ideas

  • A 2B laptop model is just as good of an intern as a 27B model. Left alone on 30 DeepSWE tasks, MiniCPM5-2B solves zero tasks (and Qwen-27B solves 5). Yet as subagents under a frontier manager, both achieve virtually identical task resolution and cost savings. Because subtasks are narrow ("find where X is defined"), a weaker SLM just takes a few extra local steps rather than tanking final accuracy.
  • Prompting does the heavy lifting. Simply swapping subagents to a 2B SLM without the steering instruction causes solved DeepSWE tasks to drop from 29 to 22. Adding the short instruction restores performance (30 solved) and accounts for roughly three-fifths of the total cost reduction by keeping the frontier model focused on actual coding.
  • The longer the slog, the bigger the payday. Savings scale directly with how much legwork a task requires. Similarly, iterative "tinkerer" models (like GPT-6.1-Sol, which loops through 84 turns of editing and testing) save far more via delegation than "planner" models (like Claude Opus 5.5, which plans upfront and finishes in 18 turns).
Figure 2: Median relative frontier cost per coding task, by how many calls the frontier model makes on the task when working alone. Pooled over 350 task pairs from the three coding sets and both SLMs.

Key Results

Using GPT-6.1-Sol as the frontier model (with prompt caching enabled across all baselines):

  • Coding: On DeepSWE, Qwen-27B cuts frontier API cost by 67% ($2.11 down to $0.70 per task) while resolving the exact same number of tasks (29/50). MiniCPM5-2B cuts frontier cost by 66% ($0.71/task) and solves 30/50. Even if you rent the 27B SLM via a commercial API instead of running it locally, total cost on DeepSWE is still just 38% of the baseline.
  • Agentic Search: Across all 694 questions, GPT-6.1-Sol + Qwen-27B answers 663 correctly—matching the solo frontier model's 663—while cutting frontier cost by 59% overall (and by 69%–75% on ClimbMix search sets where full-page reading is heavy).
Table 1: Coding results with GPT-6.1-Sol as the frontier model. Relative cost is relative to the frontier model alone; cost with SLM adds the SLM at the API price of Qwen3.8-27B-FP8 (Section 3); no API serves MiniCPM5-2B.

Limitations and Future Work

  • Added Latency: Local GPUs aren't massive cloud clusters. Delegating slows down median task completion—from 25 to 38 minutes on DeepSWE, and roughly 2x slower on short SWE-bench Verified tasks—making it less ideal for snappy interactive sessions.
  • SLMs Aren't Free: While local GPUs avoid per-token fees, they still consume hardware and electricity (and search logs lacked per-call token counts to price SLM API equivalents there).
  • Scope & Harness Coupling: Experiments focus strictly on coding and search within the Claude Code ecosystem, and savings depend heavily on how faithfully a given frontier model follows delegation instructions. Future extensions were not discussed in the paper.

Summary updated

Abstract

Agents built on frontier language models are expensive. At every step, the frontier model re-reads its entire context and executes every subtask regardless of its difficulty. This paper explores the simple thesis that much of this cost can be removed by delegating easy subtasks to a small language model, or SLM, that runs on hardware one already owns. To test it, we build Delegent, a simple and effective agent harness built on Claude Code, in which the frontier model stays in charge of every task but hands focused subtasks, such as investigating code, running tests, and searching a corpus, to SLM subagents. Existing approaches such as cascades and model routers usually choose which model executes the entire task, whereas in Delegent, the frontier model always leads the execution and delegates easy subtasks to the SLM. No router or model is trained, so either model can be swapped freely. With the help of a 27B FP8 SLM, Delegent reduces the frontier cost of long-horizon coding by 67% and of agentic search by 59%, with no loss in task performance, and even a 2B SLM that fits on a laptop reduces the coding cost by 66%. The savings grow with the legwork that the frontier model would otherwise do itself, and a short instruction, which leaves the main coding tasks to the frontier model, accounts for most of the saving and keeps the 2B SLM from losing tasks. Code: https://github.com/castorini/delegent
BibTeX
@misc{gu2026delegent,
  author = {Lingwei Gu and Jimmy Lin},
  title = {{Delegent: A Multi-Agent Harness That Reduces Cost without Sacrificing Performance}},
  year = {2026},
  eprint = {2611.33098},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.33098},
}
Figure