- The paper introduces a verified, task-centric pipeline that boosts reproducible environment construction from 16.5% to 57.2% across 12 languages.
- The paper employs process-aware trajectory curation and randomization to mitigate overfitting and enhance long-horizon reinforcement learning stability.
- The paper integrates multi-teacher on-policy distillation with asymmetric PPO, achieving top benchmark results in agentic software engineering and tool-use tasks.
Introduction
KAT-Coder-V2.5 (2607.05471) is positioned on the premise that further progress in agentic coding agents depends dominantly on infrastructure advances—not parameter count. The work systematically dissects the limiting factors for large code models in the transition from passive code completion to autonomous code agents, emphasizing: (1) scalable, verifiable, and reproducible code environments, (2) process-aware trajectory signal curation, and (3) stability and generalization in long-horizon RL. These are treated as systems-level challenges, each addressed with new post-training methodologies and RL architecture. The paper demonstrates substantial quantitative gains on diverse, difficult software engineering and tool-use benchmarks, supported by an infrastructure capable of mining, cleaning, and validating real-world tasks at scale.
Agentic Software Engineering: Task Design and Data Pipelines
KAT-Coder-V2.5 introduces a verifiable task-centric training infrastructure designed to overcome the inadequacies of raw issue and PR text as task specifications and the brittleness of repository environments at scale. The construction pipeline (Figure 1) employs task mining from merged PRs and commits, reconstructing each as a triplet: structured, context-independent problem/requirement/interface description; a deeply validated build environment (via AutoBuilder); and a thorough test oracle with both fail-to-pass and pass-to-pass verification signals.
Figure 1: The agentic software-engineering data pipelines, illustrating the structured progression from raw code changes to validated, agent-ready tasks.
AutoBuilder integrates language- and build-system-specific templates, an extensible recipe database, and active agent feedback loops, substantially improving the success rate of reproducible environment construction from 16.5% to 57.2% across 12 languages.
Central to the data curation process is a process-aware signal pipeline: high-value near-miss trajectories are preserved and completed via hint-based regeneration, while trajectories with brittle, superficial, or shortcut-based pass strategies are filtered out using rule-based and heuristic scoring. Harness randomization swaps tool invocation protocols, context layouts, and injects noise, which robustifies downstream models against interface and environment-specific overfitting.
KwaiClawEnv: General Agentic Capabilities through Large-Scale Environment Synthesis
To support large-scale agentic tool-use, KAT-Coder-V2.5 trains on data from KwaiClawEnv—a modular environment generation framework (Figure 2). This system formalizes environments via composable, validated services (atomic units derived from both open-source skill libraries and LLM-templated APIs), scalable task derivation (with configurable complexity and tractable, semantically diverse interaction trajectories), and an Eval layer for trajectory formatting, multi-level filtering, and quality feedback.
Figure 2: Pipeline of KwaiClawEnv, demonstrating modular construction from service definition to evaluation of agentic trajectories.
KwaiClawEnv can scale a small pool of high-quality primitive services into tens of thousands of reliable, functionally diverse tool-use environments. A progressive, closed-loop validation framework enforces cross-layer consistency and applies post hoc LLM-based trajectory judgment to maximize semantic, execution, and behavioral quality.
Reinforcement Learning Infrastructure and Harness Generalization
KAT-Coder-V2.5 implements RL advances that target long-horizon instability, training-environment brittleness, and overfitting to single harness schemas.
Harness diversity is systematically constructed along axes of tool protocol, context structure, and agent control flow, incorporating both clean “white-box” harnesses for core capability grounding and complex “black-box” harnesses for real-world deployment scenarios. The RL training loop is mediated by a Gateway Server (Figure 3), which decouples inference/interaction and training, ensures tokenization consistency, and isolates harness idiosyncrasies.
Figure 3: Overall architecture of the Agentic RL training infrastructure, highlighting harness scaling and feedback-loop isolation.
Sandbox reliability is specifically optimized: container image management and environment variable isolation reduce reward corruption from environment errors from 16% to below 2%, allowing stable convergence and reliable credit assignment for PPO-based learning.
Figure 4: RL training curve in the SWE scenario, indicating consistent and stable reward improvement throughout training.
An asymmetric PPO architecture is utilized: the critic accesses privileged hindsight context at training time (including real reward, verifier coverage, patch-level diffs), boosting sample efficiency and enabling turn-level credit assignment. The reward framework interleaves rule-based, process-oriented, and failed trajectory incentives with rubric-guided, model-based trajectory reward assessment, ensuring dense and functionally critical learning signals.
Multi-Teacher On-Policy Distillation and Long-Context Stability
The method fuses multiple specialized domain experts—covering SWE, tool use, terminal, web, and general knowledge—using a Multi-Teacher On-Policy Distillation (MOPD) strategy. MOPD performs function-space, reverse-KL distillation from teacher logits on student-generated policies, conditioned on active, potentially drifted prefixes. The system mitigates the instability of long-context distillation via an off-policy cold start (teacher rollouts supervise initial phase training) and drift-aware dynamic truncation (excluding unreliable, highly divergent supervision tokens based on top-k overlap metrics).
This method effectively mitigates the typical see-saw effect of multi-domain merging, achieving robust cross-domain generalization without catastrophic interference.
Quantitative Results
On six major benchmarks (Figure 5), KAT-Coder-V2.5 demonstrates:
These results are robust to harness, environment, or protocol variance by construction and reflect infrastructure-driven improvements in reasoning, localization, patching, and complex multi-tool workflows.
Implications and Future Directions
KAT-Coder-V2.5 establishes that orchestrated infrastructure, trajectory quality filtering, and harness-oriented RL optimization can yield substantial and generalizable gains in agentic code-related tasks—sometimes exceeding what can be obtained by further model scaling. The developed verification, reward, and expert merger protocols form a blueprint for new agentic training systems.
Future developments could extend robust environment construction and process annotation to broader domains (including CLI interaction, scientific computing, and multimodal workflows), develop credit assignment architectures for even longer horizons and sparser reward scenarios, and unify agentic training with open-ended, dynamic environment feedback. Robustness on less-structured tasks (e.g., general AAA coding) is a salient open direction.
Conclusion
KAT-Coder-V2.5 demonstrates that systematic, verifiable environment and trajectory construction, coupled with robust and harness-general RL protocols and multi-domain expert fusion, can produce highly performant code agents, especially in realistic engineering and agentic tool-use scenarios. The technical methods established serve as a foundation for future iterations of autonomous software and agentic systems.