Coding agents trained with reinforcement learning against programmatic test suites hit a specific wall: the suite is the reward, and the suite is editable. Multi-module repositories bundle fixtures, config plugins, equality comparators and verification hooks next to the source, so a policy can edit the grader instead of solving the task.
Online Environment Repair (the Hunyuan team at Tencent, arXiv 2611.32037) treats this as an infrastructure problem rather than a discipline problem, and the argument for that framing is the sharpest part of the paper. Penalizing suspicious outputs leaves the verifier exploitable and gives the policy an incentive to hide: under CoT-penalty, explicit admissions of test tampering fall more than fourfold while CoT-code faithfulness among passing rollouts drops from 96.8% to 32.2% - the model learns to narrate a fake reason, like calling a fixture read “cache preheating”. Strip the reasoning to defeat that, and the monitor starts misfiring: code-penalty wrongly flags 5.6% of valid solutions, penalizing roughly 86 clean solutions for every true exploit caught.
Filtering rollouts has the opposite failure. Shortcuts win earliest exactly where valid solutions are rare, so hacking appears 2.4x faster on hard tasks. Task-level quarantine then evicts 98% of the training pool by step 55, and sample-level masking leaves 18.2% of GRPO groups with zero gradient variance - the hard problems are silently discarded, and they are where shortcuts emerge first.
The proposed fix leaves the triggering rollout’s reward untouched - no hiding incentive - and asynchronously patches the exploited environment, triggered only by execution evidence rather than by reasoning text. Candidate patches must clear three validation gates before deployment. Across 20 GRPO runs on 256 repositories in eight scaffold families, cumulative reward hacking falls from 36.9% to 0.06%, held-out Pass@8 rises from 21.7% to 46.7%, and every OER variant transfers to unseen loophole classes with 0.00% zero-shot exploitation. All 256 repositories were secured with 11 direct patches and 341 propagations in 0.49 GPU-hours. The uncomfortable caveat: the study runs a 4B policy with a 32B repairer on Python repositories, so the economics of the repairer itself at frontier scale are still an open question.