Abstract
Successful trajectories on difficult tasks provide valuable supervision for model improvement, but specialized harnesses introduce interventions that may be unavailable during deployment. We propose Recursive Self-Rewrite (RSR), a framework that uses one base model, Qwen-3.8-27B, to discover successful solutions under diverse harnesses and reconstruct them as training trajectories under a general harness. A planner extracts procedures into runbooks, a critic screens for verifier and solution leakage and guides recursive revision, and an executor follows qualified runbooks in fresh sandboxes. Across approximately 3K self-curated terminal tasks, three harnesses jointly solve 759 tasks, 34.3% more than the strongest individual harness in the recorded pool. RSR expands 2,001 successful source trajectories into 11,094 rewritten trajectories for supervised finetuning. Training on these trajectories outperforms both the base model and direct trajectory SFT. Compared with the base model, pass@3 increases from 57.0% to 74.2% on Terminal-Bench 2, from 1.5% to 9.1% on Terminal-Bench 4, from 39.0% to 63.0% on our self-curated Terminal-Bench Hard, and from 3.0% to 6.0% on our Software Terminal-Bench. Process reward on Long-Horizon Terminal-Bench rises from 0.21 to 0.29. These results show how diverse harness-assisted experiences can be reconstructed into reusable capabilities for a model operating under a general harness.
Keywords
Subject
Publication details
- Journal
- Not available
- Open access
- Green open access
Cite this article
APA 7
Li, Z., Shi, Y., Li, Z., Yang, J., Wang, R., Huang, C., Liu, F., Mi, H., Boyd-Graber, J., & LeoweiLiang (2026). Scaling Trajectories for Complex Tasks through Recursive Self-Rewrite. https://omanscience.com/en/articles/scaling-trajectories-for-complex-tasks-through-recursive-self-rewrite
MLA 9
Li, Zongxia, et al. "Scaling Trajectories for Complex Tasks through Recursive Self-Rewrite." https://omanscience.com/en/articles/scaling-trajectories-for-complex-tasks-through-recursive-self-rewrite.
Chicago (author–date)
Li, Zongxia, Yucheng Shi, Zhongzhi Li, Junyao Yang, Ruhan Wang, Chengsong Huang, Fuxiao Liu, Haitao Mi, Jordan Boyd-Graber, and LeoweiLiang. 2026. "Scaling Trajectories for Complex Tasks through Recursive Self-Rewrite." https://omanscience.com/en/articles/scaling-trajectories-for-complex-tasks-through-recursive-self-rewrite.
Harvard
Li, Z., Shi, Y., Li, Z., Yang, J., Wang, R., Huang, C., Liu, F., Mi, H., Boyd-Graber, J. and LeoweiLiang (2026) 'Scaling Trajectories for Complex Tasks through Recursive Self-Rewrite', Available at: https://omanscience.com/en/articles/scaling-trajectories-for-complex-tasks-through-recursive-self-rewrite.
Vancouver
Li Z, Shi Y, Li Z, Yang J, Wang R, Huang C, et al. Scaling Trajectories for Complex Tasks through Recursive Self-Rewrite. https://omanscience.com/en/articles/scaling-trajectories-for-complex-tasks-through-recursive-self-rewrite
IEEE
Z. Li, Y. Shi, Z. Li, J. Yang, R. Wang, C. Huang, F. Liu, H. Mi, J. Boyd-Graber, and LeoweiLiang, "Scaling Trajectories for Complex Tasks through Recursive Self-Rewrite," https://omanscience.com/en/articles/scaling-trajectories-for-complex-tasks-through-recursive-self-rewrite.