ECOS: Environment-Calibrated On-Policy Self-Distillation for Language Agents

Chenhao Zhang and colleagues at CUHK-Shenzhen and Zhejiang University propose ECOS, which weights on-policy self-distillation for language agents by environment outcomes so that errors in self-written skills do not keep returning through training.
Ask this paper
Problem. In on-policy self-distillation the teacher copy reads skills the agent wrote from its own trajectories. Its guidance is weighted by how much those skills shift token probabilities, so wrong skills are reinforced.
Method. Command-level advantages, estimated by comparing commands taken at similar observations, scale each teacher preference and reward the skills whose preferences favor better commands.
Results. With no skills at inference, 3B and 7B agents reach 90.5% and 93.3% macro success on seen ALFWorld tasks and 75.5% and 80.5% on WebShop, and beat GRPO on unseen ALFWorld tasks by 11.0 and 7.6 points.
Ablation. Supervising only executable commands raised 3B WebShop success from 52.3% to 75.0% compared with supervising the full response.
Abstract
On-policy self-distillation lets a language agent act as its own Teacher by conditioning on privileged context such as skills written from its own trajectories. Its guidance, however, is weighted by how much this context shifts token likelihoods rather than by whether it improves behavior, so errors in self-written skills return through later updates. We propose environment-calibrated on-policy self-distillation, which uses environmental outcomes to decide how much to trust the Teacher's current guidance and which self-written skills to reinforce. Command-level advantages, estimated by comparing commands executed at similar observations, scale each Teacher preference and reward reflections and skills whose induced preferences favor higher-advantage commands. Without skills at inference, 3B and 7B agents reach 90.5% and 93.3% macro success on seen ALFWorld tasks and 75.5% and 80.5% success on WebShop. On unseen ALFWorld tasks, they outperform GRPO under the same protocol by 11.0 and 7.6 percentage points, respectively. In an ablation study, supervising only executable commands rather than the Actor's full response raises 3B WebShop success from 52.3% to 75.0%.