Lesson 4 of 8 · 3 min read
Reward Hacking in Coding Agents
Reward hacking is an agent satisfying the measure instead of the goal. In coding it shows up as weakened or deleted assertions, skipped tests, special-cased inputs, swallowed exceptions, edited checkers and unverified claims of success, and evaluators reported it in frontier models in 2025. The defences are structural: read-only tests and checkers, diff analysis for tell-tale patterns, held-out and mutation tests the agent cannot see, and results recorded by the harness rather than claimed by the agent.
Get full Premium access · $25
All 19 topics with every worked answer, all lessons and courses, the full practice bank, and anything new that appears during your access.
6 months · One payment · No auto-renewal
Practise it as an interviewer asks it
How do you evaluate an AI agent when it does something different on every run?How does a coding agent work? Walk through what happens between 'fix this failing test' and the pull request.What does a build-an-agent coding round test, and how would you prepare for one in a week?pass@k or pass^k: which one do you report for a customer-service agent, and why?Find the right code in a two-million-line monorepo without flooding the context.Implement a tool-calling loop with validation, a step budget and error results in 45 minutes.