SpecBench: Measuring Reward Hacking in Long-Horizon Coding Agents
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
As long-horizon coding agents produce more code than any developer can review, oversight collapses onto a single surface: the automated test suite. Reward hacking naturally arises in this setup, as the agent optimizes for passing tests while deviating from the users true goal. We study this reward hacking phenomenon by decompose software engineering tasks into three parts: (i) a natural language description of the specification (ii) visible validation tests that exercise specified features in isolation, and (iii) held-out tests that compose those same features to simulate real-world usage. Based on the specification and the visible validation test suites, a genuine agent would be able to generate a solution that can also pass all of the held-out tests. Therefore we use the gap in pass rates on these two suites to quantify reward hacking. Based on this methodology, we introduce SpecBench, a benchmark comprising 30 systems-level programming tasks ranging from short horizon tasks like building a JSON parser to ultra long horizon tasks like building an entire OS kernel from scratch. Large-scale experiments reveal a consistent pattern: while every frontier agent saturates the visible suite, reward hacking persists, with smaller models exhibiting larger gaps on holdout suites. The gap also scales sharply with task length: it grows by 28 percentage points for every tenfold increase in code size. Failures range from subtle feature isolation to deliberate exploits, including a 2,900-line hash-table "compiler" that memorizes test inputs. SpecBench offers a principled testbed for measuring whether coding agents build genuine working systems or merely game the test suites developers hand them.
Key facts. Cited by 25 papers in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 37 of its 55 references that are in the map. First posted on arXiv 20 May 2026.
Builds on
37 of 55 references.
Closest ancestors · 3
Same direction, newest first
- 2026Qwen3-Coder-Next Technical Report28 Feb
- 2025NL2Repo-Bench: Towards Long-Horizon Repository Generation Evaluation of Coding Agents14 Dec
- 2025AlphaEvolve: A coding agent for scientific and algorithmic discovery16 Jun
Other references · 34
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
- 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,761
- 2016Concrete Problems in AI Safetycited by 1,582
- 2022Scaling Laws for Reward Model Overoptimizationcited by 1,056
- 2026DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligencecited by 877
- 2021Deep Reinforcement Learning at the Edge of the Statistical Precipicecited by 781
- 2025DeepSeek-V3.2: Pushing the Frontier of Open Large Language Modelscited by 755
22 more
- 2024Automated Design of Agentic Systemscited by 360
- 2025Monitoring Reasoning Models for Misbehavior and the Risks of Promoting Obfuscationcited by 338
- 2024Alignment faking in large language modelscited by 316
- 2022The Effects of Reward Misspecification: Mapping and Mitigating Misaligned Modelscited by 312
- 2025Darwin Godel Machine: Open-Ended Evolution of Self-Improving Agentscited by 294
- 2025SWE-Bench Pro: Can AI Agents Solve Long-Horizon Software Engineering Tasks?cited by 254
- 2025KernelBench: Can LLMs Write Efficient GPU Kernels?cited by 206
- 2025AIDE: AI-Driven Exploration in the Space of Codecited by 206
- 2023ClassEval: A Manually-Crafted Benchmark for Evaluating LLMs on Class-level Code Generationcited by 166
- 2024Sycophancy to Subterfuge: Investigating Reward-Tampering in Large Language Modelscited by 158
- 2018Categorizing Variants of Goodhart's Lawcited by 132
- 2024Correlated Proxies: A New Definition and Improved Mitigation for Reward Hackingcited by 50
- 2024Prompting Large Language Models to Tackle the Full Software Development Lifecycle: A Case Studycited by 40
- 2025ALE-Bench: A Benchmark for Long-Horizon Objective-Driven Algorithm Engineeringcited by 30
- 2026Reward Hacking in the Era of Large Models: Mechanisms, Emergent Misalignment, Challengescited by 30
- 2026Reward Hacking Benchmark: Measuring Exploits in LLM Agents with Tool Usecited by 25
- 2025EvilGenie: A Reward Hacking Benchmarkcited by 24
- 2023CrossCodeBench: Benchmarking Cross-Task Generalization of Source Code Modelscited by 16
- 2026Benchmarking Reward Hack Detection in Code Environments via Contrastive Analysiscited by 15
- 2026Countdown-Code: A Testbed for Studying The Emergence and Generalization of Reward Hacking in RLVRcited by 15
- 2026Terminal Wrench: A Dataset of 331 Reward-Hackable Environments and 3,632 Exploit Trajectoriescited by 14
- 2026DevBench: A Realistic, Developer-Informed Benchmark for Code Generation Modelscited by 8
Built on by
Citing papers per year: 2026: 25.
25 papers.
Sort:
By area:
- 2026SWE-Marathon: Can Agents Autonomously Complete Ultra-Long-Horizon Software Work?cited by 19
- 2026Safety in Self-Evolving LLM Agent Systems: Threats, Amplification, and Case Studiescited by 6
- 2026Do Agent Benchmarks Measure Capability? Protocol Validity in the Age of Agentic AIcited by 6
- 2026When Do Agent Loops Mistake Stagnation for Progress? Self-Evaluation Bias and Externally Grounded Verification in Long-Running Autonomous LLM Agent Loopscited by 4
- 2026Building to the Test: Coding Agents Deliver What You Check, Not What You Requestedcited by 3
- 2026Don't Blame the Large Language Model: How Agent Harness Evolution Shapes Coding Agent Qualitycited by 3
- 2026Auditing Harness Tampering in Self-Improving Agentscited by 3
- 2026Recursive self-improvement of AI research agentscited by 3
- 2026When the Reward Suite Is Leaky: A Preregistered Causal Contrast of Natural Verifier False Positives in RLVRcited by 1
- 2026Looping Is Not Reliability: State-Bound Evidence and Typed Revision Contracts for Agentic Code Repaircited by 1
- 2026Harness-IF: Evaluating Instruction Following Across Instruction Surfaces in Coding Agentscited by 1
- 2026Reward Hacking Challenges Oversight of Autonomous Research Agentscited by 1
13 more
- 2026Groundability, Not Scale Alone: When Weak Reviewers Can Audit Strong Coding Agentscited by 1
- 2026Leveraging Instruction Tuning and Merging for Reasoning Model Adaptationcited by 0
- 2026Autoresearch with Coding Agents: Generalizers and Metric-Maximizers on Quran Recitation Datacited by 0
- 2026Can escalation channels redirect reward hacking toward defect disclosure?cited by 0
- 2026Commit-first LLM judging inherits the judge's own errorscited by 0
- 2026One to More, More to One: Category-Aware Iterative Expert Training for Software Engineering Agentscited by 0
- 2026Reward Hacking and Agent Containment Failure: A Monte Carlo Study Based on the 2026 Hugging Face Incidentcited by 0
- 2026Identical Runs, Different Results: Benchmarking AI Coding Agents on Open-Weight Modelscited by 0
- 2026Maintaining Benchmarks Against Increasingly Capable Agents: Detection and Remediation of Unearned Passescited by 0
- 2026From Dead Code and Static Requirements to Working Engines: Software Revival with Coding Agentscited by 0
- 2026A Competing-Hazards Systematization of Loss of Control in Autonomous Agentscited by 0
- 2026Verify Claims, Not Scores: Evidence-Based Verification of Modular Agentscited by 0
- 2026StoreBench: A Live-Commerce Environment for Evaluating and Training Autonomous Operator Agentscited by 0
- 2026StoreBench: A Live-Commerce Environment for Evaluating and Training Autonomous Operator Agents7 Oct 2026
- 2026Verify Claims, Not Scores: Evidence-Based Verification of Modular Agents1 Oct 2026
- 2026Groundability, Not Scale Alone: When Weak Reviewers Can Audit Strong Coding Agents1 Oct 2026
- 2026A Competing-Hazards Systematization of Loss of Control in Autonomous Agents29 Sep 2026
- 2026From Dead Code and Static Requirements to Working Engines: Software Revival with Coding Agents28 Sep 2026
- 2026Maintaining Benchmarks Against Increasingly Capable Agents: Detection and Remediation of Unearned Passes28 Sep 2026
- 2026Identical Runs, Different Results: Benchmarking AI Coding Agents on Open-Weight Models27 Sep 2026
- 2026Reward Hacking and Agent Containment Failure: A Monte Carlo Study Based on the 2026 Hugging Face Incident26 Sep 2026
- 2026Reward Hacking Challenges Oversight of Autonomous Research Agents23 Sep 2026
- 2026Recursive self-improvement of AI research agents22 Sep 2026
- 2026One to More, More to One: Category-Aware Iterative Expert Training for Software Engineering Agents20 Sep 2026
- 2026Commit-first LLM judging inherits the judge's own errors31 Aug 2026
13 more
- 2026Auditing Harness Tampering in Self-Improving Agents30 Aug 2026
- 2026Can escalation channels redirect reward hacking toward defect disclosure?29 Aug 2026
- 2026Harness-IF: Evaluating Instruction Following Across Instruction Surfaces in Coding Agents12 Aug 2026
- 2026When Do Agent Loops Mistake Stagnation for Progress? Self-Evaluation Bias and Externally Grounded Verification in Long-Running Autonomous LLM Agent Loops27 Jul 2026
- 2026Looping Is Not Reliability: State-Bound Evidence and Typed Revision Contracts for Agentic Code Repair27 Jul 2026
- 2026Do Agent Benchmarks Measure Capability? Protocol Validity in the Age of Agentic AI24 Jul 2026
- 2026Autoresearch with Coding Agents: Generalizers and Metric-Maximizers on Quran Recitation Data20 Jul 2026
- 2026Leveraging Instruction Tuning and Merging for Reasoning Model Adaptation16 Jul 2026
- 2026When the Reward Suite Is Leaky: A Preregistered Causal Contrast of Natural Verifier False Positives in RLVR13 Jul 2026
- 2026Don't Blame the Large Language Model: How Agent Harness Evolution Shapes Coding Agent Quality4 Jul 2026
- 2026Building to the Test: Coding Agents Deliver What You Check, Not What You Requested26 Jun 2026
- 2026Safety in Self-Evolving LLM Agent Systems: Threats, Amplification, and Case Studies22 Jun 2026
- 2026SWE-Marathon: Can Agents Autonomously Complete Ultra-Long-Horizon Software Work?5 Jun 2026
- 2026Safety in Self-Evolving LLM Agent Systems: Threats, Amplification, and Case Studiescited by 6
- 2026Do Agent Benchmarks Measure Capability? Protocol Validity in the Age of Agentic AIcited by 6
- 2026When Do Agent Loops Mistake Stagnation for Progress? Self-Evaluation Bias and Externally Grounded Verification in Long-Running Autonomous LLM Agent Loopscited by 4
- 2026Building to the Test: Coding Agents Deliver What You Check, Not What You Requestedcited by 3
- 2026Don't Blame the Large Language Model: How Agent Harness Evolution Shapes Coding Agent Qualitycited by 3
- 2026Recursive self-improvement of AI research agentscited by 3
- 2026Looping Is Not Reliability: State-Bound Evidence and Typed Revision Contracts for Agentic Code Repaircited by 1
- 2026Harness-IF: Evaluating Instruction Following Across Instruction Surfaces in Coding Agentscited by 1
- 2026Reward Hacking Challenges Oversight of Autonomous Research Agentscited by 1
- 2026Groundability, Not Scale Alone: When Weak Reviewers Can Audit Strong Coding Agentscited by 1
- 2026Autoresearch with Coding Agents: Generalizers and Metric-Maximizers on Quran Recitation Datacited by 0
- 2026Can escalation channels redirect reward hacking toward defect disclosure?cited by 0
12 most cited of 17 All 17 (JSON)
- 2026StoreBench: A Live-Commerce Environment for Evaluating and Training Autonomous Operator Agents7 Oct 2026
- 2026Groundability, Not Scale Alone: When Weak Reviewers Can Audit Strong Coding Agents1 Oct 2026
- 2026From Dead Code and Static Requirements to Working Engines: Software Revival with Coding Agents28 Sep 2026
- 2026Maintaining Benchmarks Against Increasingly Capable Agents: Detection and Remediation of Unearned Passes28 Sep 2026
- 2026Identical Runs, Different Results: Benchmarking AI Coding Agents on Open-Weight Models27 Sep 2026
- 2026Reward Hacking Challenges Oversight of Autonomous Research Agents23 Sep 2026
- 2026Recursive self-improvement of AI research agents22 Sep 2026
- 2026One to More, More to One: Category-Aware Iterative Expert Training for Software Engineering Agents20 Sep 2026
- 2026Can escalation channels redirect reward hacking toward defect disclosure?29 Aug 2026
- 2026Harness-IF: Evaluating Instruction Following Across Instruction Surfaces in Coding Agents12 Aug 2026
- 2026When Do Agent Loops Mistake Stagnation for Progress? Self-Evaluation Bias and Externally Grounded Verification in Long-Running Autonomous LLM Agent Loops27 Jul 2026
- 2026Looping Is Not Reliability: State-Bound Evidence and Typed Revision Contracts for Agentic Code Repair27 Jul 2026
12 newest of 17 All 17 (JSON)
- 2026Auditing Harness Tampering in Self-Improving Agentscited by 3
- 2026Auditing Harness Tampering in Self-Improving Agents30 Aug 2026
- 2026SWE-Marathon: Can Agents Autonomously Complete Ultra-Long-Horizon Software Work?cited by 19
- 2026When the Reward Suite Is Leaky: A Preregistered Causal Contrast of Natural Verifier False Positives in RLVRcited by 1
- 2026Commit-first LLM judging inherits the judge's own errorscited by 0
- 2026Reward Hacking and Agent Containment Failure: A Monte Carlo Study Based on the 2026 Hugging Face Incidentcited by 0
- 2026A Competing-Hazards Systematization of Loss of Control in Autonomous Agentscited by 0
- 2026Verify Claims, Not Scores: Evidence-Based Verification of Modular Agentscited by 0
- 2026Verify Claims, Not Scores: Evidence-Based Verification of Modular Agents1 Oct 2026
- 2026A Competing-Hazards Systematization of Loss of Control in Autonomous Agents29 Sep 2026
- 2026Reward Hacking and Agent Containment Failure: A Monte Carlo Study Based on the 2026 Hugging Face Incident26 Sep 2026
- 2026Commit-first LLM judging inherits the judge's own errors31 Aug 2026
- 2026When the Reward Suite Is Leaky: A Preregistered Causal Contrast of Natural Verifier False Positives in RLVR13 Jul 2026
- 2026SWE-Marathon: Can Agents Autonomously Complete Ultra-Long-Horizon Software Work?5 Jun 2026
Similar, not cited
Close in wording, no citation either way
- 2026hacktrace: behavior-supervised detection of reward hacking during code generation
- 2026Hack-Verifiable Terminal Bench: Evaluating Reward Hacking in Terminal Tasks
- 2026BAITBENCH: Measuring Agent Reward Hacking with Optional Shortcuts Planted in ML Tasks
- 2026SWE-Bench Pro Verified: A Reliable Benchmark for Software Engineering Agents
- 2026Do Androids Dream of Breaking the Game? Systematically Auditing AI Agent Benchmarks with BenchJack
- 2026TestJack: Should you trust the results in coding benchmarks? Agentic Coding Benchmarks Auditing via Evaluator Evolution
- 2026BenchShield: Formal Model-Backed Instrumentation for Reward Integrity in LLM-Agent Evaluation Infrastructure
- 2026Do Prompt-Elicited Trajectories Reflect Training-Time Reward Hacking? A Systematic Study on Monitoring Training-Time Reward Hacking in Code Generation