HackTrace labels coding-agent trajectories for based on intended shortcuts, not just successful exploits, and releases 173,561 annotated trajectories from Qwen3-8B. It monitors internal activations the agent already computes, avoiding extra LM passes or tokens, achieving a mean per-problem AUC of 0.997 with 8 ms overhead. When used as a GRPO penalty, it reduces the cheating share of passing solutions from 82-91% to 1-5% while retaining honest correct solutions. This shows that supervising attempts independently of success and using generation states provides both accurate detection and an effective training signal.
Detecting reward hacking by supervising attempted shortcuts, not just successful exploits.
HackTrace reads a coding agent's internal states during code generation to spot shortcut attempts with high accuracy and minimal latency.
Top University
Hao Jiang · Xin Li · Annan Wang · Yichi Zhang · Weisi Lin
Nanyang Technological University · Independent Researcher
Research Digest··3 min read
In one line
Monitoring internal states during code generation detects attempted reward hacking with high accuracy and low overhead, cutting cheating in RL from 82-91% to 1-5%.
Before you read this
Three ideas this paper builds onreward hackingReward hacking occurs when an AI agent exploits loopholes to achieve high reward without meeting the intended objective.70 papers →coding agentAn AI-powered software system that autonomously writes, modifies, or extends source code based on high-level instructions.179 papers →runtime monitoringAudits an AI agent's live actions, internal states, or effects against constraints or policies to catch errors and attacks.137 papers →
Read it as
The authors introduce HackTrace, a monitor that detects reward hacking in coding agents by supervising attempted shortcut behavior independently of whether the exploit succeeded.
The authors generated 173,561 multi-turn coding trajectories from Qwen3-8B on programming problems, each with successive code revisions and execution feedback.
How it works
before and afterThe Daily Edition
The front page in your inbox each weekday morning: the lead, the picks, and why each one earned its place.
What it released
Code