KLong: Training LLM Agent for Extremely Long-horizon Tasks
Yue Liu, Zhiyuan Hu, Flood Sung, Jiaheng Zhang, Bryan Hooi
TL;DR
KLong tackles the challenge of solving extremely long-horizon tasks with context windows that are smaller than the task horizon. It introduces Research-Factory to generate high-quality, long-horizon training data from research papers, distilling thousands of long trajectories from Claude 4.5 Sonnet. The training pipeline combines trajectory-splitting supervised fine-tuning with a prefix-containing context and overlapping sub-trajectories, followed by progressive reinforcement learning across staged timeouts to stabilize learning and extend horizon reasoning. Empirical results show that KLong-106B achieves state-of-the-art open-source performance on PaperBench and generalizes well to SWE-bench Verified, MLE-bench, and other benchmarks, outperforming several baselines and even some closed-source models on specific tasks. These findings suggest a practical path to building general-purpose LLM agents capable of sustaining long-duration reasoning, planning, and experimentation in complex coding and research-reproduction tasks.
Abstract
This paper introduces KLong, an open-source LLM agent trained to solve extremely long-horizon tasks. The principle is to first cold-start the model via trajectory-splitting SFT, then scale it via progressive RL training. Specifically, we first activate basic agentic abilities of a base model with a comprehensive SFT recipe. Then, we introduce Research-Factory, an automated pipeline that generates high-quality training data by collecting research papers and constructing evaluation rubrics. Using this pipeline, we build thousands of long-horizon trajectories distilled from Claude 4.5 Sonnet (Thinking). To train with these extremely long trajectories, we propose a new trajectory-splitting SFT, which preserves early context, progressively truncates later context, and maintains overlap between sub-trajectories. In addition, to further improve long-horizon task-solving capability, we propose a novel progressive RL, which schedules training into multiple stages with progressively extended timeouts. Experiments demonstrate the superiority and generalization of KLong, as shown in Figure 1. Notably, our proposed KLong (106B) surpasses Kimi K2 Thinking (1T) by 11.28% on PaperBench, and the performance improvement generalizes to other coding benchmarks like SWE-bench Verified and MLE-bench.
