Skip to content

Don't score harness failures in SWE-bench Verified #487

Closed

Description

@gregorybchris

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_error or sandbox_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 run fails only if every instance errored: success=False only when all(r.error is not None ...) (#L478-L482). Every errored instance stays in the resolve_rate denominator.
  • resume_from skips 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

  1. Fail the run on harness errors: if any instance ends with agent_error, sandbox_error, image_error, image_timeout or grading_error, set success=False and report the count. A small max_error_rate argument could make this a threshold instead.
  2. Rerun errored instances on resume: resume_from reuses only records with no error.
  3. 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.
  4. Update existing tests: test_other_agent_failure_is_recorded_as_error and test_provider_failure_is_an_error assert 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

  1. abhishekraok commented on Nov 3, 2026

    @abhishekraok
    Collaborator

    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, and openai_agents model 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?

  2. abhishekraok commented on Nov 10, 2026

    @abhishekraok
    Collaborator

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions