SWE-bench gives a coding agent a real, historical GitHub issue from a fixed set of open-source Python repositories and scores success as pass/fail on whether the agent's patch makes the repository's test suite pass. It measures issue-resolution ability on that specific task distribution — not general coding ability or code quality.
Read the script
This is a spoken summary of the guide to what SWE-bench actually measures.
The short answer. SWE-bench gives a coding agent a real, historical GitHub issue from a fixed set of open source Python repositories, and scores success as pass or fail on whether the agent's patch makes the repository's test suite pass. It measures issue resolution on that specific task distribution. It does not measure general coding ability or code quality.
The key points. The task shape is narrow: an existing, real issue, with a known fix and known tests. Success is binary on tests, so an ugly, narrowly targeted patch that passes scores the same as a clean, well generalised one. The language and codebase set is fixed, so a score says little about other languages, frameworks or unfamiliar codebases. Bug fixing and feature building are different tasks, and SWE-bench measures the former only. And training data contamination is a standing concern for any benchmark built from public GitHub data. It isn't unique to SWE-bench, but it's a real reason to read scores with caution.
What a task looks like. Each task starts from a real, previously resolved issue in a curated set of popular Python repositories, paired with the pull request that fixed it. The agent gets the issue and the code at the commit before the fix, and has to produce a patch. Success is decided by running the repository's real tests, including tests added by the historical fix. It's mechanical and reproducible, not a human judgment.
What it captures and what it can't. It does measure resolving a real bug report with a known fix. It does not measure working across many languages, since the tasks are all Python. It does not measure quality, maintainability or style, since scoring is pass or fail. It does not measure designing a new feature from a spec, since every task starts from an already diagnosed issue. And it does not measure performance on an unfamiliar codebase, since the repository set is fixed and, for widely used models, plausibly in training data.
A passing patch isn't necessarily a good patch. A fix that hard codes the test's expected value, or patches around the symptom, can pass exactly as a properly generalised fix does. The benchmark has no way to tell them apart.
Contamination. The tasks come from public repositories and real commit histories, the kind of data models are commonly trained on. A model that saw those repositories, possibly including the fix commits, may have seen the answer rather than solved it fresh. Maintainers take steps to reduce this, but it isn't fully solvable without a held out task set that never touches public data.
What's established. That SWE-bench scores pass or fail against a real repository's tests is documented in its published method. That contamination is a general risk for benchmarks built from public code is also documented. That a high score means a model is generally good at programming is unsupported, because the task distribution is narrower than that. And that scores are comparable across releases without checking the methodology is only inferred, and risky, because variants and harnesses have changed. Comparing raw numbers across different setups can be apples to oranges.
The page links on to how agents choose files, and to why A I code fails silently, since passing tests and being correct aren't automatically the same thing.
Key takeaways
- The task shape is narrow and specific: an existing, real GitHub issue in one of a fixed set of Python repositories, with a known fix and known tests that verify it.
- Success is binary pass/fail on tests, not a quality judgment — an ugly, narrowly-targeted patch that happens to pass scores the same as a clean, well-generalized one.
- The language and codebase distribution is fixed, so a score says little about performance in other languages, frameworks, or unfamiliar codebases outside that set.
- Bug-fixing and feature-building are different tasks. SWE-bench measures the former specifically; it says nothing directly about designing and building new functionality from a specification.
- Training data contamination is a standing methodological concern for any benchmark built from public GitHub data, not a flaw unique to SWE-bench, but a real reason to read scores with some caution.
What SWE-bench does and does not measure
What the benchmark's task actually looks like
Each SWE-bench task starts from a real, previously-resolved GitHub issue: a bug report or feature request against one of a curated set of popular open-source Python repositories, paired with the pull request that actually fixed it in the repository's real history. The agent under test receives the issue and the codebase at the commit before the fix, and has to produce a patch. Success is determined by running the repository's real test suite, including tests specifically added by the historical fix to verify that exact bug is resolved — a mechanical, reproducible pass/fail, not a human judgment call.
| Property | Does SWE-bench measure it? | Why |
|---|---|---|
| Resolving a real, existing bug report with a known fix | Yes | Exactly the task shape the benchmark is built from |
| Working correctly across many programming languages | No | Tasks are drawn from a fixed set of Python repositories |
| Code quality, maintainability, or style of the fix | No | Scoring is binary pass/fail on tests, with no quality dimension |
| Designing and building a new feature from a spec | No | Every task starts from an existing, already-diagnosed issue with a known correct fix |
| Performance on an unfamiliar, out-of-distribution codebase | No | The repository set is fixed and, for widely-used models, plausibly present in training data |
The training-data contamination question
SWE-bench tasks are built from public GitHub repositories and their real commit histories — the same kind of data large language models are commonly trained on. A model trained on data that includes these repositories, potentially including the actual fix commits made after the issues in the benchmark were originally resolved, could have effectively seen the answer during training rather than solving the problem fresh. Benchmark maintainers take steps to reduce this risk, but it remains a standing, general methodological concern for any benchmark constructed from public code — not a flaw specific to SWE-bench, and not fully solvable without a genuinely held-out task set that never touches public data.
Documented vs. inferred vs. unsupported
| Claim | Status | Basis |
|---|---|---|
| SWE-bench scores success as pass/fail against a real repository's test suite | Documented | Directly described in the benchmark's published methodology |
| Training data contamination is a general risk for public-code-derived benchmarks | Documented | Widely discussed methodological concern across the benchmark research community, not specific to any one benchmark |
| A high SWE-bench score means a model is generally good at programming | Unsupported | The benchmark's task distribution (issue-resolution, fixed Python repos) is narrower than "programming ability" as commonly implied when scores are cited |
| SWE-bench scores are comparable across model releases without checking methodology changes | Inferred | Benchmark variants and evaluation harnesses have changed over time; comparing raw numbers across different setups without checking they're the same variant risks an apples-to-oranges comparison |
Sources and further reading
Primary documentation for the topics in this guide:
- SWE-bench: Can Language Models Resolve Real-World GitHub Issues? — arXiv
- SWE-bench Leaderboards — swebench.com