Fail-Fast, Restart-Smart: Early Failure Prediction and Restart for SWE Agentic Tasks

📅 2026-08-04
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the high resource cost and long failure trajectories of warehouse-scale software engineering (SWE) agents when tackling complex tasks. The authors propose FailFast-RestartSmart, a two-stage controller that first employs a lightweight 0.6B-parameter monitoring model to predict task failure early—using only terminal outputs and dense supervision signals without accessing the agent’s internal state—and then triggers an intelligent restart mechanism. This mechanism initiates a fresh trajectory without historical prompts and optionally reuses valid code changes from the interrupted attempt. The approach achieves the first cross-policy transferable early failure prediction, reducing execution tokens by 14.6%–20.4% at a 5% false positive rate and improving the success rate of Qwen3.6-27B from 66.6% to 71.8% at a 25% false positive rate.
📝 Abstract
Software engineering (SWE) agents resolve repository-level issues through long trajectories that grow increasingly expensive as context accumulates. Failed runs tend to be longer and exhibit redundant exploration or looping, suggesting that some failures may be detectable before completion. Early termination, however, risks interrupting trajectories that would otherwise succeed; conversely, an unsuccessful trajectory may still contain useful repository edits. We present FailFast-RestartSmart, a two-stage controller for a single active trajectory. FailFast is a lightweight 0.6B monitor trained with terminal and dense fail-to-pass supervision to predict failure from observable prefixes without policy logits or hidden states. Upon an alarm, RestartSmart launches a fresh same-policy rollout without prior prompt history and offers the interrupted repository diff as an optional overlay that the agent may inspect, apply, or discard. On SWE-bench Verified, a monitor trained solely on Qwen3.6-27B trajectories transfers to three other policies, including a closed-API model, and saves 14.6%-20.4% of execution tokens at a target 5% false-positive rate; on Qwen3.6-27B, its 20.4% saving exceeds the 12.5% achieved by our per-step AgentStop adaptation. At a target 25% false-positive rate, RestartSmart raises Qwen3.6-27B resolution from 66.6% to 71.8%, whereas cold restart reaches only 66.8%. Together, these results support early termination with sequential same-policy recovery.
Problem

Research questions and friction points this paper is trying to address.

failure prediction
early termination
SWE agents
trajectory recovery
resource efficiency
Innovation

Methods, ideas, or system contributions that make the work stand out.

early failure prediction
trajectory restart
SWE agents
fail-fast monitoring
diff-aware recovery
🔎 Similar Papers
No similar papers found.