Repository navigation
Description
Problem
Our bench runs burn the full agent cap (870s) on runs that verifier later rejects anyway. Recorded examples (bench reports #6-#8):
- T05: capped at 900s twice across runs, never resolved
- T17: burned 600s twice before fixture-fix + healthy-engine confirmation
- A20 attempt-1: 20/20 tasks ran to cap, 0/16 scored, 4 VerifierTimeoutError
A run that will fail often shows it in its tool-step trajectory well before the cap. Today nothing watches for that.
Proposal
Small external failure monitor, per the StopLoss paper (arXiv 2610.25525, 2026-10): fine-tune a tiny model on OUR completed trajectories + verifier outcomes; at run time it scores the most recent tool-step window in a single forward pass; a threshold calibrated on successful runs turns the score into an early-abort decision. No change to the executor.
Why us, why now:
- Training data already exists: every bench row has a transcript + verifier outcome (hundreds of rows across harness-gain runs, S1, A20)
- Inference cost is one forward pass on a small model — fits idle windows between tasks, no GPU-window competition
- Composes with checkpoint/rollback (feat(bench): timeout workdir snapshots + BENCH_RESUME_DIR resume mode #361/feat: workdir snapshot on timeout + resume-task (Codex checkpoint/rollback parity) #360): abort can restore the task snapshot instead of burning to cap, and the run row gains an explicit
aborted_earlyflag vscapped
Design sketch
- Export windowed tool-step features from existing transcripts (same export path as feat: ADAPT round-0 trajectory exporter (#389) #397's trajectory exporter — window = last N tool steps)
- Labels from verifier reward (1.0 = keep going; 0.0 = abort candidate); threshold tuned for precision on successful runs, per paper
- Wire as an optional watcher beside the harness loop behind a bench env flag (default off, same pattern as BENCH_DRA / BENCH_HELDOUT)
- Metric: GPU-seconds reclaimed = (cap - abort_time) summed over true-negative aborts, minus false-abort cost (task would have resolved) — report both, never report reclaimed alone
Acceptance
- Offline eval on held-out transcripts: precision/recall vs six-baseline (we have the rows)
- One live bench window with the flag on: false-abort rate on would-resolve tasks must be 0 or the flag ships off
Reference: StopLoss (arXiv 2610.25525) reports strong precision vs six general-purpose LLM judges on SWE-bench Verified / SWE-bench Pro subsets at a fraction of the cost. Related: papers-scan 2026-12-02 §3.
Activity
dahai80 commentedon Dec 2, 2026
Triage: roadmap item, consistent with #389/#390. Sequencing depends on tonight's A20 attempt-9 rows (training corpus grows with every bench window) and the offline eval needs the held-out split of completed trajectories — neither exists as a frozen dataset yet. The env-flagged watcher pattern (default off, same as BENCH_DRA/BENCH_HELDOUT) and the dual metric (reclaimed minus false-abort cost, never reclaimed alone) are the right shape; no executor change needed. Leaving open as roadmap; pick up after the A20 attempt-9 baseline lands and the trajectory export (#397 path) has a labeled frozen snapshot.
dahai80 commentedon Dec 2, 2026
Code slice landed (PR #451, v0.8.72): benchmarks/tb2/stoploss_{lib,dataset,eval}.py + adapter watcher. Watcher default OFF (BENCH_STOPLOSS=1 + BENCH_STOPLOSS_MODEL); log-only without weights; early kill marks aborted_early/abort_time_s so collect_results.py reports reclaimed GPU-seconds AND false-abort cost separately. Threshold calibration is precision-first (perfect precision on train split required, else the eval says the live gate will fail). Remaining acceptance precondition before shipping the flag on: one live window with false-abort = 0, needs real trial data from the next A20 run.
feat: L2 event manifest as preferred StopLoss feature source (#467)