WorksComputer Science
The Cost of Failure: Quantifying the Downstream Impact of Error Histories in LLM Agents
Abstract
When an action fails, an LLM agent retains the action text and its feedback in the context used for subsequent decisions. We study the downstream impact of this retained content as the Cost of Failure. We define Error Token Density (ETD) as the fraction of an interaction history occupied by execution-failure content. On natural ALFWorld rollouts from Qwen3-8B, success is 40.1% at zero ETD and 6.7% when ETD is at least 40%. Controlled continuations separate this association from the effect of retained failure content: with environment state and remaining action budget fixed, inserting failure turns lowers success by 1.9-3.8 percentage points more than token-matched neutral insertions. Deleting existing failure turns yields complementary gains. Failure-conditioned evaluations across planning, code execution, and visual tool use establish the broader relevance of the problem. These findings motivate training agents to reduce the introduction of execution failures. We test this principle with Tool-Feedback Advantage Shaping (TFAS), which combines separately normalized task-success and trajectory-level execution-validity advantages. Across all six model-environment settings, TFAS improves overall accuracy and achieves the lowest ETD among the compared policies, reducing ETD by 26.5-67.7% relative to outcome-only RL. These measurements connect the intervention to lower failure-context density.
Introduction
LLM agents solve interactive tasks by alternating between actions and environmental feedback [23, 29, 42]. When an action fails, the feedback can reveal a missing prerequisite or an unavailable operation and help the agent revise its plan. Self-correction methods such as Reflexion [28] and Self-Refine [17] exploit this information. The same interaction also becomes part of the prompt for subsequent decisions. An execution failure therefore has a continuing textual footprint even when it leaves the environment unchanged.
This persistence raises a question about agent reliability: how does retaining failed interactions affect what an agent does next? Long-context studies show that available context is not always used reliably [12], and irrelevant content can distract language models [27]. Repeated invalid calls and error feedback can accumulate alongside the task goal and useful observations. We call the downstream performance cost of retaining this content the Cost of Failure. Understanding it requires separating the presence of errors from the effect of their textual history: difficult tasks may both elicit more errors and have lower success rates.
We study that distinction through complementary analyses. We define Error Token Density (ETD) as the fraction of a trajectory history occupied by failed actions and their associated feedback. On natural ALFWorld rollouts from Qwen3-8B [40], success is 40.1% at zero ETD and 6.7% when ETD is at least 0.4. To test the effect of the history itself, we then resume matched prefixes from the same environment state and remaining action budget. Inserting invalid-action/error-feedback turns reduces success by 1.9–3.8 percentage points more than inserting token-matched neutral turns. Removing existing failure turns also improves continuation success. These interventions identify a cost of retained failure content in the studied ALFWorld setting, beyond the cost of simply extending the context. Failure-conditioned evaluations in ReTool, OpenThinkImg, and ALFWorld show that errors accompany lower success across text and vision-language agents, including advanced closed-source models. The cross-domain comparison establishes the prevalence of the association; the matched interventions isolate a causal effect within ALFWorld.
The analysis suggests a training principle: reduce avoidable execution failures before their feedback becomes part of future context. Final task reward alone leaves trajectories with the same outcome indistinguishable even when their execution histories differ. We test whether adding this distinction helps by using Tool-Feedback Advantage Shaping (TFAS). TFAS computes the fraction of executable tool calls in a completed trajectory, normalizes this signal separately from task success, and mixes the two advantages for policy optimization. Its optimization form follows the general idea of reward-decoupled normalization [13]; the choice of execution validity is motivated by the failure-context analysis. The resulting preference is between trajectories. All response tokens within a trajectory share the same mixed advantage, so the method does not assign separate credit to individual successful and failed actions. The training results show that this intervention improves overall accuracy across six settings spanning ReTool and ALFWorld with Qwen3-4B/8B, and OpenThinkImg with Qwen3-VL-4B/8B. Relative to outcome-only RL, Qwen3-8B improves from 55.1% to 58.4% on ReTool and from 31.2% to 41.2% on ALFWorld. The reported Err Proportion is also lower than under outcome-only RL in all six settings. These results establish the value of the training signal for task completion. In addition, TFAS has the lowest ETD among all four policies in every setting. Relative to outcome-only RL, ETD falls by 26.5–67.7%; on ALFWorld with Qwen3-8B, it decreases from 8.7% to 2.8%. Reward-level tool-validity shaping increases ETD in both ReTool settings and ALFWorld-4B, showing that the same auxiliary signal does not uniformly reduce failure-context density when added at the reward level. These results connect the training intervention to the context property identified by the analysis.

Figure 1. Overview of the Cost of Failure and TFAS. Failed actions and their feedback persist in the context for later decisions. ETD measures this content, while controlled interventions test its downstream effects. TFAS combines task-success and trajectory-level execution-validity advantages to favor trajectories with fewer execution failures.
Overall, our contributions are:
We characterize retained execution failures with ETD and cross-domain failure-conditioned evaluations, distinguishing failure exposure from success after errors.
We use matched context insertions and deletions to identify a downstream cost of retained failure content in ALFWorld, including an insertion comparison that controls for added token count.
We train agents to reduce execution failures with TFAS, a trajectory-level execution-validity signal. TFAS improves overall accuracy and yields the lowest measured ETD in all six evaluated settings.
Related Work
Agent failures and correction. ReAct [42] and Toolformer [23] establish reasoning–action and tool-use paradigms, and interactive benchmarks such as ALFWorld [29], WebShop [41], WebArena [46], VisualWebArena [8], and AgentGym [37] expose the demands of multi-step decision making. Reflexion [28] and Self-Refine [17] use feedback to revise behavior, while AgentBoard [15] and AgentErrorBench/AgentDebug [47] analyze partial progress and failure modes. STeCa [33] and Agent-R [44] train agents to correct deviations through step-level calibration and revision trajectories. These works study how to recognize and correct errors; we study the effect of retaining failure content in the autoregressive history.
Context use and retained errors. Long context is not always used effectively [12], and irrelevant content can distract language models [27]. Failed actions and their feedback add such context during interactive execution, persisting alongside useful observations and task progress as evidence for later decisions. ETD measures this accumulated failure content, and matched interventions test its effect with environment state and action budget fixed. The evidence concerns behavioral sensitivity to history and leaves the attention-level mechanism unidentified.
Training signals for tool-using agents. PPO-style optimization [24, 25], outcome rewards, and preference learning [21] support agent training in tool use, web interaction, and multi-environment settings [4, 6, 14, 22, 38]. RA-GEN [35] analyzes multi-turn training instability, rollback systems revise failed histories at inference time [9, 10, 16], and reward shaping [39] and process supervision [11] offer additional signals. TFAS uses execution validity already returned by tools or environments, aggregated at the trajectory level. Its optimization form is closely related to GDPO [13], which normalizes each reward within a prompt group before aggregation; we use this construction to test a signal selected from the failure-context analysis. OTC-PO [32] modulates task reward with a call-count-based reward to improve tool-call efficiency, whereas execution validity measures whether an invoked operation can be executed.
Analysis
A failed action leaves its text and error feedback in the history that conditions every later decision. This section asks whether that retained content itself lowers subsequent performance. Observational statistics alone cannot answer this question, because harder tasks both elicit more errors and succeed less often. We address it with natural-rollout statistics, matched context interventions, and cross-domain failure-conditioned evaluations.
Failure Histories as Autoregressive Context
Before action , an agent has a textual interaction history
where is the latest observation. The policy generates the action token by token,
An invalid call may leave the environment state unchanged while extending with the attempted action and its error feedback. Subsequent actions are thus conditioned on a different history even though the physical or tool state is the same. This difference makes it possible to isolate the effect of retained failure content.
Measuring Failure Exposure with ETD
We label observable execution failures: malformed calls, exceptions, and rejected environment actions. For a completed trajectory, let denote the tokens in these failed actions and their associated error feedback. Error Token Density is
Note. Prop. is computed over trajectories with at least one tool invocation; trajectories where the model does not call a tool are included in Overall SR but excluded from the error-conditioned proportion split.
where counts all tokens in the accumulated interaction history. ETD measures the share of context occupied by execution failures, incorporating the amount of text returned by those failures as well as their frequency.
We compute final ETD on natural Qwen3-8B [40] rollouts in ALFWorld. Figure 2 shows a large difference between trajectories with no error tokens and those containing them. Success is 40.1% at zero ETD, ranges from 11.7% to 16.7% for nonzero ETD below 0.4, and falls to 6.7% when ETD is at least 0.4. This is an association in completed rollouts: task difficulty, early completion, and repeated failed attempts can affect both final ETD and success. We next intervene on the history to isolate an effect of retained content.

Figure 2. Task success rate across final-ETD buckets for Qwen3-8B on natural ALFWorld rollouts. Higher Error Token Density corresponds to a larger fraction of the accumulated context being occupied by invalid actions and error feedback, and is associated with lower task success.
Controlled Failure-Context Interventions
At normalized trajectory anchors , we branch from the same unfinished prefix and environment state with the same remaining action budget. Error insertion adds state-preserving invalid-action/error-feedback turns. Neutral insertion adds the same number of turns, with token counts matched to the corresponding error content. Failure deletion removes the most recent complete failure turns from an eligible error-containing prefix. Each branch is compared with continuation from its unmodified history.
Table 1 shows that inserting one failure turn lowers success by 4.3–4.7 percentage points; three turns lower it by 8.2–8.8 points. Neutral insertions also reduce success, showing that added context has a cost. Across matched insertion settings, the error content causes an additional reduction of 1.9–3.8 points. Because the environment state, future action budget, turn count, and added token count are controlled, this comparison identifies an effect of the inserted failure content beyond context growth in this setting.
| Intervention | |||
| Error insertion () | 1 | ||
| Error insertion () | 2 | ||
| Error insertion () | 3 | ||
| Neutral insertion () | 1 | ||
| Neutral insertion () | 2 | ||
| Neutral insertion () | 3 | ||
| Failure deletion () | 1 | ||
| Failure deletion () | 2 | ||
| Failure deletion () | 3 | – | – |
Table 1. Controlled failure-context interventions on ALF-World. Values are changes in success rate (percentage points). Each insertion or deletion is compared with a matched trajectory with an unmodified history.
Deleting one existing failure turn improves success by 2.0–2.5 points, and deleting two improves it by 13.6–20.0 points. Deletion removes both content and tokens, so its gains combine these effects, and the and gains are measured on different sets of eligible prefixes. Together, insertion and deletion show that keeping failure history can impede later decisions, and that changing this history can alter task completion without changing the environment state at the branching point. Appendix § 12.§ 2 reports repeated interventions.
Failure-Conditioned Performance Across Domains
We broaden the observational analysis to ReTool [6] for code-interpreter-assisted mathematics, OpenThinkImg [30] for visual tool reasoning, and ALFWorld [29] for embodied planning. We divide evaluated tool-using trajectories according to whether they contain at least one execution error. The evaluated models include GPT-5/5.1 [19, 20], Claude-
Sonnet-4 [1], Gemini-3-Flash [7], Doubao-Seed-1.6 [3], DeepSeek-V3.2 [5], Qwen3 [40], and Qwen3-VL [2].
Table 2 reports lower success for error-containing trajectories in all listed settings. For example, GPT-5 on ReTool falls from 90.9% on error-free trajectories to 61.5% on trajectories with errors. In ALFWorld, the corresponding values are 40.1% and 8.2% for Qwen3-8B, and 80.5% and 33.3% for GPT-5.1. OpenThinkImg illustrates why error frequency and error-conditioned performance should be kept separate: Qwen3-VL-8B-Instruct has errors in only 1.4% of evaluated tool-using trajectories, yet those trajectories succeed at 16.2%, compared with 73.8% for the error-free subset. These comparisons show that the failure-conditioned gap extends across domains and model families. They are observational and complement the controlled interventions, which establish that retained history itself can affect continuation.
| Environment | Model | Overall SR (%) | With Error SR (%) | With Error Prop. (%) | Without Error SR (%) | Without Error Prop. (%) | Gap SR (%) |
| ReTool | GPT-5 [19] | 65.5 | 61.5 | 19.1 | 90.9 | 80.9 | 29.4 |
| Claude-Sonnet-4 [1] | 52.1 | 40.2 | 46.7 | 62.5 | 53.3 | 22.3 | |
| Gemini-3-Flash [7] | 46.7 | 28.5 | 23.3 | 56.2 | 76.7 | 27.7 | |
| DeepSeek-V3.2 [5] | 76.5 | 50.0 | 1.2 | 91.6 | 98.8 | 41.6 | |
| Qwen3-8B [40] | 51.3 | 49.3 | 30.0 | 68.3 | 70.0 | 19.0 | |
| OpenThinkImg | GPT-5 [19] | 48.9 | 19.8 | 16.0 | 71.4 | 84.0 | 51.6 |
| Claude-Sonnet-4 [1] | 79.9 | 39.5 | 25.2 | 60.5 | 74.8 | 21.0 | |
| Gemini-3-Flash [7] | 82.7 | 38.9 | 28.1 | 61.1 | 71.9 | 22.2 | |
| Doubao-Seed-1.6 [3] | 73.1 | 10.0 | 2.3 | 75.7 | 97.7 | 65.7 | |
| Qwen3-VL-8B-Instruct [2] | 48.8 | 16.2 | 1.4 | 73.8 | 98.6 | 57.6 | |
| ALFWorld | GPT-5.1 [20] | 76.4 | 33.3 | 9.4 | 80.5 | 90.6 | 47.2 |
| Claude-Sonnet-4 [1] | 39.3 | 27.8 | 77.1 | 78.1 | 22.9 | 50.3 | |
| Gemini-3-Flash [7] | 59.3 | 42.9 | 5.0 | 60.2 | 95.0 | 17.3 | |
| DeepSeek-V3.2 [5] | 36.4 | 20.6 | 24.3 | 41.5 | 75.7 | 20.9 | |
| Qwen3-8B [40] | 31.4 | 8.2 | 27.0 | 40.1 | 73.0 | 31.9 |
Table 2. Failure-conditioned performance across three agent domains. SR: success rate; Prop.: trajectory proportion; Gap: error-free minus error-containing SR. The split describes the association between observed execution errors and task success.
Tool-Feedback Advantage Shaping
§ 3 shows that retained failure content reduces continuation success. Outcome-only training does not account for this cost: trajectories with the same final result receive the same reward regardless of how many failures they introduce. Tool-Feedback Advantage Shaping (TFAS) adds an execution-validity signal to a GRPO/DAPO update [26, 43], so that the policy is also rewarded for keeping failures out of its history. The signal is read directly from tool and environment feedback and requires neither a learned reward model nor step-level annotation.
A Trajectory-Level Execution Signal
Let indicate whether step invokes a tool and indicate whether that invocation is valid and executable. For a completed trajectory , define
This score is available during rollout at no extra cost: tools and environments already report whether each call executes. The same definition therefore covers code errors, visual-tool invocation failures, and rejected environment actions.
For trajectories sampled from the same prompt group , the tool-feedback advantage is
where and are the group mean and standard deviation. We compute in the same way from the binary task-success reward. Normalizing within a group compares trajectories that attempt the same task, so the advantage reflects how cleanly a trajectory executes relative to its peers. The tool advantage also remains informative when the outcome signal is not: if every sampled trajectory in a group succeeds, or every one fails, is zero for all of them, while differences in execution validity still rank them.
Mixing Advantages for Policy Optimization
We broadcast each trajectory’s two scalar advantages to its response tokens and form
Here indexes a response token in the policy update, and sets the tool-signal weight; recovers
outcome-only training. The mixed advantage enters the usual clipped surrogate,
where is the current-to-behavior policy probability ratio. Mixing after normalization has two benefits. First, the two advantages have a comparable scale within every group, so directly sets the balance between task success and execution validity. When the two rewards are combined before normalization, as in the Tool Valid Reward baseline, their relative influence depends on their within-group variances and changes from prompt to prompt. Second, TFAS changes only the advantage: it reuses the same rollouts, adds no model or environment interaction, and keeps task success in the objective for any . § 5.4 studies the choice of .
Experiment
We describe the setup, compare TFAS with outcome-only and tool-valid reward baselines, and analyze task success, error-containing trajectories, and advantage mixing weights.
Experimental Setup
Environments and Datasets. We test generalization across state spaces and error modalities in three long-horizon interactive environments. In ReTool [6], agents interleave natural-language reasoning and executable Python to solve competition-style math problems. In OpenThinkImg [30], VLM agents solve chart reasoning tasks by adaptively invoking external vision tools, including OCR and image zooming. In ALFWorld [29], a text-based embodied simulation, multi-step household tasks generate exploration-driven trial-and-error noise. Together, they test mitigation of contextual interference across code-tool reasoning, visual-linguistic, and physical domains.
Baselines. We evaluate effectiveness and generalization across text-only and vision-language modalities and 4B/8B scales using Qwen3-4B/8B [40] and Qwen3-VL-4B/8B [2] as baseline models.
Reward Strategies. We compare three reinforcement learning strategies. Original Outcome Reward (Baseline) uses only the final accuracy reward (acc reward) upon task success. Tool Validation Reward adds a trajectory-level tool-valid reward, the proportion of correct tool-use steps in the completed rollout. Tool-Feedback Advantage Shaping (TFAS, Ours) converts this same signal into a separate advantage and mixes it with the accuracy advantage through Equation (1). Both tool-feedback strategies use the same tool-signal weight.
Experiment Results
Table 3 shows consistent findings across the three environments.
| Environment | Model | Reward Strategy | Overall Acc (%)↑ | Err Proportion (%)↓ | Err Acc (%)↑ | ETD (%)↓ |
| ReTool | Qwen3-4B [40] | Base Model (No Training) | 47.9 | 40.3 | 23.7 | 1.6 |
| Original Outcome Reward | 50.4 | 41.4 | 22.7 | 1.8 | ||
| + Tool Valid Reward | 52.5 | 38.8 | 19.1 | 1.9 | ||
| + TFAS (Ours) | 54.7 | 34.6 | 33.3 | 0.9 | ||
| Qwen3-8B [40] | Base Model (No Training) | 51.3 | 30.0 | 49.3 | 0.7 | |
| Original Outcome Reward | 55.1 | 38.4 | 26.2 | 0.8 | ||
| + Tool Valid Reward | 56.2 | 31.2 | 25.4 | 1.0 | ||
| + TFAS (Ours) | 58.4 | 28.5 | 53.6 | 0.6 | ||
| OpenThinkImg | Qwen3-VL-4B [2] | Base Model (No Training) | 42.4 | 7.8 | 15.5 | 2.6 |
| Original Outcome Reward | 44.3 | 7.1 | 19.4 | 3.4 | ||
| + Tool Valid Reward | 46.5 | 5.7 | 9.5 | 2.0 | ||
| + TFAS (Ours) | 49.3 | 3.8 | 10.7 | 1.5 | ||
| Qwen3-VL-8B [2] | Base Model (No Training) | 48.8 | 1.4 | 16.2 | 1.0 | |
| Original Outcome Reward | 49.2 | 12.6 | 18.4 | 1.1 | ||
| + Tool Valid Reward | 49.5 | 2.7 | 16.7 | 1.0 | ||
| + TFAS (Ours) | 52.9 | 2.2 | 20.9 | 0.8 | ||
| ALFWorld | Qwen3-4B [40] | Base Model (No Training) | 17.9 | 83.6 | 10.3 | 18.1 |
| Original Outcome Reward | 17.8 | 84.2 | 12.3 | 23.7 | ||
| + Tool Valid Reward | 20.9 | 66.7 | 22.1 | 36.1 | ||
| + TFAS (Ours) | 24.3 | 64.1 | 31.8 | 10.1 | ||
| Qwen3-8B [40] | Base Model (No Training) | 31.4 | 27.0 | 8.2 | 6.7 | |
| Original Outcome Reward | 31.2 | 18.3 | 21.0 | 8.7 | ||
| + Tool Valid Reward | 33.6 | 18.0 | 35.7 | 8.0 | ||
| + TFAS (Ours) | 41.2 | 15.8 | 52.4 | 2.8 |
Table 3. Main Experimental Results across Three Environments. We report the Overall Accuracy (Overall Acc), the proportion of trajectories that contain at least one error (Err Proportion), and the task success rate for trajectories that contain at least one error step (Err Acc). The untrained base model is included as the baseline. The best results are highlighted in bold. TFAS achieves the best overall accuracy in all settings, demonstrating the effectiveness of our method. ETD is the mean per-episode error-token share, including zero-error episodes.
Higher Overall Acc. Our TFAS achieves the highest Overall Acc in all six model-environment settings, over the base model, outcome-only RL, and tool-valid reward baselines. For example, it improves Qwen3-8B [40] from 51.3% to 58.4% on ReTool and from 31.4% to 41.2% on ALFWorld. This confirms that TFAS improves final task completion rather than only changing error statistics.
Lower Err Proportion. Our method usually reduces the proportion of error-containing trajectories. It obtains the lowest Err Proportion in ReTool and ALFWorld for both model sizes.
In OpenThinkImg, for Qwen3-VL-8B [2], it also sharply reduces the error proportion compared with outcome-only RL, from 12.6% to 2.2%. This suggests that TFAS generally suppresses the formation of polluted contexts before they accumulate.
Stronger Err Acc. Error-conditioned accuracy measures the task-success rate after at least one error has already entered the trajectory. TFAS gives the best Err Acc in ReTool and ALFWorld, reaching 53.6% on ReTool with Qwen3-8B [40] and 52.4% on ALFWorld with Qwen3-8B [40]. Together with the Err Proportion reductions observed in many settings, this suggests that the method reduces harmful error injection while also making the remaining error-containing trajectories less likely to collapse.
Tool Feedback Matters. Our results suggest that tool-failure feedback is more effective when used beyond a plain reward bonus. Outcome-only RL often provides limited gains, while Tool Valid Reward sometimes lowers Err Acc, such as in ReTool and OpenThinkImg with Qwen3-VL-4B [2]. Mixing tool feedback at the advantage level gives a clearer optimization signal than either ignoring failures or adding a shallow validity reward. Thus, the benefit comes from how tool feedback is injected into optimization, not merely from adding an auxiliary reward.
Broad Applicability. The same pattern holds across different tasks, modalities, and model sizes: text-only agents on ReTool and ALFWorld, VLM agents on OpenThinkImg, and both 4B and 8B scales. This suggests that TFAS addresses a general failure mode of agent training, and failure-induced context pollution is a cross-domain agent-training problem.
Post-Training Failure-Context Accumulation
The ETD column of Table 3 tests whether execution-validity training changes the context quantity identified in § 3. We compare the base model and the three trained policies within each environment and model scale. The reported statistic is mean final ETD over all evaluation episodes, with zero assigned to histories without labeled failure spans.
TFAS has the lowest ETD among the four strategies in all six settings. Relative to outcome-only RL, ETD decreases from 1.770% to 0.923% on ReTool-4B and from 0.830% to 0.610% on ReTool-8B. On OpenThinkImg, the corresponding changes are 3.420% to 1.510% for the 4B model and 1.106% to 0.801% for the 8B model. On ALFWorld, ETD decreases from 23.700% to 10.070% for Qwen3-4B and from 8.720% to 2.820% for Qwen3-8B, reductions of 13.630 and 5.900 percentage points. Across the six settings, the relative ETD reduction over outcome-only RL ranges from 26.5% to 67.7%. TFAS also has lower ETD than the untrained base model in every setting.
Reward-level validity shaping does not produce the same pattern. Tool Valid Reward increases ETD over outcome-only RL in both ReTool settings and ALFWorld-4B, while it decreases ETD in both OpenThinkImg settings and ALFWorld-8B. For example, ALFWorld-4B reaches 36.110% under Tool Valid Reward, compared with 23.700% under outcome-only RL and 10.070% under TFAS. Adding execution validity at the reward level therefore does not reliably reduce failure-context density, whereas mixing it at the advantage level does so in every setting.
Accuracy gains track ETD reductions. The two effects of TFAS are closely aligned across settings (Figure 5). Ranking the six settings by relative ETD reduction over outcome-only RL gives ALFWorld-8B (67.7%), ALFWorld-4B (57.5%), OpenThinkImg-4B (55.8%), ReTool-4B (47.9%), OpenThinkImg-8B (27.6%), and ReTool-8B (26.5%); the corresponding gains in Overall Acc are 10.0, 6.5, 5.0, 4.3, 3.7, and 3.3 points, in exactly the same order. The settings in which TFAS removes the most failure context are those in which it improves task completion the most, consistent with the cost of retained failures identified in § 3.
Figure 5. Accuracy gain versus ETD reduction for TFAS relative to outcome-only RL. Each point is one model–environment setting; the dashed line is a least-squares fit. The two quantities have the same rank order across all six settings.
Ablation: Advantage Mixing Weight
Figure 4 studies the advantage mixing weight on OpenThinkImg with Qwen3-VL-4B [2], keeping the final accuracy reward, policy-optimization configuration, and training budget fixed. The setting corresponds to outcome-only optimization, while larger values increase the contribution of tool-feedback advantage in Equation (1). Adding tool-use feedback improves overall task success and reduces error-containing trajectories, with giving the best balance in this setting. When becomes too large, the tool signal can dominate the global task objective and reduce final accuracy, indicating that tool-feedback advantage is most effective as a complementary shaping signal rather than a replacement for task-level credit. The best may vary across environments and models; the values used in this paper are reported in Appendix § 8.
Figure 4. Sensitivity analysis of the advantage mixing weight on OpenThinkImg with Qwen3-VL-4B. (a) Overall Acc under different mixing weights. (b) Err Ratio under the same settings. A moderate provides the best balance between task success and error reduction.
Qualitative Analysis
Figure 3 shows the ALFWorld case behind the gains in Table 3. The baseline reaches the desk, takes the bowl, then attempts an unavailable action; the resulting error feedback triggers repeated invalid actions. After TFAS training, the agent follows the executable layout and completes the task in 6 steps without invalid actions. This case illustrates how TFAS favors trajectories with higher execution validity, reducing the introduction of invalid actions and their associated error feedback. Similar examples appear in Appendix § 13.

Figure 3. Qualitative ALFWorld case comparing behavior before and after TFAS training. The baseline policy enters an invalid-action loop, while the trained policy follows executable actions and completes the task without invalid steps.
Conclusion
An agent’s failed interactions remain in the history that conditions its later decisions. We measure this accumulated failure context with ETD, and matched ALFWorld interventions show that its content lowers continuation success. Failure-conditioned evaluations show the same gap across planning, code execution, and visual tool use. TFAS, a trajectory-level execution-validity signal, improves overall accuracy and achieves the lowest ETD in all six settings, reducing ETD by 26.5–67.7% relative to outcome-only RL. Across these settings, larger ETD reductions come with larger accuracy gains, in exactly the same rank order. Agents should therefore be trained and evaluated on both task completion and the failure content they leave in their history.
References
Training Hyperparameters
In this section, Table 4–Table 9 report the hyperparameter settings used for all reinforcement-learning experiments in § 5. We list the configurations separately for each environment and model size, covering ReTool, OpenThinkImg, and ALFWorld. Within each table, the three columns correspond to the outcome-only reward baseline, the tool-valid reward baseline, and our Tool-Feedback Advantage Shaping (TFAS) strategy, respectively. Unless otherwise specified, hyperparameters are kept identical across reward strategies within the same environment-model setting to ensure a controlled comparison. We use GRPO [26] and DAPO [43] as the underlying PPO-style optimizers.
| Outcome Reward | Tool Valid Reward | TFAS (Ours) | |
| Pretrained Model | Qwen3-4B-Instruct-2507 [40] | Qwen3-4B-Instruct-2507 [40] | Qwen3-4B-Instruct-2507 [40] |
| RL Algorithm | DAPO | DAPO | DAPO |
| Train Batchsize | 64 | 64 | 64 |
| Temperature | 1.0 | 1.0 | 1.0 |
| Num Response per Prompt | 16 | 16 | 16 |
| Max Prompt Length | 2048 | 2048 | 2048 |
| Max Response Length | 16384 | 16384 | 16384 |
| Bf16 | True | True | True |
| Actor Learning Rate | 1e-6 | 1e-6 | 1e-6 |
| KL Loss Coef | 0.0 | 0.0 | 0.0 |
| Steps | 40 | 40 | 40 |
| – | 0.5 | 0.5 |
Table 4. Hyperparameter settings for Qwen3-4B ReTool experiments.
| Outcome Reward | Tool Valid Reward | TFAS (Ours) | |
| Pretrained Model | Qwen3-8B [40] | Qwen3-8B [40] | Qwen3-8B [40] |
| RL Algorithm | GRPO | GRPO | GRPO |
| Train Batchsize | 64 | 64 | 64 |
| Temperature | 1.0 | 1.0 | 1.0 |
| Num Response per Prompt | 16 | 16 | 16 |
| Max Prompt Length | 12000 | 12000 | 12000 |
| Max Response Length | 256 | 256 | 256 |
| Bf16 | True | True | True |
| Actor Learning Rate | 1e-6 | 1e-6 | 1e-6 |
| KL Loss Coef | 0.15 | 0.15 | 0.15 |
| Steps | 23 | 23 | 23 |
| – | 0.17 | 0.17 |
Table 9. Hyperparameter settings for Qwen3-8B ALFWorld experiments.
Method Details
Core Codes for TFAS
In this section, we show the core codes of TFAS:
Listing 1. Core code for Tool-Feedback Advantage Shaping.
"""
Dual Advantage for Multi-Turn GRPO
Key idea:
final_adv = (1 - w) * success_advantage + w *
valid_fraction_advantage
Instead of mixing two reward signals into one
scalar before GRPO normalisation,
we normalise each signal independently and blend
the resulting advantages.
This preserves gradient signal when the success
reward has zero variance
(all-fail or all-succeed prompt groups).
"""
from __future__ import annotations
from collections import defaultdict
import numpy as np
import torch
def _grpo_normalise(scores: torch.Tensor,
group_ids: list[str],
eps: float = 1e-6) -> torch.Tensor:
"""Within-group zero-mean, unit-variance
normalisation (standard GRPO).
Groups with zero variance get advantage =
0."""
adv = torch.empty_like(scores)
groups: dict[str, list[int]] = defaultdict(
list)
for i, gid in enumerate(group_ids):
groups[gid].append(i)
for idxs in groups.values():
g = scores[idxs]
mu, std = g.mean(), g.std() if len(idxs) >
1 else torch.tensor(1.0)
adv[idxs] = (g - mu) / (std + eps) if std >
eps else 0.0
return adv
def compute_dual_advantage(
rm_scores: torch.Tensor, # [N, seq_len]
success reward (0/1 at last token)
response_mask: torch.Tensor, # [N, seq_len]
response token mask
prompt_uids: np.ndarray, # [N] prompt group id
per row
traj_uids: np.ndarray, # [N] trajectory id per
row
is_valid_action: np.ndarray, # [N] 1 if step
action was valid
valid_fraction_coef: float, # coefficient to
scale valid-fraction score
vf_adv_weight: float, # blend weight w (e.g.
0.5)
eps: float = 1e-6,
) -> tuple[torch.Tensor, dict]:
"""Compute dual advantage with separate GRPO
normalisation per signal."""
# -- Step 1: aggregate per-step rows into per-
trajectory scalars -----
row_scores = rm_scores.sum(dim=-1) # [N]
traj_to_rows: dict[str, list[int]] =
defaultdict(list)
for i, uid in enumerate(traj_uids):
traj_to_rows[str(uid)].append(i)
traj_ids = list(traj_to_rows.keys())
success_scores, vf_scores, traj_prompts = [],
[], []
for tid in traj_ids:
rows = traj_to_rows[tid]
# Success: same binary reward across all
steps in a trajectory
success_scores.append(row_scores[rows[0]])
# Valid-fraction: proportion of valid
actions, scaled by coefficient
vf = float(is_valid_action[rows].sum()) /
max(len(rows), 1)
vf_scores.append(torch.tensor(vf *
valid_fraction_coef,
device=rm_scores.
device))
traj_prompts.append(str(prompt_uids[rows
[0]]))
success_t = torch.stack(success_scores)
vf_t = torch.stack(vf_scores)
# -- Step 2: GRPO normalise each signal
independently -----
# This is the core of dual advantage: each
# reward signal gets its own
# within-group normalisation, so neither
# signal can drown out the other.
success_adv = _grpo_normalise(success_t,
traj_prompts, eps)
vf_adv = _grpo_normalise(vf_t, traj_prompts,
eps)
# -- Step 3: blend -----
blended = (1.0 - vf_adv_weight) * success_adv
+ vf_adv_weight * vf_adv
# -- Step 4: broadcast back to per-step rows
-----
advantages = torch.zeros_like(response_mask,
dtype=torch.float32)
for idx, tid in enumerate(traj_ids):
rows = traj_to_rows[tid]
advantages[rows] = blended[idx] *
response_mask[rows]
metrics = {
"dual_adv/success_adv_mean": float(
success_adv.mean()),
"dual_adv/vf_adv_mean": float(vf_adv.mean()
),
"dual_adv/blended_adv_mean": float(blended.
mean()),
}
return advantages, metrics
| Outcome Reward | Tool Valid Reward | TFAS (Ours) | |
| Pretrained Model | Qwen3-8B [40] | Qwen3-8B [40] | Qwen3-8B [40] |
| RL Algorithm | DAPO | DAPO | DAPO |
| Train Batchsize | 64 | 64 | 64 |
| Temperature | 1.0 | 1.0 | 1.0 |
| Num Response per Prompt | 16 | 16 | 16 |
| Max Prompt Length | 2048 | 2048 | 2048 |
| Max Response Length | 16384 | 16384 | 16384 |
| Bf16 | True | True | True |
| Actor Learning Rate | 1e-6 | 1e-6 | 1e-6 |
| KL Loss Coef | 0.0 | 0.0 | 0.0 |
| Steps | 40 | 40 | 40 |
| – | 0.5 | 0.5 |
Table 5. Hyperparameter settings for Qwen3-8B ReTool experiments.
| Outcome Reward | Tool Valid Reward | TFAS (Ours) | |
| Pretrained Model | Qwen3-VL-4B-Instruct [2] | Qwen3-VL-4B-Instruct [2] | Qwen3-VL-4B-Instruct [2] |
| RL Algorithm | GRPO | GRPO | GRPO |
| Train Batchsize | 64 | 64 | 64 |
| Temperature | 1.0 | 1.0 | 1.0 |
| Num Response per Prompt | 8 | 8 | 8 |
| Max Prompt Length | 4096 | 4096 | 4096 |
| Max Response Length | 512 | 512 | 512 |
| Bf16 | True | True | True |
| Actor Learning Rate | 1e-6 | 1e-6 | 1e-6 |
| KL Loss Coef | 0.0 | 0.0 | 0.0 |
| Steps | 8 | 8 | 8 |
| – | 0.5 | 0.5 |
Table 6. Hyperparameter settings for Qwen3-VL-4B OpenThinkImg experiments.
| Outcome Reward | Tool Valid Reward | TFAS (Ours) | |
| Pretrained Model | Qwen3-VL-8B-Instruct [2] | Qwen3-VL-8B-Instruct [2] | Qwen3-VL-8B-Instruct [2] |
| RL Algorithm | GRPO | GRPO | GRPO |
| Train Batchsize | 16 | 16 | 16 |
| Temperature | 1.0 | 1.0 | 1.0 |
| Num Response per Prompt | 8 | 8 | 8 |
| Max Prompt Length | 4096 | 4096 | 4096 |
| Max Response Length | 512 | 512 | 512 |
| Bf16 | True | True | True |
| Actor Learning Rate | 1e-6 | 1e-6 | 1e-6 |
| KL Loss Coef | 0.0 | 0.0 | 0.0 |
| Steps | 8 | 8 | 8 |
| – | 0.5 | 0.5 |
Table 7. Hyperparameter settings for Qwen3-VL-8B OpenThinkImg experiments.
| Outcome Reward | Tool Valid Reward | TFAS (Ours) | |
| Pretrained Model | Qwen3-4B-Instruct-2507 [40] | Qwen3-4B-Instruct-2507 [40] | Qwen3-4B-Instruct-2507 [40] |
| RL Algorithm | GRPO | GRPO | GRPO |
| Train Batchsize | 64 | 64 | 64 |
| Temperature | 1.0 | 1.0 | 1.0 |
| Num Response per Prompt | 8 | 8 | 8 |
| Max Prompt Length | 12000 | 12000 | 12000 |
| Max Response Length | 256 | 256 | 256 |
| Bf16 | True | True | True |
| Actor Learning Rate | 1e-6 | 1e-6 | 1e-6 |
| KL Loss Coef | 0.15 | 0.15 | 0.15 |
| Steps | 23 | 23 | 23 |
| – | 0.17 | 0.17 |
Table 8. Hyperparameter settings for Qwen3-4B ALFWorld experiments.
Other Details
We implement our method based on the verl reinforcement learning framework, into which we have integrated the aforementioned ALFWorld, ReTool, and OpenThinkImg environments. To facilitate efficient distributed training, we utilize the FSDP (Fully Sharded Data Parallel) back-end for all experiments. The base models include Qwen3-4B [40], Qwen3-8B [40], Qwen3-VL-4B [2], and Qwen3-VL-8B [2]. Experiments were conducted on A800 GPUs; the exact hardware allocation is reported in Appendix § 14. Detailed hyperparameters and other implementation configurations are provided in Appendix § 8.
Experimental Details
Table 10 summarizes the training and evaluation data used in the three environments. ReTool uses the public RL training and validation sets released with the ReTool project [6], OpenThinkImg uses the chart-reasoning RL and held-out test sets [30], and ALFWorld follows the standard environment split for training and held-out evaluation [29].
Table 10. Training and evaluation data used for each environment.
ETD Analysis Details
We evaluate Qwen3-8B on the ALFWorld TextWorld environment [29]. Each game is rolled out four times. The agent is served with vLLM; decoding is greedy (, top-) with at most 256 new tokens per turn and a repetition penalty of 1.05, so every trajectory is reproducible from the seed. An episode terminates when the environment signals task completion or when the budget of turns is exhausted.
Independent Runs and Confidence Intervals
To assess the variability of the reported results, we conduct three independent runs for each configuration. For trained configurations, each run includes both training and evaluation. For the untrained base models, only evaluation is repeated under the same protocol. Across runs, we keep the datasets, model configurations, hyperparameters, and evaluation metrics unchanged. We report the mean over the three runs together with its two-sided 95% confidence interval (CI).
Independent Repeats for the ALFWorld Main Experiment
Table 11 reports the independent repeats for the ALFWorld portion of the main experiment. Across both model scales, TFAS obtains the highest mean Overall Acc and Err Acc among the compared reward strategies.
| Model | Reward Strategy | Overall Acc (↑) Runs 1/2/3 | Overall Acc (↑) Mean ± 95% CI | Err Proportion (↓) Runs 1/2/3 | Err Proportion (↓) Mean ± 95% CI | Err Acc (↑) Runs 1/2/3 | Err Acc (↑) Mean ± 95% CI | ETD (↓) Runs 1/2/3 | ETD (↓) Mean ± 95% CI |
| Qwen3-4B | Original Outcome Reward | 17.8/16.7/17.9 | 17.5 ± 1.65 | 84.2/85.2/84.0 | 84.5 ± 1.60 | 12.3/12.0/12.0 | 12.1 ± 0.43 | 23.7/23.9/23.0 | 23.5 ± 1.17 |
| Qwen3-4B | + Tool Valid Reward | 20.9/21.3/21.0 | 21.1 ± 0.52 | 66.7/65.5/66.7 | 66.3 ± 1.72 | 22.1/21.8/21.9 | 21.9 ± 0.38 | 36.1/35.2/36.2 | 35.8 ± 1.37 |
| Qwen3-4B | + TFAS (Ours) | 24.3/24.5/23.9 | 24.2 ± 0.76 | 64.1/63.5/64.5 | 64.0 ± 1.25 | 31.8/31.9/31.5 | 31.7 ± 0.52 | 10.1/11.3/9.7 | 10.4 ± 2.07 |
| Qwen3-8B | Original Outcome Reward | 31.2/30.0/32.4 | 31.2 ± 2.98 | 18.3/18.9/17.3 | 18.2 ± 2.01 | 21.0/20.1/22.5 | 21.2 ± 3.01 | 8.7/8.0/9.0 | 8.6 ± 1.27 |
| Qwen3-8B | + Tool Valid Reward | 33.6/33.4/33.0 | 33.3 ± 0.76 | 18.0/19.8/18.7 | 18.8 ± 2.25 | 35.7/35.4/35.3 | 35.5 ± 0.52 | 8.0/8.8/8.1 | 8.3 ± 1.08 |
| Qwen3-8B | + TFAS (Ours) | 41.2/42.1/40.8 | 41.4 ± 1.65 | 15.8/14.8/16.5 | 15.7 ± 2.12 | 52.4/52.3/52.3 | 52.3 ± 0.14 | 2.8/2.5/2.5 | 2.6 ± 0.43 |
Table 11. Independent repeats and 95% CIs for the ALFWorld main experiment. “Runs” lists the three independent results, and the adjacent column reports the sample mean ± the two-sided 95% CI half-width. All values are percentages. ETD Run 1 is copied from Table 3.
Independent Repeats for the Controlled Context Interventions
We repeat the controlled ALFWorld interventions at from § 3.3 three times. Each repeat reruns every matched branch with an independent evaluation seed while keeping the evaluated tasks, anchor construction, intervention content, and remaining action budget fixed. Table 12 reports the change in success rate relative to the corresponding matched trajectory with an unmodified history.
| Intervention | Runs 1/2/3 | Mean ± 95% CI | |
| Error insertion () | 1 | −4.7/−4.2/−4.9 | −4.6 ± 0.90 |
| Error insertion () | 2 | −5.7/−5.7/−5.4 | −5.6 ± 0.43 |
| Error insertion () | 3 | −8.2/−8.0/−8.0 | −8.1 ± 0.29 |
| Neutral insertion () | 1 | −0.9/−1.2/−0.7 | −0.9 ± 0.63 |
| Neutral insertion () | 2 | −3.8/−3.6/−3.6 | −3.7 ± 0.29 |
| Neutral insertion () | 3 | −5.6/−5.4/−5.6 | −5.5 ± 0.29 |
| Failure deletion () | 1 | +2.5/+2.7/+2.7 | +2.6 ± 0.29 |
| Failure deletion () | 2 | +20.0/+19.8/+20.3 | +20.0 ± 0.63 |
Table 12. Independent repeats and 95% CIs for the controlled failure-context interventions on ALFWorld at . Values are changes in success rate (percentage points); , , and denote error insertion, token-matched neutral insertion, and failure deletion, respectively.
Qualitative Analysis
This section provides additional qualitative examples from the three evaluation environments. Figure 6, Figure 7, and Figure 8 show representative cases from ReTool, OpenThinkImg, and ALFWorld, respectively. Together, these cases illustrate how TFAS changes agent behavior across code/tool-use reasoning, visual reasoning, and embodied planning.

Figure 6. Qualitative example on ReTool. The case shows how TFAS affects tool-augmented mathematical reasoning behavior.

Figure 7. Qualitative example on OpenThinkImg. The case shows how TFAS affects tool-augmented visual reasoning behavior.

Figure 8. Qualitative example on ALFWorld. The case shows how TFAS affects embodied planning behavior.
Compute Resources
All reinforcement-learning experiments were conducted on NVIDIA A800 GPUs with Ubuntu 22.04, CUDA 12.6, bfloat16 training, and PyTorch Fully Sharded Data Parallel (FSDP) [45]. The OpenThinkImg experiments use 8 A800 GPUs per run for 6 hours. The remaining experiments, including all ReTool and ALFWorld runs, use 4 A800 GPUs per run. A ReTool training run takes approximately 50 hours, while an ALFWorld training run takes approximately 45 hours under the reported configuration. The training budgets, batch sizes, number of responses per prompt, maximum prompt and response lengths, and optimization steps are reported in Table 4–Table 9.
Limitations
The method introduces a mixing weight , which controls the strength of tool-feedback advantage relative to task-accuracy advantage. Although our sensitivity study shows that a moderate value works well, this hyperparameter may still need to be tuned for different environments, models, or tool-feedback definitions. TFAS also adds a small amount of training-time computation because it estimates and normalizes a separate trajectory-level tool-feedback advantage before policy optimization. This overhead is minor compared with rollout generation and model updates in our experiments, but it is still an additional component beyond outcome-only RL.
Broader Impact
This work aims to improve the reliability of long-horizon language-model agents by reducing invalid tool calls, execution errors, and other forms of failure-induced context pollution. Potential positive impacts include more dependable agent behavior in tool-assisted reasoning, visual analysis, and embodied planning settings, especially when repeated trial-and-error interactions would otherwise create avoidable failures.
As with general methods for improving agent capabilities, downstream applications should still consider the re-
liability and oversight requirements of the target domain. Better tool-use behavior may reduce avoidable execution errors, but it does not by itself guarantee that an agent’s goals, tool permissions, or deployment context are appropriate. Our experiments are limited to benchmark environments and do not introduce new user data, scraped datasets, deployed systems, or released high-risk models. We therefore view the direct societal risk of this work as limited, while recommending that practical deployments use task-appropriate safeguards such as tool permission controls and human review for consequential decisions.
Other
We use the following existing assets and cite their original sources in the manuscript. All assets are used for research evaluation and training under their respective usage terms.
Benchmarks and datasets. The experiments use ReTool [6], OpenThinkImg [30], and ALFWorld [29] as the main interactive environments. The corresponding training and evaluation sets are DAPO-Math-17k [43] and AIME 2025 [18] for ReTool, OpenThinkIMG-Chart-RL-14501 [30] and CharXiv [34] for OpenThinkImg, and the standard ALFWorld splits [29] for embodied planning.
Models. The trainable base models are Qwen3-4B-Instruct-2507, Qwen3-8B [40], Qwen3-VL-4B-Instruct, and Qwen3-VL-8B-Instruct [2]. Additional closed-source models are used only for failure-conditioned evaluation in § 3, following their public API terms.
Training and evaluation frameworks. The reinforcement-learning pipeline is implemented with verl [31] and PyTorch FSDP [45]. Model loading and evaluation use standard open-source libraries, including Transformers [36].
References
- [1]Anthropic. System card: Claude Opus 4 and Claude Sonnet 4, 2025. 4, 5
- [2]Shuai Bai, Yuxuan Cai, Ruizhe Chen, Keqin Chen, Xionghui Chen, Zesen Cheng, Lianghao Deng, Wei Ding, Chang Gao, Chunjiang Ge, et al. Qwen3-vl technical report. arXiv preprint arXiv:2511.21631, 2025. 4, 5, 7, 8, 14, 16, 21arxiv.org/abs/2511.21631
- [3]ByteDance Seed Team. Introduction to techniques used in Seed1.6, 2025. 4, 5
- [4]Kevin Chen, Marco Cusumano-Towner, Brody Huval, Aleksei Petrenko, Jackson Hamburger, Vladlen Koltun, and Philipp Krähenbühl. Reinforcement learning for long-horizon interactive LLM agents. arXiv preprint arXiv:2502.01600, 2025. 3
- [5]DeepSeek-AI. DeepSeek-V3.2: Pushing the frontier of open large language models, 2025. 4, 5
- [6]Jiazhan Feng, Shijue Huang, Xingwei Qu, Ge Zhang, Yujia Qin, Baoquan Zhong, Chengquan Jiang, Jinxin Chi, and Wanjun Zhong. Retool: Reinforcement learning for strategic tool use in llms, 2025. 3, 4, 6, 16, 21
- [7]Google DeepMind. Gemini 3 Flash, 2025. 4, 5
- [8]Jing Yu Koh, Robert Lo, Lawrence Jang, Vikram Duvvur, Ming Chong Lim, Po-Yu Huang, Graham Neubig, Shuyan Zhou, Ruslan Salakhutdinov, and Daniel Fried. VisualWebArena: Evaluating multimodal agents on realistic visual web tasks. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics, 2024. 2
- [9]Xingzuo Li, Kehai Chen, Yunfei Long, Xuefeng Bai, Yong Xu, and Min Zhang. Generator-assistant stepwise rollback framework for large language model agent. arXiv preprint arXiv:2503.02519, 2025. 3
- [10]Yang Li, Siqi Ping, Xiyu Chen, Xiaojian Qi, Zigan Wang, Ye Luo, Xiaowei Zhang. AgentGit: A version control framework for reliable and scalable LLM-powered multi-agent systems. arXiv preprint arXiv:2511.00628, 2025. 3
- [11]Hunter Lightman, Vineet Kosaraju, Yura Burda, Harri Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe. Let’s verify step by step. arXiv preprint arXiv:2305.20050, 2023. 3arxiv.org/abs/2305.20050
- [12]Nelson F. Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang. Lost in the middle: How language models use long contexts. Transactions of the Association for Computational Linguistics, 12: 157–173, 2024. 1, 3
- [13]Shi-Yang Liu, Xin Dong, Ximing Lu, Shizhe Diao, Peter Belcak, Mingjie Liu, Min-Hung Chen, Hongxu Yin, Yu-Chiang Frank Wang, Kwang-Ting Cheng, Yejin Choi, Jan Kautz, and Pavlo Molchanov. GDP0: Group reward-decoupled normalization policy optimization for multi-reward RL optimization. arXiv preprint arXiv:2601.05242, 2026. 2, 3
- [14]Xufang Luo, Luke Zhang, Zhiyuan He, Zilong Wang, Siyun Zhao, Dongsheng Li, Luna K. Qiu, and Yuqing Yang. Agent lightning: Train any AI agents with reinforcement learning. arXiv preprint arXiv:2508.03680, 2025. 3
- [15]Chang Ma, Junlei Zhang, Zihao Zhu, Cheng Yang, Yujiu Yang, Yaohui Jin, Zhenzhong Lan, Lingpeng Kong, and Junxian He. AgentBoard: An analytical evaluation board of multi-turn LLM agents. In Advances in Neural Information Processing Systems, 2024. 3
- [16]Ming Ma, Jue Zhang, Fangkai Yang, Yu Kang, Qingwei Lin, Saravan Rajmohan, and Dongmei Zhang. DoVer: Intervention-driven auto debugging for LLM multi-agent systems. arXiv preprint arXiv:2512.06749, 2025. 3
- [17]Aman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan, Luyu Gao, Sarah Wiegreffe, Uri Alon, Nouha Dziri, Shrimai Prabhumoye, Yiming Yang, Sean Welleck, Bodhisattwa Prasad Majumder, Shashank Gupta, Amir Yazdan-bakhsh, and Peter Clark. Self-refine: Iterative refinement with self-feedback. In Advances in Neural Information Processing Systems, 2023. 1, 3arxiv.org/abs/2303.17651
- [18]Mathematical Association of America. MAA invitational competitions, 2025. 17, 21
- [19]OpenAI. GPT-5 system card, 2025. 4
- [20]OpenAI. Introducing GPT-5.1 for developers, 2025. 4
- [21]Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul F. Christiano, Jan Leike, and Ryan Lowe. Training language models to follow instructions with human feedback. In Advances in Neural Information Processing Systems, pages 27730–27744, 2022. 3
- [22]Zehan Qi, Xiao Liu, Iat Long Long, Hanyu Lai, Xueqiao Sun, Wenyi Zhao, Yu Yang, Xinyue Yang, Jiadai Sun, Shuntian Yao, et al. WebRL: Training LLM web agents via self-evolving online curriculum reinforcement learning. In International Conference on Learning Representations, 2025. 3
- [23]Timo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu, Maria Lomeli, Luke Zettlemoyer, Nicola Cancedda, and Thomas Scialom. Toolformer: Language models can teach themselves to use tools. In Advances in Neural Information Processing Systems, 2023. 1, 2
- [24]John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. High-dimensional continuous control using generalized advantage estimation. In International Conference on Learning Representations, 2016. 3
- [25]John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017. 3arxiv.org/abs/1707.06347
- [26]Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Mingchuan Zhang, Y. K. Li, Y. Wu, and Daya Guo. DeepSeekMath: Pushing the limits of mathematical reasoning in open language models, 2024. 5, 11
- [27]Freda Shi, Xinyun Chen, Kanishka Misra, Nathan Scales, David Dohan, Ed H. Chi, Nathanael Schärli, and Denny Zhou. Large language models can be easily distracted by irrelevant context. In International Conference on Machine Learning, pages 31210–31227. PMLR, 2023. 1, 3
- [28]Noah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. Reflexion: Language agents with verbal reinforcement learning. In Advances in Neural Information Processing Systems, 2023. 1, 3
- [29]Mohit Shridhar, Xingdi Yuan, Marc-Alexandre Côté, Yonatan Bisk, Adam Trischler, and Matthew Hausknecht. ALFWorld: Aligning text and embodied environments for interactive learning. In International Conference on Learning Representations, 2021. 1, 2, 4, 7, 16, 17, 21
- [30]Zhaochen Su, Lijie Li, Mingyang Song, Junzhuo Hao, Zhengyuan Yang, Jun Zhang, Guanjie Chen, Jiawei Gu, Juntao Li, Xiaoye Qu, and Yu Cheng. OpenThinkIMG: Learning to think with images via visual tool reinforcement learning, 2025. 4, 7, 16, 17, 21
- [31]verl Project. verl: Volcano engine reinforcement learning for llms, 2024. 21
- [32]Hongru Wang, Cheng Qian, Wanjun Zhong, Xiusi Chen, Jiahao Qiu, Shijue Huang, Bowen Jin, Mengdi Wang, Kam-Fai Wong, and Heng Ji. Acting less is reasoning more! teaching model to act efficiently. arXiv preprint arXiv:2504.14870, 2025. 3arxiv.org/abs/2504.14870
- [33]Hanlin Wang, Jian Wang, Chak Tou Leong, and Wenjie Li. STeCa: Step-level trajectory calibration for LLM agent learning. In Findings of the Association for Computational Linguistics: ACL 2025, pages 11597–11614. Association for Computational Linguistics, 2025. 3arxiv.org/abs/2502.14276
- [34]Zirui Wang, Mengzhou Xia, Luxi He, Howard Chen, Yitao Liu, Richard Zhu, Kaiqiu Liang, Xindi Wu, Haotian Liu, Sadhika Malladi, Alexis Chevalier, Sanjeev Arora, and Danqi Chen. CharXiv: Charting gaps in realistic chart understanding in multimodal LLMs, 2024. 17, 21arxiv.org/abs/2406.18521
- [35]Zihan Wang, Kangrui Wang, Qing Wang, Pingyue Zhang, Linjie Li, Zhengyuan Yang, Xing Jin, Kefan Yu, Minh Nhat Nguyen, Licheng Liu, et al. RAGEN: Understanding self-evolution in LLM agents via multi-turn reinforcement learning. arXiv preprint arXiv:2504.20073, 2025. 3
- [36]Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Remi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander M. Rush. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 38–45, 2020. 21DOI
- [37]Zhiheng Xi, Yiming Ding, Wenxiang Chen, Boyang Hong, Honglin Guo, Junzhe Wang, Dingwen Yang, Chenyang Liao, Xin Guo, Wei He, et al. AgentGym: Evolving large language model-based agents across diverse environments. arXiv preprint arXiv:2406.04151, 2024. 2arxiv.org/abs/2406.04151
- [38]Zhiheng Xi, Jixuan Huang, Chenyang Liao, Baodai Huang, Honglin Guo, Jiaq i Liu, Rui Zheng, Junjie Ye, Jizheng Zhang, Wenxiang Chen, et al. AgentGym-RL: Training LLM agents for long-horizon decision making through multi-turn reinforcement learning. arXiv preprint arXiv:2509.08755, 2025. 3arxiv.org/abs/2509.08755
- [39]Tianbao Xie, Soroush Vosoughi, Jun-Yan Zhu, Antonio Torralba, William T. Freeman, and Yuandong Tian. Text2Reward: Reward shaping with language models for reinforcement learning. In International Conference on Learning Representations, 2024. 3arxiv.org/abs/2309.11489
- [40]An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, et al. Qwen3 technical report. arXiv preprint arXiv:2505.09388, 2025. 1, 4, 5, 7, 13, 15, 16, 21arxiv.org/abs/2505.09388
- [41]Shunyu Yao, Howard Chen, John Yang, and Karthik Narasimhan. Webshop: Towards scalable real-world web interaction with grounded language agents. In Advances in Neural Information Processing Systems, pages 20744–20757, 2022. 2arxiv.org/abs/2207.01206
- [42]Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao. React: Synergizing reasoning and acting in language models. In International Conference on Learning Representations, 2023. 1, 2arxiv.org/abs/2210.03629
- [43]Qiying Yu, Zheng Zhang, Ruofei Zhu, Yufeng Yuan, Xiaochen Zuo, Yu Yue, Weinan Dai, Tiantian Fan, Gaohong Liu, Lingjun Liu, Xin Liu, Haibin Lin, Zhiqi Lin, Bole Ma, Guangming Sheng, Yuxuan Tong, Chi Zhang, Mofan Zhang, Wang Zhang, Hang Zhu, Jinhua Zhu, Jiaze Chen, Jiangjie Chen, Chengyi Wang, Hongli Yu, Yuxuan Song, Xiangpeng Wei, Hao Zhou, Jingjing Liu, Wei-Ying Ma, Yaqin Zhang, Lin Yan, Mu Qiao, Yonghui Wu, and Mingxuan Wang. DAPO: An open-source LLM reinforcement learning system at scale, 2025. 5, 11, 17, 21arxiv.org/abs/2503.14476
- [44]Siyu Yuan, Zehui Chen, Zhiheng Xi, Junjie Ye, Zhengyin Du, and Jiecao Chen. Agent-R: Training language model agents to reflect via iterative self-training. arXiv preprint arXiv:2501.11425, 2025. 3arxiv.org/abs/2501.11425
- [45]Yanli Zhao, Andrew Gu, Rohan Varma, Liang Luo, Chien-Chin Huang, Min Xu, Less Wright, Hamid Shojanazeri, Myle Ott, Sam Shleifer, Alban Desmaison, Can Balioglu, Pritam Damania, Bernard Nguyen, Geeta Chauhan, Yuchen Hao, Ajit Mathews, and Shen Li. PyTorch FSDP: Experiences on scaling fully sharded data parallel. Proceedings of the VLDB Endowment, 16(12):3848–3860, 2023. 17, 21arxiv.org/abs/2304.11277
- [46]Shuyan Zhou, Frank F. Xu, Hao Zhu, Xuhui Zhou, Robert Lo, Abishek Utharayan, Xianyi Cheng, Tianyue Ou, Yonatan Bisk, Daniel Fried, Uri Alon, and Graham Neubig. WebArena: A realistic web environment for building autonomous agents. In International Conference on Learning Representations, 2024. 2arxiv.org/abs/2307.13854
- [47]Kunlun Zhu, Zijia Liu, Bingxuan Li, Muxin Tian, Yingxuan Yang, Jiaxun Zhang, Pengrui Han, Qipeng Xie, Fuyang Cui, Weijia Zhang, et al. Where LLM agents fail and how they can learn from failures. arXiv preprint arXiv:2509.25370, 2025. 3arxiv.org/abs/2509.25370

