SWE-Router: Routing in Multi-turn Agentic Software Engineering Tasks

Seongho Son, Sangwoong Yoon, Jiahua Tang, Shuhan Wang, Lorenz Wolf +1 more
6/30/2026
cs.SEcs.AI

No confident code implementation found for this paper.

Abstract

Large language models (LLMs) embedded in multi-turn agentic harnesses are reshaping software engineering (SWE), but routing every task to a frontier model is wasteful when many issues admit cheap fixes. Existing LLM routers operate on the task description alone, which inherits an information-theoretic Bayes-error floor in agentic settings: a similar issue can hide either a localized typo or a multi-module refactor, and the prompt does not separate the two.

Show full abstract

We introduce SWE-Router, a value-based temporal approach that lets a cheap model run for a few exploratory turns and reads the resulting partial trajectory before deciding whether to continue cheaply or to escalate to an expensive model. We provide a Bayes-optimality theorem showing that conditioning on the partial trajectory never harms routing and is strictly better whenever exploration is informative. Across the LLM pairs of weak and strong models spanning the contemporary cost--capability frontier, we show that SWE-Router greatly improves the cost efficiency of SWE tasks, while maintaining the majority of the performances of the stronger model. We additionally release a multi-LLM trajectory dataset which allows reproduction of our trajectory-level routing.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{son2026swerouter,
  title  = {SWE-Router: Routing in Multi-turn Agentic Software Engineering Tasks},
  author = {Seongho Son and Sangwoong Yoon and Jiahua Tang and Shuhan Wang and Lorenz Wolf and Ilija Bogunovic},
  year   = {2026},
  eprint = {2607.00053},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.00053v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.00053.svg)](https://codeofpaper.com/paper/2607.00053)

Discussion