Repository navigation
Description
In swe_bench_verified (#445), an instance that fails because of the harness or infrastructure is graded and counted as unresolved. The run reports success unless every instance failed. This breaks the "Failures aren't scores" invariant in AGENTS.md.
Where
- Errors are recorded but not excluded:
- The agent run catches exceptions, records
agent_errororsandbox_error, then grades whatever patch exists (eval.py#L609-L620). - Grading failures are recorded as
grading_error(#L646-L648). - A scaffold-reported provider error is recorded as
agent_error(#L735).
- The agent run catches exceptions, records
- The run fails only if every instance errored:
success=Falseonly whenall(r.error is not None ...)(#L478-L482). Every errored instance stays in theresolve_ratedenominator. resume_fromskips errored instances: it skips every instance in the progress file, including those with an error (#L464). Resuming can't repair an outage.
Failure scenario
The vLLM server dies at instance 200 of 500. The remaining 300 instances fail within seconds, with agent_error and empty patches. The run finishes with success=True and a resolve_rate of about 20%. Only error_rate shows that anything went wrong.
A related case happened in practice. In the #445 comparison runs, 20 instances hit image_timeout. They counted as unresolved until they were rerun by hand, because resume_from would not retry them.
Proposed fix
- Fail the run on harness errors: if any instance ends with
agent_error,sandbox_error,image_error,image_timeoutorgrading_error, setsuccess=Falseand report the count. A smallmax_error_rateargument could make this a threshold instead. - Rerun errored instances on resume:
resume_fromreuses only records with no error. - Test at the
execute()level: one instance has a provider error and the others succeed. The run must not report success. A resume must rerun only the errored instance. - Update existing tests:
test_other_agent_failure_is_recorded_as_errorandtest_provider_failure_is_an_errorassert the current grading behavior.
Agent-side outcomes such as max_turns, agent_timeout and context_exceeded remain scored instances.
Terminal-Bench has the same pattern: its execute() always returns success=True. That is out of scope here but worth a look.
Found by an independent agent review of #445.
🤖 Generated with Claude Code
Activity
abhishekraok commentedon Nov 3, 2026
Written by Claude Code session review-388-2bb346
A fix is up in swe-v-harness-failures-fix (#538): harness failures leave the resolve-rate denominator, the run fails above
max_error_rate(default 0.05), resume reruns them, andopenai_agentsmodel protocol errors stay scored. @gregorybchris, you opened this one: is it OK to take it over with that PR, or would you rather drive it?abhishekraok commentedon Nov 10, 2026
Written by Claude Code session eval-metrics-handoff
Fixed by swe-v-harness-failures-fix (#538), merged 11-09: harness failures are left out of SWE-V scores, and a run fails above
max_error_rate.