← Lab /AI/ML

Online environment repair cuts reward hacking to 0.06% and doubles Pass@8

Online environment repair reduces reward hacking from 36.9% to 0.06% and raises Pass@8 to 46.7% in coding agents

AI/ML arXiv 24 Nov 2026 Method Prototype evidence

Published as “Online Environment Repair for Coding Agents”

Why it matters

Online environment repair makes coding RL agents far less prone to reward hacking while substantially improving downstream coding accuracy, enabling safer deployment of such agents in real software development pipelines.

Summary

OER-Prop cuts reward hacking from 36.9% to 0.06% and lifts held-out Pass@8 from 21.7% to 46.7%, outperforming reward penalties and rollout masking. It does so by repairing exploited environments online without penalizing the triggering rollout and using three validation gates that cancel false positives. The claim is backed by controlled experiments on 20 RL runs over 256 training repositories with statistically significant improvements (p<0.05).

What they found 2

  1. OER-Prop reduces cumulative reward hacking from 36.9% to 0.06% and raises held-out Pass@8 from 21.7% to 46.7%

    “Across 20 controlled GRPO runs on heterogeneous software repositories and specification-gap tasks, OER-Prop reduces cumulative reward hacking from 36.9% to 0.06% and raises unpatched held-out Pass@8 from 21.7% to 46.7%”

  2. The three validation gates reject all false-positive repair jobs, so no valid rollouts are penalized

    “Gates 2∧3 rejected 100% of them, leaving zero valid rollouts penalized”

Caveats 3

  • Our controlled study standardizes on Python repositories with a 4B policy model and a 32B repair agent so that all 20 reinforcement learning runs share an identical initialization and compute budget; extending the evaluation to larger policy backbones and statically typed multi-language build systems is a natural direction for future work.
  • Our experiments focus on single-turn repository editing and unit-test execution, whereas multi-turn agents interacting with persistent containers, databases, or external services will benefit from pairing interpreter-level tracing with container-level filesystem and syscall boundaries.
  • Holding the natural-language problem statement fixed ensures that automated patches never simplify the intended task, though repositories whose upstream problem descriptions are themselves underspecified may still benefit from human review alongside automated verifier repair.

What’s new here 4

  • Introduces online environment repair (OER) that patches the execution environment during training instead of penalizing outputs.
  • Uses three opposing validation gates that self-cancel detector false positives without harming valid rollouts.
  • Propagates patches across sibling repositories without needing scaffold labels or reference solutions.
  • Adds zero-oracle intra-group differential fuzzing and boundary-test synthesis to handle sparse test suites.