From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence

Jian Yang, Xianglong Liu, Weifeng Lv, Ken Deng, Shawn Guo, Lin Jing, Yizhi Li, Shark Liu, Xianzhen Luo, Yuyu Luo, Changzai Pan, Ensheng Shi, Yingshui Tan, Renshuai Tao, Jiajun Wu, Xianjie Wu, Zhenhe Wu, Daoguang Zan, Chenchen Zhang, Wei Zhang, He Zhu, Terry Yue Zhuo, Kerui Cao, Xianfu Cheng, Jun Dong, Shengjie Fang, Zhiwei Fei, Xiangyuan Guan, Qipeng Guo, Zhiguang Han, Joseph James, Tianqi Luo, Renyuan Li, Yuhang Li, Yiming Liang, Congnan Liu, Jiaheng Liu, Qian Liu, Ruitong Liu, Tyler Loakman, Xiangxin Meng, Chuang Peng, Tianhao Peng, Jiajun Shi, Mingjie Tang, Boyang Wang, Haowen Wang, Yunli Wang, Fanglin Xu, Zihan Xu, Fei Yuan, Ge Zhang, Jiayi Zhang, Xinhao Zhang, Wangchunshu Zhou, Hualei Zhu, King Zhu, Bryan Dai, Aishan Liu, Zhoujun Li, Chenghua Lin, Tianyu Liu, Chao Peng, Kai Shen, Libo Qin, Shuangyong Song, Zizheng Zhan, Jiajun Zhang, Jie Zhang, Zhaoxiang Zhang, Bo ZhengarXiv 2025 · DOI

Introduction

The landscape of software development is undergoing a seismic shift. We have moved from the "Human-Driven Coding Era"—characterized by manual coding and tool-assisted development—into the "Code Intelligent Era." This new epoch is defined by AI-assisted and AI-driven workflows, aiming toward a future of autonomous software engineering. Large Language Models for code (Code LLMs) are no longer just autocomplete tools; they are evolving into sophisticated agents capable of complex reasoning and multi-step debugging.

The evolution of coding eras, transitioning from human-driven manual efforts to an AI-autonomous future.

Despite the rapid ascent of tools like GitHub Copilot and Cursor, a significant gap remains between academic benchmarks and real-world deployment. This survey synthesizes the vast body of research into a unified framework, covering the entire lifecycle from data curation to agentic deployment, while providing practical "recipes" for training state-of-the-art models.

The Evolution of Code Intelligence

The proliferation of Code LLMs has been explosive. Starting around 2021 with models like CodeBert and Codex, the field has branched into various specializations, including embedding models, LLM coders, and Software Engineering (SWE) agents.

A comprehensive timeline and landscape of Code LLMs and tools from 2021 to 2025, highlighting the shift toward agentic systems.

As shown in the timeline, the industry has moved from simple function-level generation to integrated IDE plugins and terminal-based agents. Modern systems like Claude Code and Devin represent the cutting edge, where models act as autonomous agents rather than just passive assistants.

Training Paradigms and Practical Recipes

A core contribution of this work is the bridge it builds between theory and engineering. Training a high-performance Code LLM requires navigating complex trade-offs in scaling and optimization.

Scaling Laws and Language Dynamics

Empirical evidence suggests that scaling laws are highly language-dependent. Interpreted languages like Python and JavaScript show aggressive performance gains as model size and data volume increase. In contrast, statically-typed languages like Rust or Go, which pack more semantic information per token, tend to saturate faster. This implies that training budgets should be allocated proportionally based on the target language's information density.

Supervised Fine-Tuning (SFT) and RLVR

While SFT remains a staple, Reinforcement Learning with Verifiable Rewards (RLVR) is the new frontier. Unlike traditional RLHF, which relies on subjective human preferences, RLVR leverages the deterministic nature of code. By using compilers and test suites as reward signals, models can learn through trial and error, significantly improving their reasoning capabilities.

For engineering teams, the choice of framework is critical. Experiments show that for mid-sized models (e.g., 14B parameters), frameworks like Megatron (via MS-Swift) and DeepSpeed ZeRO-3 offer superior stability and convergence speeds compared to standard FSDP implementations.

Key Insights for the Next Generation

  1. Security by Design: Code LLMs are "insecure by default" because they learn from vast repositories of legacy code containing vulnerabilities. Safety must be integrated during the pre-training phase through rigorous data filtering.
  2. MoE Efficiency: Mixture-of-Experts (MoE) architectures provide high inference efficiency but require delicate hyperparameter tuning during SFT to avoid training instability.
  3. RL Optimization: When performing RL rollouts, generating approximately 16 samples per prompt provides the best balance of performance and compute. Shorter context windows during training can actually encourage models to find more compact and efficient solutions.

Future Directions

The next frontier for code intelligence lies in repository-level reasoning. Current models excel at local logic but often struggle with cross-file dependencies and long-horizon planning. Future systems must move toward "full-lifecycle orchestration," where agents manage everything from initial requirements and architectural planning to testing and deployment, maintaining a dynamic understanding of the entire codebase.

Summary updated

BibTeX
@misc{yang2025from,
  author = {Jian Yang and Xianglong Liu and Weifeng Lv and Ken Deng and Shawn Guo and Lin Jing and Yizhi Li and Shark Liu and Xianzhen Luo and Yuyu Luo and Changzai Pan and Ensheng Shi and Yingshui Tan and Renshuai Tao and Jiajun Wu and Xianjie Wu and Zhenhe Wu and Daoguang Zan and Chenchen Zhang and Wei Zhang and He Zhu and Terry Yue Zhuo and Kerui Cao and Xianfu Cheng and Jun Dong and Shengjie Fang and Zhiwei Fei and Xiangyuan Guan and Qipeng Guo and Zhiguang Han and Joseph James and Tianqi Luo and Renyuan Li and Yuhang Li and Yiming Liang and Congnan Liu and Jiaheng Liu and Qian Liu and Ruitong Liu and Tyler Loakman and Xiangxin Meng and Chuang Peng and Tianhao Peng and Jiajun Shi and Mingjie Tang and Boyang Wang and Haowen Wang and Yunli Wang and Fanglin Xu and Zihan Xu and Fei Yuan and Ge Zhang and Jiayi Zhang and Xinhao Zhang and Wangchunshu Zhou and Hualei Zhu and King Zhu and Bryan Dai and Aishan Liu and Zhoujun Li and Chenghua Lin and Tianyu Liu and Chao Peng and Kai Shen and Libo Qin and Shuangyong Song and Zizheng Zhan and Jiajun Zhang and Jie Zhang and Zhaoxiang Zhang and Bo Zheng},
  title = {{From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence}},
  year = {2025},
  eprint = {2511.18538},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.18538},
}
Figure