{"slug": "preventing-agents-from-cheating-on-our-custom-swe-bench", "title": "Preventing agents from cheating on our custom SWE-Bench", "summary": "Superconductor found that 49 of 339 coding agent benchmark runs were contaminated by agents cheating on its custom SWE-Bench, with Grok 4.5 accounting for 20 of 30 implementations showing evidence of cheating. The agents retrieved ground-truth solutions from Git history or GitHub, undermining the benchmark's measurement of independent problem-solving. Superconductor deployed a cleanup step to prevent future contamination.", "body_md": "Superconductor is a multiplayer workspace for your team and coding agents. It can also build a [custom SWE-Bench](https://www.superconductor.com/benchmark) for your codebase: a benchmark of coding agents built from your team's own merged pull requests, so you know which agents perform best on your stack.\n\nWe run this benchmark on our own codebase. It is built from a set of ground-truth PRs: substantial, real tickets whose merged implementations our team is proud of and considers strong examples of good engineering work. Agents receive specs inferred from those PRs, but never see the original solutions.\n\nDuring a regular audit of the generated solutions, one Composer 2.5 solution looked suspiciously close to the ground-truth PR. Its work log showed why: the agent had searched pull requests with `gh`\n\n, fetched `origin/main`\n\n, found the exact commit, and cherry-picked it into the working tree. Other agents also found the solution in Git history or after fetching ground-truth branches, which contaminated their benchmark submissions. These agents' output was solid, but the implementation no longer measured independent problem-solving.\n\nWhen we originally discovered this issue, it was uncommon amongst the agents we'd tested. However that changed when we benchmarked Grok 4.5 and noticed that 20/30 implementations across various effort levels and harnesses showed evidence of cheating.\n\nOur findings fit a broader pattern: DebugML's independent audit, \"[Finding Widespread Cheating on Popular Agent Benchmarks](https://debugml.github.io/cheating-agents/),\" found thousands of cheating instances across 28+ benchmark submissions, including task-level cases where agents mined Git history or looked up public answers. In a far more extreme case, [OpenAI and Hugging Face disclosed a security incident](https://openai.com/index/hugging-face-model-evaluation-security-incident/) in which cyber-capable OpenAI models, evaluated on a benchmark of cyber capabilities, escaped their isolated test environment and compromised Hugging Face's production infrastructure to obtain the benchmark's test solutions directly from Hugging Face's production database.\n\n## 49 benchmark runs were contaminated\n\nWe audited 339 coding agent implementations, across 38 agent/profile configurations that ran against 10 ground-truth pull requests. While all 339 agents ran git commands (most commonly `git log`\n\n), only 49 tried various filters to successfully retrieve the ground truth solution.\n\nHere's what they did with the retrieved solution:\n\n- 32 agents directly reused the solution from the ground-truth PR in their implementations.\n- 17 agents retrieved and inspected the ground-truth PR and relied on it while implementing their solution, without directly copying it.\n\nHere's a breakdown of the contaminated agent implementations:\n\n| Harness | Model | Contaminated implementations |\n|---|---|---|\n| Cursor | Grok 4.5 (XHigh) | 7 |\n| Grok Build | Grok 4.5 (XHigh) | 7 |\n| Cursor | Grok 4.5 (High) | 6 |\n| Codex | GPT-5.6 Luna (High) | 4 |\n| Codex | GPT-5.6 Sol (High) | 4 |\n| Codex | GPT-5.6 Luna (XHigh) | 3 |\n| Cursor | Auto | 3 |\n| Cursor | Composer 2.5 | 3 |\n| Cursor | Composer 2.5 Fast | 3 |\n| Codex | GPT-5.6 Sol (XHigh) | 2 |\n| Codex | GPT-5.6 Terra (High) | 2 |\n| Claude Code | Fable 5 | 1 |\n| Codex | GPT-5.6 Terra (XHigh) | 1 |\n| Grok Build | Composer 2.5 (High) | 1 |\n| Pi | GLM 5.1 | 1 |\n| Pi | MiniMax M3 | 1 |\n\n## Some agents went further than local Git history\n\nOf the 49 contaminated implementations, 12 used `gh pr`\n\n, `gh api`\n\n, or GitHub search. For example, one Grok 4.5 (XHigh) agent searched GitHub, tried several local refs, fetched the exact ground-truth branch, and inspected its files with `git show`\n\n. The 12 runs were ten Grok 4.5 agents and two Composer 2.5 agents.\n\n## Preventing future cheating\n\nTo prevent this kind of contamination, we deployed a change that adds a cleanup step before a coding agent starts working on a benchmark implementation. It keeps the current benchmark branch and the history reachable from its base commit, removes every remote and other ref, deletes common temporary Git pointers, expires every reflog entry, and prunes unreachable objects. Agents can still use Git for status, diffs, commits, and pre-base history so it's still representative of a real engineering task environment.\n\nThe change also blocks direct HTTP and HTTPS access to `github.com`\n\n, `githubusercontent.com`\n\n, their subdomains, and the GitHub storage endpoint that serves repository content. This closes the observed `gh`\n\n, raw-file, and HTTPS fetch routes without otherwise changing network policy.\n\nAfter the fix was deployed, we re-ran the implementations and audited the agent work logs. We found no references to the merge SHA or any commits created after the benchmark starting point. Interestingly, only two agents (Cursor Auto and Cursor Composer 2.5) attempted to fetch more history after finding that the Git history was cut off.\n\n## How the results changed\n\nOnce we excluded the contaminated implementations and re-ran the benchmark, the leaderboard changed.\n\nAmong the high-performing agents, Grok 4.5 (XHigh) running in Cursor — previously the top-ranked agent — fell to 8th once it could no longer reach the ground-truth solutions through Git. Its sibling configuration, Grok 4.5 (High) in Cursor, fell to a three-way tie for 3rd with Kimi K3 and Opus 4.8. Both were among the configurations whose work logs showed the most solution retrieval. With those runs corrected, the top of the board is led by GPT-5.4 (High) running in Codex, which had no contaminated runs, even before the Git lock.\n\nAmong the mid-performing agents, Composer 2.5, which before the Git lock was ranked 8th and sat just below Opus 4.8 and Kimi K3, fell to 16th place.\n\n## Find the best coding agent for your codebase\n\nPublic coding-agent benchmarks are useful, but they cannot tell you which agent will perform best on your codebase and stack.\n\nWe continuously audit our methodology and strengthen our safeguards to keep the benchmark accurate as coding agents evolve.\n\n[ Benchmark agents against your own merged pull requests](https://www.superconductor.com/benchmark). We'll cover the cost of your first benchmark.", "url": "https://wpnews.pro/news/preventing-agents-from-cheating-on-our-custom-swe-bench", "canonical_source": "https://www.superconductor.com/blog/preventing-agent-cheating", "published_at": "2026-07-28 23:01:34+00:00", "updated_at": "2026-07-28 23:22:38.696593+00:00", "lang": "en", "topics": ["ai-agents", "ai-safety", "ai-ethics"], "entities": ["Superconductor", "Grok 4.5", "Composer 2.5", "OpenAI", "Hugging Face", "DebugML", "GPT-5.6 Luna", "GPT-5.6 Sol"], "alternates": {"html": "https://wpnews.pro/news/preventing-agents-from-cheating-on-our-custom-swe-bench", "markdown": "https://wpnews.pro/news/preventing-agents-from-cheating-on-our-custom-swe-bench.md", "text": "https://wpnews.pro/news/preventing-agents-from-cheating-on-our-custom-swe-bench.txt", "jsonld": "https://wpnews.pro/news/preventing-agents-from-cheating-on-our-custom-swe-bench.jsonld"}}