Partial Routing: Trace-Tuned Delegation for Resource-Efficient Agentic Workflows

Siddharth Arya, Kshitij JainarXiv 2026

TL;DR

Picking a single AI model for a long, multi-step engineering job is a trap: frontier models burn money on routine chores, while cheap models choke on the hard parts. Partial routing solves this by analyzing past execution logs to build a plain-text "delegation playbook," guiding a frontier lead model on exactly which subtasks to hand off to a cheaper worker. Remarkably, splitting up the work doesn't just cut costs—it actually boosts overall quality beyond what the expensive frontier model achieves on its own.

What Problem Does This Paper Address?

Imagine hiring a principal staff engineer to build a web app from scratch. You want their brainpower on the system architecture and tricky backend logic, not burning billable hours writing boilerplate CSS.

In AI, standard model routing looks at a prompt and sends the entire job to either a pricey frontier model or a budget model. That worked fine for short Q&A, but modern coding agents run for hours, tackling sprawling sequences of easy and hard subtasks ("rollouts").

Existing workarounds have frustrating catch-22s. Out-of-the-box subagent tools let a lead model spawn cheaper helpers on the fly, but the lead guesses what to delegate completely blind, without knowing the worker's actual blind spots. Meanwhile, training a custom orchestrator via reinforcement learning bakes model behaviors into weights—meaning every time a provider updates an API model, you have to retrain from scratch. We need delegation that is dynamic, grounded in real performance data, controllable, and completely training-free.

Methods

The authors introduce partial routing, a lightweight pipeline that turns historical execution traces into prompt-based delegation rules—leaving model weights untouched.

Figure 1: Partial routing. Offline, the lead and the worker each do the same tasks alone, and an LLM annotator then tags each step of their rollouts (gray) with a recurring subtask from a set S; an LLM judge scores both models on each subtask, and δ turns quality and cost saving into delegation tiers. Online, the lead follows this policy and briefs a fresh worker whenever it hands off a subtask. The five subtasks, their scores and their tiers at δ = 0.40 are from
  1. Offline Trace Profiling: Both the expensive Lead ($\mathcal{L}$) and cheap Worker ($\mathcal{W}$) attempt a small set of profiling tasks solo. An LLM annotator reads their step-by-step logs and groups actions into recurring subtasks (like Planning, Data model/DB, or Verification). An LLM judge then grades both models' quality on each subtask, while token trackers tally the exact dollar cost.
  2. Compiling the Policy: For each subtask, the system weighs the percentage cost savings against the "quality risk" (combining average and worst-case quality drops when swapping $\mathcal{L}$ for $\mathcal{W}$). A single user-tunable knob, $\delta \in [0, 1]$, controls how aggressively you favor savings over safety. Subtasks are bucketed into three plain-text tiers: DELEGATE, CONDITIONAL (decide case-by-case), or KEEP (coordination tasks like planning are always kept).
  3. Online Execution: On new tasks, this policy goes straight into the lead model's system prompt. During execution, the lead dynamically scopes assignments and uses a tool to spin up a worker in a fresh context window. The worker shares the file workspace, runs until completion, and hands back a compact summary report.

Datasets

No new benchmarks were created; the authors evaluated on two existing benchmarks built around realistic, long-horizon software workflows:

  • ViBench: Agents build full-stack web applications inside an empty container from real-world Product Requirements Documents (PRDs), graded automatically by a browser-driving evaluation agent (5 profiling apps, 10 held-out test apps).
  • Terminal-Bench 4.0: Agents complete complex command-line tasks in containers and are graded against pre-written verification test suites (12 profiling tasks, 23 held-out test tasks).

Key Insights and Ideas

  • Delegation acts as "context hygiene": Why does adding a weaker model make the stronger model perform better overall? The authors point to context rot. When a solo lead writes every line of code, its context window fills up with noisy implementation history. Workers execute scoped chores in fresh contexts and return crisp summaries, keeping the lead's mind uncluttered for high-level reasoning.
  • Free structure from past traces: Giving the solo lead just the discovered list of recurring subtasks as a suggested plan—with no worker model at all—slashed costs by 16%–39% and even boosted Terminal-Bench accuracy. Distilling past trajectories helps the model plan more efficiently.
  • Glass-box control: Because the compiled policy is just plain text in a prompt, engineers can inspect it before deployment and manually override specific tiers—for instance, forcing authentication logic to stay KEEP regardless of what $\delta$ says.
Subtask quality, cost savings, and resulting delegation tiers across delta values on ViBench.

Key Results

Partial routing beat both solo frontier models and a hindsight oracle task-level router (which cheats by peeking at final scores to pick the best single model per task):

  • ViBench (GLM 5.2 lead + MiniMax M3 worker): At $\delta = 0.75$, partial routing raised the mean score from 70.2 (lead alone) to 78.5 while cutting build costs by 19% ($0.83 down to $0.67). Workers generated 34.5% of output tokens for just 8% of the total cost.
Figure 2: Cost and quality on the ten held-out ViBench applications, mean of three runs. The oracle curve sweeps θ with hindsight (marked point: θ = 100, as in Table 3); the dashed line is the Pareto frontier of methods without hindsight. Higher scores and lower costs are better.
  • Terminal-Bench 4.0 (GPT-6.1 Sol lead + GPT-6 Luna worker): Even though the worker passed a dismal 8.7% of tasks solo, partial routing ($\delta = 0.75$) lifted the lead's pass rate from 54.3% to 60.9% at roughly the same cost ($1.19 vs. $1.17). Unguided delegation gained zero accuracy here (54.3%).
  • Profiling overhead was tiny—costing roughly $30 total on ViBench.

Limitations and Future Work

  • The wall-clock tax: Because delegation happens sequentially—the lead pauses while waiting for each worker's report—wall-clock time jumps significantly. On Terminal-Bench, median task duration rose from 14 minutes (solo lead) to 69 minutes at $\delta = 0.75$.
  • Narrow testbed and fixed knobs: Experiments focused exclusively on coding/CLI tasks using model pairs with steep price and capability gaps. Hyperparameters like the risk-blending weight ($\rho = 0.5$) and tier threshold ($\tau = 0.15$) were held fixed rather than swept, and LLM judge scores weren't cross-checked against human raters.
  • Future directions: Testing partial routing in non-coding domains (like finance, law, or healthcare) and analyzing compliance—how faithfully lead models actually obey, bend, or override their assigned delegation tiers mid-rollout.

Summary updated

Abstract

AI models vary enormously in capability and price. Model routing exploits this by sending easier tasks to cheaper models. However, a single agentic task often combines easy and difficult subtasks, making one model choice for the entire task inefficient. We introduce partial routing, which guides a frontier lead model to delegate suitable subtasks to a cheaper worker model. From both models' past runs, we identify recurring subtasks and measure each model's quality and cost on them. These measurements produce delegation guidance, with a parameter, $δ$, controlling how much is delegated. The lead decides when and what to delegate during execution, without training either model. On held-out tasks from ViBench and Terminal-Bench 4.0, partial routing achieves higher mean task performance than the lead alone and task-level routing. With $δ= 0.75$, it raises the lead's ViBench score from 70.2 to 78.5 at 19% lower cost, and its Terminal-Bench pass rate from 54% to 61% at similar cost. Giving the lead only the subtask breakdown, without a worker, also reduces cost on both benchmarks and raises the Terminal-Bench pass rate. These results show that analysis of past runs can support more efficient planning and more effective delegation, with little cost and implementation overhead.
BibTeX
@misc{arya2026partial,
  author = {Siddharth Arya and Kshitij Jain},
  title = {{Partial Routing: Trace-Tuned Delegation for Resource-Efficient Agentic Workflows}},
  year = {2026},
  eprint = {2611.33402},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.33402},
}
Figure