Coding Agent Memory Post-Training II: Unlocking the Memory Potential of Pre-trained File Operations for Long-Horizon Tasks via On-Policy Distillation
Lirui LuoKelong Mao…Cong Fang
On-policy distillation (OPD) for agent memory is weakened when the memory interface lies outside both models' pre-training: the teacher cannot guide an unfamiliar interface, and the student samples too few meaningful memory actions. The authors introduce CAMG-II, long-horizon agentic-RL environments (Shop, Coding, AutoResearch, General, Visual) that pair each native task interface with ordinary Bash access and an episode-persistent workspace, letting the policy create, revise, search, and reuse files as memory across context replacements. CAMP-II then trains a single policy jointly across all five environments with fully asynchronous OPD from a frozen teacher that already has a prior for file operations. On CAMG-II it achieves 2.97 times the gain of the strongest OPD baseline, and the learned memory behavior generalizes to Terminal-Bench 2.1 and SWE-Bench Pro V2 with improved success rates.

arXiv ·
· November 10, 2026