Manuscript Offprint

arXiv:2610.25899

SWE-Residual: Evaluating Starting-State Robustness of Coding Agents

Jinze Li, Weijie Liu, Jinfeng Xu, Shuo Yang, Xin Yang, Yang Zhang, Yijin Wang, Zifei Shan, Edith C. H. Ngai

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Software engineering (SWE) benchmarks are the primary way to measure the capabilities of coding agents: an agent is placed in a code repository or machine environment, given a request, and judged by hidden tests. These benchmarks almost always start the agent from a clean state that contains no earlier work on the task. In practice, however, agents often continue work that a developer or another agent has already done and reported as complete, with no indication of what remains incorrect or missing. We introduce SWE-Residual, a benchmark for Starting-State Robustness: the ability to maintain performance on a task when the starting state already contains earlier work on that task. SWE-Residual contains 198 Residual States drawn from 111 tasks in DeepSWE and Terminal-Bench, where the earlier work modifies a code repository or a whole machine environment. Each Residual State is the state a predecessor agent left behind after submitting its work as complete, although the hidden tests still fail. The evaluated agent receives only the original request and this state, without the predecessor's trajectory or any sign that the attempt failed; because the request and hidden tests are unchanged, the starting state is the only difference from the source benchmark. Across five frontier agents, success drops by 20.6–53.5 percentage points on DeepSWE and 20.6–34.9 points on Terminal-Bench relative to a Clean Start, and agent rankings on DeepSWE reverse. Failed continuations show a pattern we call acceptance bias: agents treat the inherited work as the definition of what remains to be done instead of checking it against the request. On DeepSWE, in 58.9–88.2% of failed runs, they submit with exactly the same tests failing, although they pass most of these tests from a Clean Start. SWE-Residual thus exposes a capability gap that clean-start evaluation does not capture. Codes are available at https://github.com/userljz/SWE-Residual.

1 INTRODUCTION

Coding agents are language models that read files, run commands, and edit code, and they are now used for software tasks that take hours of work (Yang et al., 2024; Deng et al., 2025; Huang et al., 2026). As these agents have become more capable, a growing number of benchmarks have been built to measure their capabilities, from resolving issues in code repositories to operating a whole machine through the command line (Jimenez et al., 2024; Huang et al., 2026; Merrill et al., 2026). These benchmarks differ in their tasks, but they evaluate an agent in the same way. The agent is placed in a starting state, such as a code repository or a machine, and given a request; it works until it declares the task done, and it succeeds if a set of hidden tests then passes. Scores obtained in this way are now the main evidence of how capable a coding agent is.

∗^{*}Corresponding authors.

Figure

Performance (%) under Clean vs Residual Starts

Figure

Figure 1: Left: Standard benchmarks evaluate an agent from the original repository (Clean Start). SWE-Residual evaluates the same agent on the same task from the repository left by a predecessor agent that submitted its work as complete but failed the hidden tests (Residual Start), with the same request and hidden tests and no information about the earlier attempt. Right: Success rates of the five evaluated agents under both settings, averaged over DeepSWE and Terminal-Bench.

However, these benchmarks typically start the agent from a clean initial state, one that contains no earlier work on the task the agent is given. We call this a Clean Start. Yet in practice, agents often start from states that already contain earlier work on the same task. Development is routinely handed over between developers (Khatoonabadi et al., 2023), and increasingly between agents: a user may return in a new session to work that an earlier agent declared done, without the earlier session's context, and in multi-agent systems one agent builds on output that another has submitted as final. In each case, the agent inherits the artifacts of earlier work, such as modified code, newly created files, or installed software. Agents frequently declare success on tasks they have not completed (Advani, 2026), so the work handed to the next agent or session often looks finished but is not. We study handoffs in which this work was submitted as complete but does not satisfy the request, and the agent receives no indication of what is incomplete or incorrect: it must work out from the state alone what has been done and what is still missing.

We call the ability to complete a task from a state that already contains such earlier work Starting-State Robustness. Most benchmarks cannot measure this ability, because a Clean Start never presents the agent with earlier work, so two agents with the same benchmark score may still differ widely in whether they can finish what someone else has started, and, as we show, their ranking can even reverse. This ability cannot be taken for granted. On one DeepSWE task, for example, an agent inspects the inherited changes, runs the package tests, and submits without changing a single file, although the same agent passes the 11 failing hidden tests from a Clean Start.

To address this gap, we introduce SWE-Residual, a benchmark for Starting-State Robustness, as shown in Figure 1. A Residual State is the state a predecessor agent leaves behind after submitting its work on a task from an existing benchmark as complete, although the hidden tests still fail; starting an agent from it is a Residual Start. Such a state looks finished: the work is coherent, often passes the predecessor's own checks, and on DeepSWE the median Residual State already passes 98.4% of the hidden tests; yet parts of the request remain missing or incorrectly implemented, and the evaluated agent must determine which parts of the apparent solution to trust and what work remains. Each instance of SWE-Residual pairs a Residual State with the original request and hidden tests. Because these are unchanged, the same agent can attempt each task from a Clean Start and from a Residual Start. We report success from Residual Starts and the change from Clean Start to Residual Start on the same tasks.

We build SWE-Residual on DeepSWE, where the inherited work modifies a code repository, and Terminal-Bench, where it modifies a machine's files, installed software, and configuration, using Residual States left by predecessor agents from three model families (DeepSeek, Qwen, and GLM). Across five frontier agents, success drops by 20.6–53.5 percentage points on DeepSWE and 20.6–34.9 points on Terminal-Bench relative to Clean Start, and agent rankings on DeepSWE reverse, so strong clean-start performance does not guarantee Starting-State Robustness. We observe a recurring pattern we call acceptance bias: the evaluated agent treats the inherited work as the definition of what remains to be done, instead of checking it against the original request. It inspects the inherited changes but keeps most of them and rarely changes the files the predecessor left out. In 58.9–88.2% of failed continuations on DeepSWE, exactly the same tests fail at the end as at the start, even though the same agent passes most of these tests from a Clean Start.

In summary, our contributions are as follows.

• We identify Starting-State Robustness, the ability to maintain performance on a task when the starting state already contains earlier work on that task, as an evaluation dimension that complements conventional clean-start evaluation.

• We release SWE-Residual, comprising 198 Residual States produced by predecessor agents from three model families (DeepSeek, Qwen, and GLM) on tasks from DeepSWE and Terminal-Bench. We also provide Residualization, a pipeline for constructing and validating these states that enables the benchmark to be extended to additional predecessor agents and source benchmarks.

• Across five frontier agents, success drops substantially from a Clean Start to Residual States, and failed continuations show a pattern we call acceptance bias: agents treat the inherited work as the definition of what remains to be done instead of checking it against the original request.

References (47)