The Cost of Failure: Quantifying the Downstream Impact of Error Histories in LLM Agents
Jiahao Wang, Ruichuan An, Xinru Jiang, Sihan Yang, Hao Liang, Bohan Zeng, YiFan Zhang, Aijun Yang, Xiaohua Wang
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.
Create a lesson
Related papers
Fine-MFA: Towards Fine-grained Failure Attribution for Multimodal Agents
Shared title terminologycs.AIWeixiang Zhao, Yuhang Gu, Xingyu Sui et al.
Evolving Pixel-Based Game Agent: Generalizable Strategy Learning from Open-World Exploration
Shared title terminologycs.AIXinyu Liu, Chenwei Tang, Zizhou Wang et al.
G-Skill: Graph-Grounded Skill Evolution for Agentic Reinforcement Learning
Shared title terminologycs.AIJue Hou, Chengyi Yang, Renxu Bao et al.
ESEA: Error-Aware Sparse Expert Allocation for Efficient Diffusion MoE Inference
Shared title terminologycs.AIJing Xu, Jiateng Wei, Chenqian Yan et al.
MAS4BE: An LLM-Driven Multi-Agent Sandbox for B2B Ecosystem Simulation
Shared title terminologycs.AIZeyu Wang, Yao Zhao, Tengyue Ma
DSArena: Evaluating LLMs as Data Science Agents through Human Preferences
Shared title terminologycs.AIMaojun Sun, Jian Huang, Ruijian Han et al.