Coding Agent Memory Post-training: Unlocking the Memory Potential of Pre-trained File Operations for Long-Horizon Tasks via Reinforcement Learning
Lirui Luo, Kelong Mao, Heming Xia, Rongqing Li, Xinwei Yang, Luyu Chen, Kieran Wong, Yudong Guo,
Key points
From the paper's conclusion- Coding Agent Memory Gym (CAMG) was introduced, a suite of long-horizon agentic-RL environments spanning Shop, Coding, DeepResearch, and AutoResearch, providing executable shell access and an episode-persistent workspace for agents to create, revise, search, and reuse files as memory.
- CAMG-RL, which trains a single policy jointly across all four environments with fully asynchronous PPO, learning file-based memory behavior directly from downstream task reward, was introduced.
- CAMG-RL-4B and CAMG-RL-9B are competitive with Qwen3.5-35B-A3B and Qwen3.5-122B-A10B, respectively, on SWE-bench Verified and MLE-bench Lite.
Abstract
Language-model agents increasingly tackle long-horizon tasks whose interaction histories exceed the model's active context. Recent work has begun to use reinforcement learning to make memory control part of the policy, often relying on predefined memory tools within domain-specific training environments of relatively short horizons. This setup ties learned memory behavior to environment-specific interfaces that lie outside the base model's pre-training and must be learned from scratch, so even after post-training, agents struggle to use memory in long-horizon tasks. To address these limitations, we introduce Coding Agent Memory Gym (CAMG), a suite of long-horizon agentic-RL environments spanning Shop, Coding, DeepResearch, and AutoResearch. Alongside each environment's native task interface, CAMG provides executable shell access and an episode-persistent workspace, enabling agents to create, revise, search, and reuse files as memory throughout an episode. We also introduce CAMG-RL, which trains a single policy jointly across all four environments with fully asynchronous PPO, learning this file-based memory behavior directly from downstream task reward, and we train CAMG-RL-4B and CAMG-RL-9B from Qwen3.5 models of matching size. On SWE-bench Verified and MLE-bench Lite, CAMG-RL-4B and CAMG-RL-9B are competitive with Qwen3.5-35B-A3B and Qwen3.5-122B-A10B, respectively.
Read the paper
Discussion · 1
Science Skim's AI key points, plus readers' public thoughts
- Coding Agent Memory Gym (CAMG) was introduced, a suite of long-horizon agentic-RL environments spanning Shop, Coding, DeepResearch, and AutoResearch, providing executable shell access and an episode-persistent workspace for agents to create, revise, search, and reuse files as memory.
- CAMG-RL, which trains a single policy jointly across all four environments with fully asynchronous PPO, learning file-based memory behavior directly from downstream task reward, was introduced.
- CAMG-RL-4B and CAMG-RL-9B are competitive with Qwen3.5-35B-A3B and Qwen3.5-122B-A10B, respectively, on SWE-bench Verified and MLE-bench Lite.
Readers' thoughts
No reader thoughts yet.
Related papers
- Coding Agent Memory Post-Training II: Unlocking the Memory Potential of Pre-trained File Operations for Long-Horizon Tasks via On-Policy DistillationarXiv · 2026
- How Much Should an Agent Remember? Deployment Lessons from Self-Distilled Memory for LLM AgentsarXiv · 2026
- All-in-One Memory: Process-Rewarded Reinforcement Learning for Memory AgentsarXiv · 2026
- CONTRAMEM: Learning Self-Evolving Procedural Memory from Contrasting Multi-Model TrajectoriesarXiv · 2026
- FlexA-Mem: Budget-Adaptive Agentic Memory for LLM AgentsarXiv · 2026
- MetaDecomp: Adaptive Task Decomposition via Meta-Learned Procedural MemoryarXiv · 2026