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

    This article explains why long-horizon agents are expensive to train rather than to run, and outlines a practical low-cost training approach for teams with around a hundred accelerators. It covers starting from a sparse base model with full-parameter RL, filtering environments so every task is learnable, tuning rollout recipes for long, stale, low-precision trajectories, and sharing one agent harness across training and evaluation. The result is a performance-cost Pareto frontier, with a deployment checklist for reproducing the workflow.

    1. Why Long-Horizon Agents Are Expensive to Train, Not to Run

    Long-horizon agents are pushing task boundaries from “fix a single bug” to terminal operations and software engineering workflows that run for hours. These tasks share one trait: each sample is extremely long. A single attempt can last for hours and involve hundreds of tool calls, and any deviation along the way can invalidate the entire trajectory. For training, this means a very low rate of useful signal per sample, while the compute it consumes is very real.

    Frontier labs can scale reinforcement learning across thousands of accelerators, but most teams operate at around a hundred. To produce usable training results at that scale, the goal is not to pile on more hardware but to get three things right: the environment, the rollout recipe, and a unified agent runtime framework.

    2. Starting Point: Full-Parameter Training from a Large, Sparse Base

    One proven route is to take a sparse base model with roughly 300 billion total parameters and about 17 billion activated parameters per token, freeze the vision tower and the indexer, and run full-parameter reinforcement learning on the language parameters only, including the multi-token prediction layer.

    There are three reasons for this. First, sparse activation keeps per-token inference cost manageable, which lays the groundwork for low-cost single-task training. Second, freezing the non-language modules prevents multimodal signals from interfering with the gradients of text-only agent tasks. Third, full-parameter training rather than tuning only the adapter layers allows long-horizon behavior patterns to be genuinely rewritten instead of patched at the surface.

    3. Key One: Environment Filtering That Makes Every Task Learnable

    The biggest waste in long-horizon RL comes from difficulty mismatch: tasks that are too easy produce no gradient, and tasks that are too hard fail entirely and also produce no gradient. Practical filtering principles include:

    • Sample multiple times with the base model and keep tasks whose pass rate falls in a middle range;
    • Remove tasks that depend on uncontrollable external resources (network, accounts, time-limited resources);
    • Prepare an automatically verifiable check for each task so human scoring never enters the training loop;
    • Rebalance difficulty periodically to prevent the environment from becoming ineffective as the policy gets stronger.

    Illustrative logic:

    1. def keep(task, pass_rate, lo=0.1, hi=0.7):
    2. if not task.auto_verifiable:
    3. return False
    4. if task.needs_external_network:
    5. return False
    6. return lo <= pass_rate <= hi

    4. Key Two: A Rollout Recipe for “Long, Stale, Low-Precision” Trajectories

    Long-horizon rollouts have three natural properties: trajectories are long, data is stale (the sampling policy differs from the current policy), and numerical precision is low (reduced for throughput). Targeted practices:

    1. Use importance sampling ratios and clipping to control the bias from staleness, avoiding runaway ratio accumulation on long trajectories;
    2. Apply segmented advantage estimation on long trajectories to reduce the impact of a single failure point contaminating the whole sample;
    3. Separate low-precision inference from higher-precision training, keeping key reduction steps numerically stable;
    4. Use asynchronous sampling with queuing so sampling and training overlap on a hundred-accelerator cluster, improving effective utilization.

    Skeleton of the objective function:

    1. ratio = exp(logp_new - logp_old)
    2. clipped = clip(ratio, 1 - eps, 1 + eps)
    3. loss = -min(ratio * adv, clipped * adv).mean()

    5. Key Three: One Programming Harness for Training and Evaluation

    In long-horizon agent training, the harness (the agent runtime framework) is not an accessory but a core component that determines signal quality. Model optimization, training sampling, and offline evaluation must share the same tool-calling protocol, context management, and failure-retry logic; otherwise, the gap between training and evaluation gets misread as a gap in model capability. It is advisable to make tool descriptions, timeout policies, log persistence, and result verification a unified interface, use a container platform for environment isolation, and use logging services and monitoring alerts to track the latency and failure points of each trajectory.

    6. Result Shape: A Performance-Cost Pareto Frontier

    On terminal benchmarks, this route can bring a 300-billion-scale agent to about 46% Pass@1, on par with the strongest closed-source solutions, while the cost per task is significantly lower; the same advantage transfers to two software engineering benchmarks. The implication for engineering teams is direct: the capability ceiling is no longer determined by the number of accelerators alone, and the gains from environment quality and harness consistency are often more cost-effective than simply scaling up.

    7. Deployment Checklist

    • Measure the environment difficulty distribution before starting training;
    • Make sampling and training asynchronous to compress wall-clock time per sample;
    • Unify the harness so training and evaluation come from the same source;
    • Store trajectories in general-purpose object storage for review and re-filtering;
    • Validate transferability in small steps, confirming that terminal capability transfers to software engineering tasks before scaling up.

    With this path, a hundred-accelerator cluster can complete a high-quality long-horizon agent RL run within days and push the cost per task down to a fraction of frontier models.