hacktrace: behavior-supervised detection of reward hacking during code generation
On the map: LLM agents and tool use → Software engineering coding agents also fits: Agent threats, guardrails and governance
Abstract (arXiv)
A coding agent can earn a passing grade by fixing its code, or by deleting the test that exposes the bug. Detecting such reward hacking requires recognizing attempted shortcuts, including those that fail. We release 173,561 annotated multi-turn coding trajectories from Qwen3-8B and show that supervising shortcut behavior independently of exploit success substantially improves detection. We introduce HACKTRACE, a behavior-supervised monitor that reads the internal states the agent already computes while generating code. Reusing these states enables monitoring before a turn is complete, without additional language-model tokens or passes. Combining this evidence with static features of the final files achieves a mean per-problem AUC of 0.997 with 8 ms of monitoring overhead, improving both accuracy and latency over monitors that run the model again on an honesty question and answer. The same generation states also provide an inexpensive monitoring signal for reinforcement learning. With strong GRPO penalties, HACKTRACE reduces the cheating share of passing solutions from 82-91% to 1-5%, while retaining honest, correct solutions and maintaining high detection accuracy as the policy evolves. Our results show that both the supervision target and the source of monitoring evidence matter for turning accurate detection into a useful training signal.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. First posted on arXiv 2 Oct 2026.
Builds on
No reference list yet.
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Do Prompt-Elicited Trajectories Reflect Training-Time Reward Hacking? A Systematic Study on Monitoring Training-Time Reward Hacking in Code Generation
- 2026SpecBench: Measuring Reward Hacking in Long-Horizon Coding Agents
- 2026Benchmarking Reward Hack Detection in Code Environments via Contrastive Analysis
- 2026CATCH: A Controllable Analysis Testbed for Reward Hacking in Coding RL
- 2026From Rebound to Remedy: Understanding and Mitigating Reward Hacking via Representation Engineering
- 2026Hack-Verifiable Terminal Bench: Evaluating Reward Hacking in Terminal Tasks
- 2026Do Coding Agents Deceive Us? Detecting and Preventing Cheating via Capped Evaluation with Randomized Tests
- 2026Countdown-Code: A Testbed for Studying The Emergence and Generalization of Reward Hacking in RLVR