Beyond Quantity: Trajectory Diversity Scaling for Code Agents

Guhong Chen, Chenghao Sun, Cheng Fu, Qiyao Wang, Zhihong Huang +14 more
2/3/2026
cs.AI

No confident code implementation found for this paper.

Abstract

As code large language models (LLMs) evolve into tool-interactive agents via the Model Context Protocol (MCP), their generalization is increasingly limited by low-quality synthetic data and the diminishing returns of quantity scaling. Moreover, quantity-centric scaling exhibits an early bottleneck that underutilizes trajectory data.

Show full abstract

We propose TDScaling, a Trajectory Diversity Scaling-based data synthesis framework for code agents that scales performance through diversity rather than raw volume. Under a fixed training budget, increasing trajectory diversity yields larger gains than adding more trajectories, improving the performance-cost trade-off for agent training. TDScaling integrates four innovations: (1) a Business Cluster mechanism that captures real-service logical dependencies; (2) a blueprint-driven multi-agent paradigm that enforces trajectory coherence; (3) an adaptive evolution mechanism that steers synthesis toward long-tail scenarios using Domain Entropy, Reasoning Mode Entropy, and Cumulative Action Complexity to prevent mode collapse; and (4) a sandboxed code tool that mitigates catastrophic forgetting of intrinsic coding capabilities. Experiments on general tool-use benchmarks (BFCL, tau^2-Bench) and code agent tasks (RebenchT, CodeCI, BIRD) demonstrate a win-win outcome: TDScaling improves both tool-use generalization and inherent coding proficiency. We plan to release the full codebase and the synthesized dataset (including 30,000+ tool clusters) upon publication.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{chen2026beyond,
  title  = {Beyond Quantity: Trajectory Diversity Scaling for Code Agents},
  author = {Guhong Chen and Chenghao Sun and Cheng Fu and Qiyao Wang and Zhihong Huang and Chaopeng Wei and Guangxu Chen and Feiteng Fang and Ahmadreza Argha and Bing Zhao and Xander Xu and Qi Han and Hamid Alinejad-Rokny and Qiang Qu and Binhua Li and Shiwen Ni and Min Yang and Hu Wei and Yongbin Li},
  year   = {2026},
  eprint = {2602.03219},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.03219v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2602.03219.svg)](https://codeofpaper.com/paper/2602.03219)

Discussion