How Reinforcement Learning Doubles Coding Agent Performance

    This article examines why coding agents built on the same base model can differ in performance by more than 2x depending on post-training, and how reinforcement learning drives that gap. It covers team-based versus individual evaluation, how to design controlled experiments that isolate a single variable, and four reusable practices behind the gains: executable verification rewards, training distribution aligned with real repository noise, long-context governance with cost tiering, and explicit self-correction training. The article also includes a simplified evaluation code example and practical recommendations for building internal benchmarks.

    1. Background: Why “Same-Model” Agents Show a Capability Gap

    In real-world coding agent evaluations, a counterintuitive pattern often appears: two models from the same base model family can differ in score by more than 2x simply because of different post-training methods. The reference comparison illustrates this clearly. The version that received only conventional post-training on the same base model scored about 38.9% in the team competition, while the version optimized through reinforcement learning raised its score to 58.2% and reached 66.0% in the individual competition, placing it among the top results.

    This suggests that base model capability is only the ceiling. What truly determines actual problem-solving performance is whether the post-training stage genuinely trains the “explore-verify-correct” loop into the model.

    2. Evaluation Perspective: Team and Individual Competitions Measure Two Different Capabilities

    The data is split into two leaderboards. This is not simple duplication but two capability dimensions:

    • Team competition: The main model handles planning and scheduling, while the auxiliary model takes on subtasks. This measures the ability to divide work, compress context, resolve conflicts, and aggregate results. The combination scoring 58.2% had a goal-to-conceded ratio of 3980:3052, showing that it controlled ineffective changes while writing more correct code.
    • Individual competition: A single model works independently, measuring long-chain self-consistency. With no partner to correct errors, any deviation at one step gets amplified. The 66.0% result, paired with a 3213:1803 ratio, reflects a stronger tendency toward self-verification.

    Engineering takeaway: If your setup is the common “main model + low-cost auxiliary model” configuration, you must evaluate team collaboration separately rather than relying only on single-model benchmark scores.

    3. Controlled Experiment Design: Lock Down Variables to Draw Conclusions

    The most valuable part of the original material is not the conclusion but the design of the control groups. It can be abstracted into three principles:

    1. Change only one variable: Keep the main model fixed and replace only the partner model to determine “who is dragging things down.”
    2. Set up a same-origin control: Compare “base + conventional post-training version” against “base + reinforcement learning version” to strip out base model differences.
    3. Match the real cost structure: Use a low-cost auxiliary model as the control, because in production, sub-agents are often routed to lightweight models to control costs.

    A simplified evaluation-driven example:

    1. def evaluate(policy, partner, suite):
    2. stats = {"win": 0, "draw": 0, "loss": 0, "delta": 0}
    3. for task in suite:
    4. r = run_pair(policy, partner, task) # main model plans, auxiliary model executes subtasks
    5. stats[r.outcome] += 1
    6. stats["delta"] += r.passed_lines - r.broken_lines
    7. total = sum(stats[k] for k in ("win", "draw", "loss"))
    8. return stats, (stats["win"] + 0.5 * stats["draw"]) / total

    The key is to record both the “passed delta” and the “broken delta” at the same time. Otherwise, a model may inflate its surface score through a large number of ineffective changes.

    4. What Reinforcement Learning Gets Right: Four Reusable Points

    1. Rewards come from executable verification, not text similarity

    Using unit tests, compilation results, and static checks as reward signals significantly reduces false positives that “look correct.” Rewards should be layered: compilation passing, test cases passing, and edge cases passing, with points awarded at each level to avoid sparse rewards stalling training.

    2. Align the training distribution with real repository noise

    Real tasks include vague requirements, missing dependencies, and extremely long files. If the training set is all clean examples, the model will lose points in real repositories. Long-context truncation, cross-file retrieval, and failure retries should all be incorporated into sampled trajectories.

    3. Long-context governance and cost tiering

    Longer context is not always better; the key is retrieval precision and position bias control. Engineering practice uses a tiered structure of “strong reasoning from the main model + retrieval and rewriting from a lightweight model,” balancing effectiveness and cost.

    4. Self-correction requires explicit training

    Having the model generate diagnosis, rollback, and retry trajectories after failure, and rewarding eventual successful fixes, can significantly improve stability in no-assistance scenarios like the individual competition.

    5. Implementation Recommendations

    • Build an internal evaluation set covering both the team collaboration and single-model pipelines;
    • Prioritize binding reward design to executable verification while keeping manual spot checks;
    • Record goal-to-conceded style metrics to suppress ineffective changes;
    • Use same-origin controls for continuous regression to avoid hidden degradation from version upgrades.

    In summary, doubling coding capability is not a single trick but the result of systems engineering combining “verifiable rewards + real-distribution sampling + long-context governance + collaborative evaluation.”