StopLoss: Teaching Agents to Predict Failure and Stop Early
On the map: LLM agents and tool use → Software engineering coding agents also fits: Financial trading and forecasting agents
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 16 of its 21 references that are in the map. Submitted 18 Oct 2026.
Builds on
16 of 21 references.
Closest ancestors · 6
Same direction, newest first
- 2026Fail-Fast, Restart-Smart: Early Failure Prediction and Restart for SWE Agentic Tasks4 Aug
- 2026SWE-Router: Routing in Multi-turn Agentic Software Engineering Tasks30 Jun
- 2026AgentStop: Terminating Local AI Agents Early to Save Energy in Consumer Devices1 May
- 2026EET: Experience-Driven Early Termination for Cost-Efficient Software Engineering Agents9 Jan
- 2025When Agents go Astray: Course-Correcting SWE Agents with PRMs2 Sep
- 2025SWE-rebench: An Automated Pipeline for Task Collection and Decontaminated Evaluation of Software Engineering Agents26 May
Other references · 10
- 2024Qwen2.5 Technical Reportcited by 5,525
- 2023Let's Verify Step by Stepcited by 4,259
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,871
- 2024Qwen2.5-Coder Technical Reportcited by 1,301
- 2023FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performancecited by 1,000
- 2024RouteLLM: Learning to Route LLMs with Preference Datacited by 809
- 2025SWE-Bench Pro: Can AI Agents Solve Long-Horizon Software Engineering Tasks?cited by 363
- 2025AgentRM: Enhancing Agent Generalization with Reward Modelingcited by 35
- 2026BAGEN: Are LLM Agents Budget-Aware?cited by 16
- 2026Doomed from the Start: Early Abort of LLM Agent Episodes via a Recall-Controlled Probe Cascadecited by 11
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Disentangling Task Difficulty from Run-Level Failure in Agent Failure Prediction
- 2026FailForge: Distilling Procedural Competence from Persistent Failures into Code Agents
- 2026Sentry: Learning to Recover from LLM Agent Failures at Test Time
- 2026Before They Can Solve: Predicting Post-Training Coding-Agent Performance from Base Models
- 2026When Evidence is Sparse: Weakly Supervised Early Failure Alerting in Dialogs and LLM-Agent Trajectories
- 2026AgentForesight: Online Auditing for Early Failure Prediction in Multi-Agent Systems
- 2026Tracing Agentic Failure from the Flow of Success
- 2026When Does Learning to Stop Help? A Cost-Aware Study of Early Exits in Reasoning Models