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

Edits to an agent's history flip sign with the world they describe

Egor Pakhomov, Anurag Koul, Hongjun Liu, Bo Pang, Shafiq Joty, Erik Nijkamp · arXiv · 2026-11-10

- **Problem** Earlier fixes for an agent's error history edited the record while the world stayed fixed. That made it impossible to tell whether the correct value or the claim that a step was done drove the change.
- **Method** The authors freeze an agent mid-task with its exact world state, then edit either the history or the world. A receiver model continues from there, so each edit is measured against its own control.
- **Results** On AgentCE-Bench, a truthful note raised recovery from 51% to 66%, but a completed-action record lowered it from 50% to 44%. On AppWorld, a success receipt lowered task success when the database write had no effect.

![Figure 1: The two designs, record above the line and world below. Left, AgentCE-Bench: a world holding a committed error under two records carrying the same co…](https://refivu.com/papers/9f9d54ba-fe02-462d-babe-c0f8a725ef58/figures/figure-4d794bbbad240aab641b464923920204.png?thumb=512)

**Figure 1** : The two designs, record above the line and world below. Left, AgentCE-Bench: a world holding a committed error under two records carrying the same correct value, on recovery. Right, AppWorld: one original success receipt over two worlds, on whole-task success. Each mark is an effect pooled over gpt-5.5 and claude-sonnet-5, with its 95% interval against the comparator it names; blue is a gain and orange a loss, in every figure. In each design the effect’s sign changes with the half varied.

[Original paper](https://arxiv.org/abs/2611.14654v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Egor Pakhomov, Anurag Koul, Hongjun Liu, Bo Pang, Shafiq Joty, Erik Nijkamp · Cleaning an Agent's History Hurts When the World Still Holds the Error · Original paper figure · Extracted the figure area from page 2 of the original PDF.

## Why cleaning a history can mislead

A tool-using agent's history holds its own actions, the receipts the environment returned, and its reasoning, mistakes included. Compaction, repair and handoff systems each decide what that history says about those mistakes. The usual choice is to clean the record, and the authors find that choice the hardest to support. Deleting the record doesn't undo that change in the world.

Earlier interventions edit the record while the world stays fixed. Rewriting a failed step as a success shows the agent the correct value and tells it the step is done at the same time. Because those two signals arrive together, prior work can't tell which one drives a change. The authors separate the two signals with two designs on two benchmarks, AgentCE-Bench and AppWorld.

In each design, a live receiver continues an exactly restored trajectory.

The same value recorded as the agent's own completed action lowers recovery from 50% to 44%, below the unedited record. The gap between the two edits, 22 points, was fixed before collection and is positive in both receivers.

The correct value, standing in the agent's own call, hurts, so its presence alone can't be the whole story. A copying account predicts that the falsified record comes out ahead, but it comes out behind. On AppWorld, the authors vary whether a database write's receipt reports success and whether its effect is present.

## Freezing states to separate record from world

The authors separate record from world by freezing an agent mid-task as one stored pair, then changing one half and keeping the other fixed. The record holds the task, the agent's past actions, the receipts and its reasoning, while the world holds the executable state those actions produced. An edit leaves the world untouched, so it reveals what the agent can read from the new record and asserts an account of what happened.

A continuation restores the edited record with its world, then hands control to a receiver that acts under a fixed step budget. The endpoint scores only the terminal world against the task's own specification, never the record.

Restoration re-enters a saved packet in a fresh process, and the authors check it with replay audits. AgentCE-Bench passed 200 of 200 certification states, and AppWorld passed 20 of 20. Two receivers, gpt-5.5 and claude-sonnet-5, run on both designs, and the AppWorld design adds six more.

Each of these states comes after the agent committed a wrong value to persistent state. The arm O keeps the original record, padded for length, while F rewrites the agent's own call so it asserts the correct value was set. The arm T adds a truthful note naming the mistaken action, and the arm N adds a content-free note matched to T. The estimand D equals (T−N) minus (F−O), so each edit is measured against its own control.

On AppWorld, the focal step is a database write, and the authors cross the receipt's claim with the state of the database. The failure receipt is one fixed error string stating that no application data was changed. The success receipt is the API's own return, which sometimes carries an identifier such as a sent email's id. The interaction I subtracts the failure effect in each world from the success effect, so it measures how far the receipt's advantage depends on the world.

The authors choose the states and edits themselves, so they measure what an edit does once records and worlds disagree, not how often that happens.

## Does the same correct value help or hurt depending on placement?

Recovery counts the look-ahead targets that hold the correct value when a continuation ends. Left unedited, the AgentCE-Bench receiver reached 50.13% recovery, and the matched neutral note left it at 50.57%. The truthful note beside the preserved error raised recovery to 65.78%, which is +15.20 pp \[12.46, 18.00\] over the neutral note. Recorded as the agent's own completed action, the same value dropped recovery to 43.70%, a change of −6.43 pp against the unedited record.

The gap between the two effects, D = +21.63 pp \[18.21, 25.08\], is positive in both receivers. The authors fixed that gap before collection, and the completed-action half is what bears on compaction and repair.

![Figure 2: The sign reversal at a fixed world, on AgentCE- Bench, pooled over gpt-5.5 and claude-sonnet-5 (top) and per receiver. T−N (blue): the truthful note…](https://refivu.com/papers/9f9d54ba-fe02-462d-babe-c0f8a725ef58/figures/figure-955b4d4a9a7b20bf0b942c9778536c50.png?thumb=512)

**Figure 2** : The sign reversal at a fixed world, on AgentCE- Bench, pooled over gpt-5.5 and claude-sonnet-5 (top) and per receiver. T−N (blue): the truthful note against a matched neutral note. F−O (orange): the same value as the agent’s own completed action, against the unedited record. The grey band spans the two marks; the black mark is their gap, D = (T−N)− (F−O). The T−O and F−N rows compare each edit against the other edit’s comparator; the bottom row is the control N−O. Hollow marks an interval that includes zero. Recovery on the look-ahead targets; 95% task-cluster bootstrap intervals.

[Original paper](https://arxiv.org/abs/2611.14654v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

A copying account predicts the falsified record should come out ahead, because the agent can see the correct value in its own call. The falsified arm came out 6.43 pp behind the unedited record, so the value's presence alone doesn't explain the sign. Under the map reading, the loss should land at the slot that the falsified call marks as done.

Most of the truthful gain sits at the slot the note names, at +11.57 pp. The other look-ahead slots gained +3.63 pp, so the gain stays local rather than spreading across the remaining work. On those states, T−N is negative for claude-sonnet-5 and positive for gpt-5.5. They didn't test a false note or a truthful in-place edit, so truth and channel remain confounded.

## Does a success receipt's effect survive a changed world?

On AppWorld, the success receipt's effect depends on whether the database write actually took effect. With the focal effect absent, pooled whole-task success was 28.46% under a success receipt and 45.38% under a failure receipt. With the effect present, the two receipts gave 48.85% and 38.46%, so the ordering flips. The interaction is +27.31 pp, with interval \[14.23, 41.54\] at 97.5%, and the authors read it for sign.

![Figure 3: A success receipt’s effect flips sign with the world on AppWorld. Each point is the success receipt minus the failure receipt on whole-task success,…](https://refivu.com/papers/9f9d54ba-fe02-462d-babe-c0f8a725ef58/figures/figure-c70ab1b30f120639fc51ea120179cf4c.png?thumb=512)

**Figure 3** : A success receipt’s effect flips sign with the world on AppWorld. Each point is the success receipt minus the failure receipt on whole-task success, with the database step’s effect independently absent or present; the arrow is their in- teraction, read at 97.5%. 95% task-family bootstrap intervals on the two effects; 1,040 continuations over 65 task families, pooled over gpt-5.5 and claude-sonnet-5. Per receiver: Fig- ure 4; cell means: Figure S1.

[Original paper](https://arxiv.org/abs/2611.14654v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

The authors reason that an agent trusting its receipts predicts this sign, while an agent re-checking the world predicts none. They also tracked re-issuing the focal request, a prespecified diagnostic, as a check on how the agent treats its receipt. Under a success receipt, the pooled re-issue rate fell from 52.69% to 10.38% once the effect was present, a drop of 42.31 pp.

They present these as descriptive counts rather than a mediation estimate, and the open rival account is that the failure receipt's claim of no data change drives the rewrite.

Across eight receivers from four providers, the interaction resolves positive in six at 97.5% and in seven at 95%. gpt-4o-mini is the one unresolved receiver, at +2.38 pp with interval \[−6.35, 11.11\] on its 63-family frame. The interaction for claude-sonnet-5 is 23.85 pp smaller than for gpt-5.5, and claude-sonnet-5 sat below the calibration band on AppWorld.

Because the two receivers have different base success rates, the authors claim only that both interactions are positive.

## Limits of the evidence

The AgentCE-Bench step budget bound unevenly, so part of the gap D could reflect steps the budget cut off. Across arms, 71.4% of continuations used all of the budget, from 60.3% under T to 80.1% under F. Truth and channel aren't crossed, so a role effect favouring the note may account for part of the gain.

Its specificity is +4.628 pp \[2.989, 6.317\] at 97.5%, so the prewritten 3 pp margin stays unresolved at its lower bound. The budget confounds displaced effort with specificity in this control, since a non-binding budget would not. The preregistered estimator couldn't run because collection stopped short, so its frames were chosen after collection stopped.

The AppWorld script has never run on the collected data, so every AppWorld figure comes from a reimplementation with the replay gate removed. Two receivers carry the primary result, and the authors don't treat them as a sample of models.

The edits and states are the authors' own choices, so nothing here bounds an adversary. Most of the truthful-note gain sits at the named slot, and the 47 error-outside states show receivers disagreeing in sign.

## Paper info

- **Authors**: Egor Pakhomov, Anurag Koul, Hongjun Liu, Bo Pang, Shafiq Joty, Erik Nijkamp
- **Venue**: arXiv · Preprint
- **First published**: 2026-11-10
- **Added**: 2026-11-13
- **Updated**: 2026-11-10
- **Version**: v1
- **arXiv**: 2611.14654
- **Category**: cs.AI · cs.CL · cs.LG
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2611.14654v1) · [PDF ↗](https://arxiv.org/pdf/2611.14654v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## 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. 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.

## Quote from the paper

Egor Pakhomov, Anurag Koul, Hongjun Liu, Bo Pang, Shafiq Joty, Erik Nijkamp (2026). Cleaning an Agent's History Hurts When the World Still Holds the Error. arXiv:2611.14654v1. https://arxiv.org/abs/2611.14654v1

**BibTeX**

```
@misc{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 = {https://arxiv.org/abs/2611.14654v1}
}
```

## Other paper commentary

- [MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework](https://refivu.com/en/papers/91dd7973-493a-4820-91e2-46a50eb0a70e-metagpt-meta-programming-for-a-multi-agent-collaborative.md)
- [The Surprising Effectiveness of PPO in Cooperative, Multi-Agent Games](https://refivu.com/en/papers/7c9c355e-16b7-49a8-b767-07760b1c48a4-the-surprising-effectiveness-of-ppo-in-cooperative-multi.md)
- [AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation](https://refivu.com/en/papers/d3d2ade6-3bed-4a94-9439-088b61554b00-autogen-enabling-next-gen-llm-applications-via-multi.md)
- [Don't Just Trust Your Memory: Evidence-Linked Memory Reduces Memory-Induced Degradation in LLM Agents](https://refivu.com/en/papers/891cb954-271d-4055-bf45-e2d6d155e372-don-t-just-trust-your-memory-evidence-linked.md)
- [Code-Grounded Agentic Explanations for Static Analysis Vulnerability Findings](https://refivu.com/en/papers/e9fa7593-41df-421f-8615-e0870316904f-code-grounded-agentic-explanations-for-static-analysis.md)
- [Agent Benchmarks Stop Ranking Before They Run Out of Tasks](https://refivu.com/en/papers/42042bb7-8dd7-415d-a486-d8889c934fed-agent-benchmarks-stop-ranking-before-they-run-out.md)
- [Deep Image Prior](https://refivu.com/en/papers/542749ad-75b2-4484-8b6a-39d3da34ed46-deep-image-prior.md)
- [Competition-Level Code Generation with AlphaCode](https://refivu.com/en/papers/7b324105-8deb-4e3a-903e-e6191ac0fef2-competition-level-code-generation-with-alphacode.md)
- [Hierarchical Neural Story Generation](https://refivu.com/en/papers/90786984-6cb5-4a01-ba2e-d107890942b5-hierarchical-neural-story-generation.md)
- [The Malicious Use of Artificial Intelligence: Forecasting, Prevention, and Mitigation](https://refivu.com/en/papers/0218f522-1eb2-40e8-92ea-845dd07e76f6-the-malicious-use-of-artificial-intelligence-forecasting.md)
- [The One Hundred Layers Tiramisu: Fully Convolutional DenseNets for Semantic Segmentation](https://refivu.com/en/papers/3c8829cf-0ddd-4bc8-9b7c-cfba6d667b61-the-one-hundred-layers-tiramisu-fully-convolutional.md)
- [Self-supervised Graph Learning for Recommendation](https://refivu.com/en/papers/101a7b08-1d43-4cb8-8a03-8ebbce6be79e-self-supervised-graph-learning-for-recommendation.md)

## Terms in this paper

- [GPT-5.5](https://refivu.com/en/terms/fd5f3ee5b099-gpt-5-5)
- [claude-sonnet-5](https://refivu.com/en/terms/0408b245b17e-claude-sonnet-5)
- [neutral note](https://refivu.com/en/terms/dd106e6fdd83-neutral-note)
- [world](https://refivu.com/en/terms/27418ea24366-world)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/9f9d54ba-fe02-462d-babe-c0f8a725ef58-cleaning-an-agent-s-history-hurts-when-the)
