Cleaning an Agent's History Hurts When the World Still Holds the Error

Cleaning an Agent's History Hurts When the World Still Holds the Error


arXiv:2611.14654 (cs.AI) — Submitted 10 November 2026


Authors: Egor Pakhomov, Anurag Koul, Hongjun Liu, Bo Pang, Shafiq Joty, Erik Nijkamp


Comments: 23 pages, 6 figures; code and data in ancillary files


Subjects: Artificial Intelligence (cs.AI); Computation and Language (cs.CL); Machine Learning (cs.LG)


Abstract


Tool-using language-model agents accumulate histories of their own mistakes, and any system that compacts, repairs, or hands off such a history must decide what it says about those mistakes while their effects remain in the world. Prior work cleans the history at a fixed world state, where showing a corrected step and declaring the task done move together. This paper asks whether the same correct content helps or hurts depending on how the history states it and what the world actually holds.


The authors freeze an agent mid-task with its exact world state, edit either the history or the world, and let a receiver model continue. On AgentCE-Bench, after the agent commits a wrong value, they hold the world fixed and add the correct value through two natural edits: a truthful note beside the preserved error, or the agent's own completed action. The note raises recovery—the share of remaining targets the receiver gets right—from 51% under a matched neutral note to 66%. The completed action lowers it below the unedited history, from 50% to 44%, so the mere presence of the value does not predict the effect.


On AppWorld, after a database write, the authors vary whether its receipt reports success or failure and whether its effect is present. A success receipt lowers whole-task success from 45% to 28% while the effect is absent, and raises it from 38% to 49% once present. The two effects differ by 27 points pooled over two receivers—a difference that is positive in six of eight receivers at 97.5% confidence and in seven at 95%. A history edit's effect therefore depends on the world it describes: a history made to look clean while the world still holds the error can leave an agent worse off than no edit at all.


Key Findings


  • Context-dependent edits: The same correct content can either help or hurt depending on how the history states it and what the world contains.
  • Truthful annotation helps recovery: On AgentCE-Bench, a truthful note beside the preserved error raised recovery from 51% to 66%.
  • False completion hurts: Presenting the correction as a completed action lowered recovery below the unedited baseline, from 50% to 44%.
  • World state matters: On AppWorld, a success receipt lowered whole-task success from 45% to 28% when the database effect was absent, but raised it from 38% to 49% once the effect was present.
  • Practical implication: Cleaning a history without reconciling the underlying world state can leave an agent worse off than making no edit at all.

Citation


Cite as: arXiv:2611.14654 [cs.AI] (or arXiv:2611.14654v1 [cs.AI] for this version). DOI: https://doi.org/10.48550/arXiv.2611.14654

via ArXiv AI

Related