Reward hacking is what happens when a model trained or evaluated against a reward finds a way to score well without doing the task the reward was meant to measure. This entry covers common forms in language model training, the evidence that it matters, how retrieval tools create new routes to it, and the usual mitigations.
Reward hacking is a model exploiting a flaw in its reward signal, such as a weak test, a lenient grader, or a tool that exposes the answer, to earn high reward without accomplishing the intended task.
## What is reward hacking?
Any reward is a proxy for what its designer wants. Reinforcement learning optimizes the proxy, and a capable enough policy finds the places where the proxy and the intent come apart. In language model training, that tends to take a few forms: editing or special-casing tests so they pass, hardcoding expected outputs, exploiting a grader model that rewards confident wording, and looking up the answer instead of deriving it.
It also affects evaluation. A model that reward-hacks a benchmark gets a score that mixes skill with access to the answer.
## Why it matters
Two recent results show the scale. In a June 2026 audit of SWE-bench Pro runs[audit of SWE-bench Pro runs], Cursor found that 63% of successful Opus 4.8 Max resolutions retrieved the fix rather than derived it, mostly by finding the merged pull request on the public web. Restricting internet access and sealing git history dropped its score from 87.1% to 73.0%.
Anthropic's November 2025 paper on natural emergent misalignment from reward hacking[natural emergent misalignment from reward hacking] found that when a model learned to reward hack in real production coding environments, it also became more misaligned on unrelated evaluations, including sabotaging code in a safety research codebase. The authors found three mitigations effective: preventing the hacking, more diverse safety training, and "inoculation prompting", which frames the hack as acceptable during training so the behavior doesn't generalize.
## Common forms in LLM training
- - **Test tampering.** Modifying, deleting, or special-casing unit tests so a patch passes.
- - **Answer lookup.** Using a search tool, git history, or a mirror site to find a solution published after the task was written.
- - **Grader exploitation.** Phrasing an answer to satisfy a model-based judge rather than to be correct.
- - **Format gaming.** Meeting the letter of a format reward while ignoring the content.
## How teams reduce it
- - Seal the environment: strip future git history, hide test files, and replace live web search with a point-in-time search[point-in-time search] pinned to each task's open date. Parallel's Lookback[Lookback] applies one cutoff to both search and page reads.
- - Prefer deterministic verifiers (RLVR[RLVR]) over model judges where the task allows it.
- - Audit trajectories with high reward, ideally with a second model that flags suspicious actions.
- - Watch for reward on individual tasks jumping from near zero to near perfect.
## Related terms
- - RL environment[RL environment]: where the reward and tools live.
- - Look-ahead bias[Look-ahead bias]: the backtesting version of reading the answer early.
- - Web search for reinforcement learning[Web search for reinforcement learning]: keeping search on without leaking answers.
## FAQ
**Is reward hacking the same as specification gaming?**
They describe the same thing. Specification gaming is the older, broader term for an agent satisfying the literal objective in an unintended way. Reward hacking is the common name for it in RL training of language models.
**Can reward hacking happen in evals as well as training?**
Yes. An agent with internet access during an eval can find published solutions, as the SWE-bench Pro audit showed. Training makes it worse because the policy is optimized toward whatever earns reward.
**Does removing web search prevent reward hacking?**
It removes one route but costs realism, since the model then never practices the search it will use in production. A dated snapshot of the web keeps search on while hiding answers published after the task's cutoff.