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

Egor Pakhomov, Anurag Koul, Hongjun Liu, Bo Pang, Shafiq Joty +1 more
11/10/2026
cs.AIcs.CLcs.LG

No confident code implementation found for this paper.

Abstract

Tool-using language-model agents accumulate histories of their own mistakes, and a system that compacts, repairs or hands off such a history decides what it says about those mistakes while their effects stay in the world. Prior work cleans the history at a fixed world, where showing a corrected step and saying it is done move together.

Show full abstract

We ask whether the same correct content helps or hurts depending on how the history states it and what the world holds. We freeze an agent mid-task with its exact world state, edit the history or the world, and let a receiver model continue. On AgentCE-Bench, after the agent commits a wrong value, we hold the world fixed and add the correct value by 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 value's presence alone does not predict the effect. On AppWorld, after a database write, we 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 positive in six of eight receivers at 97.5% and seven at 95%. A history edit's effect thus depends on the world it describes, and a history made to look clean while the world still holds the error can leave an agent worse off than no edit at all.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{pakhomov2026cleaning,
  title  = {Cleaning an Agent's History Hurts When the World Still Holds the Error},
  author = {Egor Pakhomov and Anurag Koul and Hongjun Liu and Bo Pang and Shafiq Joty and Erik Nijkamp},
  year   = {2026},
  eprint = {2611.14654},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2611.14654v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2611.14654.svg)](https://codeofpaper.com/paper/2611.14654)

Discussion