← Blog/blog/restart-monitor-recovery-opportunity

A 90% failure monitor can make an agent worse

A failure monitor is a classifier: it watches an AI agent and predicts whether the current attempt will fail. But the intervention is a decision. If an alarm discards useful work and launches a fresh attempt, the replacement still has to solve the task with the remaining budget. Jain and Vedam show that classifier accuracy alone cannot tell us whether that action helps.

01

Separate prediction from intervention

Let q be the chance that the live attempt succeeds if allowed to continue. Let p be restartability: the chance that one independent clean restart succeeds using the same residual budget. The monitor catches a fraction τ of eventual failures and falsely alarms on a fraction φ of eventual successes.

Correct alarms rescue failures with probability p. False alarms destroy successes unless the restart succeeds anyway. The difference is the paper's exact alarm-to-action identity:

gain = (1 − q)τp − qφ(1 − p).

def restart_gain(q, p, true_positive, false_positive):
    rescued = (1.0 - q) * true_positive * p
    destroyed = q * false_positive * (1.0 - p)
    return rescued - destroyed

def restart_threshold(q, true_positive, false_positive):
    alarm = (1.0 - q) * true_positive + q * false_positive
    return None if alarm == 0.0 else q * false_positive / alarm

The running TypeScript core and all three displayed languages implement those same two terms line for line. The threshold divides the expected false-alarm loss by the total alarm rate; below it, restart harms success.

02

Hold accuracy fixed and move the outcome

The paper sets q = 0.5, τ = 0.9, and φ = 0.1. Accuracy is therefore 90% for every restartability value. Yet gain simplifies to 0.5p − 0.05, crossing zero at 10%.

restart-policy gainzero gain
Analytical control from the paper, recomputed by the pure TypeScript core. The x-axis sweeps residual-budget restartability from 0% to 80%; alarm TPR stays 90%, FPR stays 10%, and continuation success stays 50%. This is not measured monitor performance.
The same monitor produces 45%, 50%, or 85% policy success while always retaining 90% classification accuracy. The always-continue baseline is 50%.
perfect-alarm ceiling90% monitor gain
Core-computed opportunity ceiling for q = 50%. The gap between the perfect-alarm ceiling and the 90% monitor is discrimination loss; the ceiling itself is set by recoverable failures, not by classifier quality.
03

The empirical effect rests on one survivor

The authors ran 194 externally evaluated agent executions on 19 selected SymPy issues from SWE-bench Verified. The apparent 2.29-point benefit of restarting at call 16 comes from one eligible failed trajectory on one task. A second model shows a 42.29-point disadvantage for the same fixed restart, and the prospective cohorts do not reproduce a positive gain.

Paper cohortTasksRunsFixed 16Fixed 30DifferenceTask-clustered 95% interval
Initial selected73585.14%82.86%+2.29 pp[0.00, 6.86]
Prospective high-ID735100.00%100.00%0.00 pp[0.00, 0.00]
Difficulty-enriched5250.00%4.00%-4.00 pp[-16.00, 0.00]
Pooled199568.21%68.42%-0.21 pp[-4.21, 2.53]
Paper-reported Table 6 results. Fixed 16 restarts a still-live attempt at call 16; fixed 30 is uninterrupted continuation to the 30-call deadline.
04

Multiple comparisons make zero expensive

For every task–time comparison, the audit builds two-sided exact binomial intervals for continuation and restart, then applies a union bound across the predeclared family. It certifies restart only when the restart lower bound exceeds the continuation upper bound, certifies continuation for the reverse separation, and otherwise abstains.

1 comparison26 comparisons156 comparisons
Core-computed paper equation (17). With zero observed successes, the upper confidence endpoint falls slowly as independent eligible trials accumulate. Simultaneous protection over more comparisons raises the evidence cost.
Core-computed equation (18): zero-success trials required to push the specified upper endpoint below 20%, 10%, or 5%. At the 10% target, one comparison needs 42 trials; 156 comparisons need 90. These counts bound one success probability, not an intervention effect.
05

What the identity assumes

The clean restart must restore the original task state, consume no monitoring budget, and produce an outcome independent of the alarm and live attempt within the fixed task and runtime. A context reset that keeps edits is a different intervention. Across mixed tasks, the fresh outcome can also become dependent even when independent within each task. In the general case, the exact target is E[A(YR − YC)], which requires outcomes for the action actually deployed.

06

What to probe next

Start by estimating restartability at the same decision time, budget, task, and runtime as the monitor. Then score the full controller on success, calls, latency, and cost; preregister thresholds; and test state-preserving recovery as its own action. A logistic-regression monitor can be perfectly well calibrated and still support the wrong intervention if its label omits the replacement attempt's value.