Low-Cost Training Practices for Long-Horizon Agentic Reinforcement Learning

    This article breaks down how a 100-GPU-class cluster can approach frontier training efficiency for long-horizon agentic reinforcement learning. It covers five practical areas: curating RL environments, tuning recipes for long, stale, and low-precision rollouts, sharing one harness across training and evaluation, deciding what to freeze during full-parameter training, and reporting cost alongside scores. A reusable checklist is included.

    1. Why Long-Horizon Agents Are Expensive to Train

    Long-horizon agents are moving beyond short interactions like “fix a bug” toward terminal operations and coding collaboration that run for hours. As task chains grow longer, the sample structure of reinforcement learning (RL) changes fundamentally: one training sample is no longer a question-and-answer exchange lasting tens of seconds, but potentially a complete attempt spanning hours and hundreds of tool calls. This means that when any intermediate step fails—an unstable environment, an abnormal tool return, a misjudgment by the evaluation script—what is wasted is not a single forward pass but hours of cluster time.

    Frontier labs can scale RL across thousands of accelerators, trading scale for stability. Most teams, however, have a budget of only around a hundred GPUs and must achieve efficiency through a “recipe” rather than by piling on hardware. A practice reported by one research team in an industry blog is representative: starting from a base model with 321B total parameters and roughly 17.4B activated per token, they ran full-parameter RL on just 64 next-generation accelerators and completed training in under five days. Pass@1 on a terminal benchmark reached 46.2%, on par with flagship models of the same generation, while the cost per task was significantly lower; the capability also transferred to two software engineering benchmarks. This article does not discuss a specific product, but extracts the reusable engineering methods.

    2. Core Takeaway: 100-GPU Clusters Can Approach the Pareto Frontier

    The key judgment behind this practice is that a 100-GPU-class cluster can achieve frontier-level training efficiency. The reason lies not in compute, but in three things:

    1. Environment filtering: keeping every task at a “suitable difficulty” so it provides a reliable, high-frequency learning signal;
    2. A long-trajectory recipe: optimization and data handling designed specifically for long, stale, low-precision rollouts;
    3. A unified harness: training, model optimization, and evaluation all share the same agent runtime, eliminating the bias where something works during training but cannot be reproduced during evaluation.

    The three points below expand into five actionable areas.

    3. Area 1: Careful Curation of Agentic RL Environments

    In long-horizon tasks, environment noise is amplified by trajectory length. A flaky test or a network hiccup can distort the reward of an entire trajectory. The filtering principles can be summarized as three checks:

    • Verifiability: prioritize tasks with deterministic pass criteria (compilation succeeds, tests pass, command return codes) and avoid subjective scoring;
    • Difficulty distribution: keep some “must-solve” tasks to stabilize gradients and some “borderline” tasks that provide the most information gain, while removing tasks that everyone fails or everyone passes;
    • Isolation: run each task in a separate container with resource quotas, timeouts, and rollback, so tasks cannot contaminate one another.

    Illustrative filtering logic:

    1. def keep_task(stats, low=0.05, high=0.95):
    2. # All-fail or all-pass tasks provide almost no gradient signal
    3. if stats.pass_rate < low or stats.pass_rate > high:
    4. return False
    5. # Unstable judging (high variance across repeated runs) is quarantined for repair first
    6. if stats.result_variance > 0.2:
    7. return False
    8. return stats.verifiable and stats.isolated

    4. Area 2: An RL Recipe for Long, Stale, Low-Precision Rollouts

    Long-horizon rollouts have three inherent weaknesses: they are long (context bloat and high memory pressure), stale (a time gap between data generation and parameter updates causes off-policy bias), and low-precision (rollout precision is reduced for throughput). Corresponding strategies:

    • Length management: segment or summarize and compress overly long trajectories while preserving key tool outputs; set layered timeouts so a single trajectory cannot drag on indefinitely.
    • Staleness management: use truncated importance sampling or proximal constraints to limit how many times a batch of data is reused; record the policy version for each rollout, and down-weight or discard data that is too old.
    • Precision management: rollouts can use low precision to boost throughput, but optimizer states and key normalization statistics should stay at higher precision to avoid silent divergence late in training.

    Illustrative pseudocode:

    1. for batch in stream:
    2. w = importance_ratio(batch.logp_old, policy.logp(batch.x))
    3. w = torch.clamp(w, max=clip_max) # Truncate weight blow-up caused by staleness
    4. if policy.version - batch.version > max_staleness:
    5. w = w * staleness_decay # Down-weight over-age data
    6. loss = -(w * batch.advantage).mean() + kl_penalty(policy, ref)
    7. loss.backward(); optimizer.step()

    5. Area 3: A Coding Harness Shared by Training and Evaluation

    The biggest hidden cost of long-horizon agents is that evaluation is not reproducible. If training uses one set of tool interfaces and evaluation switches to another, the policy the model learns shifts systematically. A unified harness requires:

    • tool signatures, return structures, and error codes to be identical in training and evaluation;
    • evaluation scripts to use the same image and dependency versions as the training environment;
    • full-chain logs (tool calls, latency, token consumption) written to storage for attribution;
    • continuous monitoring and alerting on failure and timeout rates via monitoring and logging services, rather than digging through logs after the fact.

    6. Area 4: Scope Choices for Full-Parameter Training

    This practice trained all language parameters (including the multi-token prediction layers) while freezing the vision tower and the dedicated indexer. The logic is that long-horizon capability is mainly reflected in language-side planning and tool use, while vision and retrieval indexing are already sufficiently covered by general data; freezing them significantly reduces memory and communication overhead. For a 100-GPU cluster, this kind of “freeze what should be frozen” tradeoff often determines whether training can finish within budget more than any single-point optimization.

    7. Area 5: Cost-Aware Evaluation

    Traditional evaluation reports only scores; long-horizon scenarios must also report the average cost per task (tokens and tool calls converted into cost). Plotting Pass@1 and cost on the same log-scale chart reveals whether the Pareto frontier has genuinely advanced: cheaper at the same score, or stronger at the same cost. When teams self-host models, billing at public prices is a reproducible and comparable simplification.

    8. A Reusable Implementation Checklist

    • Build automatic admission and isolation for the task pool, and periodically clean out unstable tasks;
    • Record the policy version for each rollout, and implement truncation and down-weighting;
    • Share the same harness and image across training and evaluation;
    • Define the freezing scope clearly, and prioritize the memory budget for language parameters and optimizer states;
    • Output both scores and cost from evaluation, and make decisions with a Pareto chart rather than a single-point score;
    • Use common cloud capabilities such as container platforms, object storage, and monitoring and alerting to support environment isolation, data retention, and observability.

    9. Conclusion

    Competition in long-horizon agentic RL is shifting from “who has more GPUs” to “whose signal is cleaner, whose trajectories are more controllable, and whose reproduction is more reliable.” None of the five areas above depends on any proprietary interface. A 100-GPU-class team can follow the same path and minimize wasted GPU time within a limited budget, approaching the performance-cost frontier.