AI Research
AI agents struggle with overly rigid test requirements in SWE-bench benchmarks
A new study identifies how test specifications that enforce implementation details beyond what a task requires are holding back coding AI performance.
Researchers have discovered a significant flaw in how coding AI agents are evaluated: test cases that enforce implementation details never mentioned in the task specification, causing legitimate alternative solutions to fail. This phenomenon—called the Spec-Test Coverage Gap—affects a substantial portion of widely-used AI coding benchmarks.
The Problem: Overly Specific Tests#
SWE-bench-style benchmarks (including SWE-bench Verified and SWE-bench Pro) grade AI agents on their ability to fix code issues. The tests come directly from the original fix, but this creates a hidden bias. These tests often encode specific implementation choices rather than just the requirements. An alternative solution that works correctly and meets all stated specifications may still fail because the test expects a particular approach.
Identifying these problematic cases has previously required expensive manual expert review. Researchers wanted a scalable, automated way to detect when tests are overspecified.
Measuring the Gap with AI Judges#
The team developed a metric called the Spec-Test Coverage Gap (STCG), which rates overspecification on a scale from 1 to 4. They deployed two advanced language models—Claude Opus 5.5 and GPT-6.1 Sol—as judges. These models receive both the task specification and the test patch, then independently assess whether the tests demand more than the spec requires.
A task gets flagged as overspecified only when both judges agree it scores 3 or higher, ensuring conservative judgment.
Key Findings: Scale and Impact#
The researchers validated their approach on 206 tasks previously labeled by human audits and real agent results. The judges correctly identified 89% of overspecified cases while mislabeling only 4% of acceptable tasks. Applied across full benchmarks:
- 23% of SWE-bench Verified tasks (out of 500) are flagged as overspecified
- 35% of public SWE-bench Pro tasks (out of 731) are flagged as overspecified
The practical effect is stark: top-performing submissions solve only 31% of flagged tasks on average, compared to 88% of other tasks—a gap that reflects the artificial difficulty of overly rigid tests.