Hack-resistant verifiers and reward hacking in agent tasks

Short answer. Reward hacking is when an agent gets a passing result without doing the intended work, for example by editing the tests, reading the answer from a file, or special-casing the inputs. Hack-resistant verifiers close those routes before a model finds them.

By Vision Scale Labs · Updated 2026-11-25

Common shortcuts

Agents have been seen to change the test file so it passes, hard-code the expected output for known inputs, read hidden files that sit in the same folder, or stop the program early with a success code. None of these show the skill the task meant to measure.

These are not exotic. Any agent that is rewarded for passing, and can reach the checks, will eventually try them.

Design choices that block them

Keep tests outside the agent's workspace and copy them in at grading time. Check results on inputs the agent has never seen. Verify the final state of the system, not a message the agent prints. Make the success signal something the agent cannot produce by itself.

Where a task allows edits to many files, compare the diff against an allowed list and fail changes to protected paths.

Search for hacks before release

Treat the task as something to attack. Spend a review pass trying to pass it without solving it. Write each successful attack down, fix the task, and keep the attack as a regression case.

After release, read a sample of passing runs, not only failing ones. A passing run with a strange trace is often a hack.

Common questions

Is reward hacking the same as cheating?

The word cheating suggests intent. In practice the agent follows the reward it was given. The fix belongs in the task design.

Can a model detect that a task is hackable?

Sometimes, but do not rely on it. A person trying to break the task finds more issues, and finds them earlier.

Keep reading