Papers
arxiv:2610.25525

StopLoss: Teaching Agents to Predict Failure and Stop Early

Published on Oct 18
· Submitted by
Jiarong Liang
on Oct 20
Authors:
,
,
,
,
,

Abstract

StopLoss is a lightweight external monitor that predicts coding-agent failures from recent tool steps to abort doomed runs early, reducing compute costs while preserving successful outcomes.

Coding agents keep working on runs that will fail verification, and asking a frontier model to watch for this is expensive in its own right. We introduce StopLoss, a small external monitor that learns failure recognition from completed trajectories and their verifier outcomes. The name is inspired by the stop-loss order in finance: StopLoss ends a run early when the run is likely to fail, which saves resources. Final outcomes label earlier local windows, so a fine-tuned language model can score the most recent tool steps in a single forward pass, and a threshold calibrated on successful runs turns that score into an abort decision without changing the executor. Trained on GPT-family SWE-rebench trajectories and evaluated on SWE-bench Verified and a SWE-bench Pro subset with GPT and Claude executors, StopLoss is compared against six general-purpose judges reading identical windows. Outcome supervision lifts failure prediction from near chance to a useful signal at the first check, at one to two orders of magnitude lower cost per check than any tested judge. This translates into savings: relative to completing every task, StopLoss lowers cost per retained solve by 4.5\% on Verified while preserving 99\% of successful runs, and by up to 31\% on the costlier Pro subset, reaching 48\% with a Qwen3-8B backbone, and in all four settings its cost per retained solve is below that of every judge policy. Outcome-trained small monitors can make failure recognition cheap enough for early stopping to pay for itself.

Community

Paper submitter

Coding agents often keep working on runs that will fail, and paying a frontier LLM to watch them can cost more than it saves. Our new paper introduces StopLoss, a small 7–8B monitor that learns from finished runs and their pass/fail outcomes to tell when a coding agent is likely to fail, and stops the run early without changing the agent. In all four settings we tested (SWE-bench Verified and a SWE-bench Pro subset, with GPT-5.6 Luna and Claude Sonnet 4.6 as agents), StopLoss has a lower cost per solved task than every frontier LLM judge. On Pro, it cuts cost per solved task by 31%, while GPT-5.6 Sol, spending 100× more on checks, raises it by 59%. Small monitors trained on outcomes can make failure recognition cheap enough for early stopping to pay for itself. Code, models and data are all open.
2
1

Sign up or log in to comment

Get this paper in your agent:

hf papers read 2610.25525
Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash

Models citing this paper 3

Datasets citing this paper 1

Spaces citing this paper 0

No Space linking this paper

Cite arxiv.org/abs/2610.25525 in a Space README.md to link it from this page.

Collections including this paper 1