Manuscript Offprint

arXiv:2609.08404

Environments as Scaffold: Enriching Feedback to Bootstrap Self-Evolving Agents in Long-Horizon Tasks

Hongbang Yuan, Zhuoran Jin, Yixin Cao

Abstract

Large Language Models demonstrate remarkable proficiency in static reasoning, yet training them as autonomous agents through Reinforcement Learning (RL) for long-horizon tasks is often hindered by severe reward sparsity. While conventional agent-side warming up via supervised fine-tuning (SFT) can alleviate this, it is frequently limited by data scarcity and constrained exploration. To address this, we propose a paradigm shift to environment-side adaptation by constructing Feedback-Enriched Environments (FEEs). Through a pilot study, we establish a feedback design strategy that reformulates environments by transitioning from action guidance to observation enrichment during the later stages of both intra-episode exploration and inter-episode evolution. Large-scale experiments on SciWorld and BFCL benchmarks using various Qwen3 model scales and RL algorithms such as GRPO, GSPO, and DAPO demonstrate that FEEs consistently yield performance improvements over standard settings. Furthermore, our analysis reveals that training with FEEs (1) stabilizes training dynamics by reducing entropy volatility, (2) facilitates proactive state-space exploration in difficult tasks, (3) ensures the internalization of environmental guidance into policy weights rather than acting as a mere inference-time prior, and (4) identifies intra-group feedback consistency as a critical boundary for stable optimization.

Correspondence: hbyuan25@m.fudan.edu.cn, yxcao@fudan.edu.cn Code: https://github.com/HongbangYuan/EnvAsScaffold

1 Introduction

Large Language Models (LLMs) [DeepSeek-AI et al., 2025, Dubey et al., 2024, OpenAI, 2023, Yang et al., 2025a] have demonstrated remarkable proficiency in domains such as mathematical reasoning [Du et al., 2025, Glazer et al., 2024] and code generation [Jimenez et al., 2024, Yang et al., 2024]. As the field advances, the research focus is shifting from solving these static, single-turn tasks to building autonomous agents capable of exploring dynamic, complex real-world environments, such as web navigation [Bai et al., 2026, Zhou et al., 2024a] and terminal-based computer usage [Gandhi et al., 2026, Merrill et al., 2026a]. These tasks are inherently long-horizon [Zhang et al., 2025b,e], often necessitating sequences of dozens of interaction steps to achieve a solution. To solve them, reinforcement learning (RL) based approaches [Chen et al., 2025b, Feng et al., 2025a, Wang et al., 2025a] have emerged as a central direction, where agents learn to adapt their policies through iterative feedback from the environments.

However, RL on long-horizon tasks suffers greatly from reward sparsity. Specifically, the agent lacks the

† Corresponding author.

Figure

Figure 1 Illustration of the Feedback-Enriched Environments (FEEs).

capability for effective exploration and is prone to getting trapped in zero-reward trajectories, leading to vanishing gradients that leave the agent with no signal to learn from. While warming up the agent via supervised fine-tuning (SFT) on expert trajectories effectively increases the probability of obtaining initial positive rewards [Liu et al., 2025b, Wen et al., 2025], it faces significant bottlenecks. Not only is the collection of ground-truth trajectories expensive and hard to scale [Chen et al., 2025a], but over-optimizing the SFT objective also risks overly constraining the agent's behavior, thereby restricting the exploration potential necessary for effective RL [Kang et al., 2025].

To address this, we propose a paradigm shift from agent-side warming up to environment-side adaptation. Specifically, instead of seeking a better-initialized agent, we propose to construct more suitable environments during RL by systematically diversifying and enriching their feedback signals. As shown in Figure 1, while standard feedback leaves the agent searching blindly, enriched feedback guides it to enter the lab and retrieve the metal spoon, which boosts the success rate and helps the agent better understand the environment.

In particular, we study two key dimensions of environment feedback design: what information to provide and when to deliver it to the agent. For the former, we consider action guidance for suggesting immediate next steps and observation enrichment for providing supplementary state information. For the latter, we analyze when these signals are presented across two temporal scales: intra-episode exploration within a single trajectory and inter-episode evolution throughout the training lifecycle. Our initial study suggests that the most effective enriching strategy is to deliver action guidance during early interaction steps and training phases, and then transition to observation enrichment in the later stages of both processes.

To systematically validate this strategy, we build Feedback-Enriched Environments (FEEs) based on standard environments from two widely adopted benchmarks: SciWorld [Wang et al., 2022] and BFCL [Patil et al., 2025]. Within these FEEs, we train Qwen3-4B and Qwen3-8B models with various agent-side RL algorithms, including GRPO [Shao et al., 2024], DAPO [Yu et al., 2025], and GSPO [Zheng et al., 2025]. Extensive empirical results demonstrate that training in FEEs consistently outperforms training in standard environments, yielding an average improvement of 2.82% across various model scales and RL algorithms.

Additionally, to gain insights beyond performance scores, we further analyze the impacts of training agents with our proposed feedback-enriched environments. (1) How do FEEs contribute to agent-side RL training stability? Through an analysis of policy entropy dynamics, we find that FEEs act as a stabilizer that reduces gradient volatility and ensures smoother convergence, a benefit that persists even under explicit entropy regularization. (2) Do FEEs promote more effective state-space exploration? By analyzing average success rates during training and accuracy across environments of varying difficulty levels, we find that FEEs enable agents to access previously unreachable states while retaining robust exploration capabilities in standard environments. (3) Is the environmental feedback internalized into the agent's policy weights? Our analysis shows that feedback is internalized into the policy weights rather than acting as a mere inference-time prior. (4)

Should environmental feedback remain consistent or diverse within sampling groups? We investigate the boundary of feedback diversification and find that intra-group consistency is crucial for stable optimization, as excessive stochasticity within a single rollout group introduces harmful noise.

Our contributions can be summarized as follows:

  • We propose a paradigm shift from agent-side training to environment-side adaptation. We develop a systematic feedback design strategy that optimizes what information to provide (action guidance vs. observation enrichment) and when to provide it (intra-episode vs. inter-episode) to facilitate more effective RL training in long-horizon tasks.

  • Based on our strategy, we construct FEEs using the SciWorld and BFCL benchmarks. Extensive experiments across various model scales (Qwen3-4B/8B) and RL algorithms (GRPO, DAPO, GSPO) demonstrate that FEEs consistently improve performance comparing with the standard environments.

  • We provide an in-depth analysis of the impacts of training with FEEs. Our findings reveal that these environments promote proactive state-space exploration in difficult tasks, stabilize training dynamics through entropy reduction, ensure the internalization of external guidance into policy weights, and identify intra-group feedback consistency as a critical factor for stable optimization.

References (73)