Cleaning an Agent's History Hurts When the World Still Holds the Error
Organizations: Salesforce AI Research USA
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.
Figures & tables
| Contrast (look-ahead endpoint) | pp [95%] |
|---|---|
| T N, all 319 states | +15.20 [12.46, 18.00] |
| part at the slot the note names | +11.57 [9.85, 13.43] |
| part at the other look-ahead slots | +3.63 [1.67, 5.64] |
| unmentioned slots, renormalised | +5.75 [2.56, 8.93] |
| F O, all 319 states | 6.43 [ 8.88, 3.97] |
| part at the slot the edit names | 2.30 [ 3.68, 0.97] |
Appendix figures & tables22 assets
Supplementary material from the paper’s appendix.
Appendix
| Design | Benchmark | Receivers |
|---|---|---|
| Four-arm design | AgentCE-Bench | gpt-5.5 , claude-sonnet-5 |
| Targeted control | AgentCE-Bench | gpt-5.5 , claude-sonnet-5 |
| Channel decomposition | AgentCE-Bench | gpt-5.5 , claude-sonnet-5 |
| Record × world factorial | AgentCE-Bench | gpt-5.5 , claude-sonnet-5 , gpt-5.6-sol |
| Record × world crossing | AppWorld | gpt-5.5 , claude-sonnet-5 |
| Receiver expansion | AppWorld | adds gemini-3.1-pro-preview , grok-4.6 , gpt-5 , gpt-5-mini , gpt-4o-mini , gpt-4o : eight receivers in four families |
| Design | Delivered / planned | Blocks | Frame |
|---|---|---|---|
| Four-arm design | 638 complete blocks over 319 states, four continuations each | — | complete |
| Targeted control | 4,068 of 4,320 units | 452 of 480 | 189 never collected; 63 permanently held (§ E.2 ) |
| Record × world crossing | 1,040 of 1,040 units | 260 of 260 | complete; 65 families × 2 receivers × 2 repetitions × 4 arms |
| Expansion: gemini-3.1-pro-preview | 520 of 520 | 130 of 130 | own frame 65 families |
| Expansion: grok-4.6 | 504 analysed / 512 delivered / 520 planned | 128 of 130 | 63 of 65 families; own frame = shared frame |
| Expansion: gpt-5 , gpt-5-mini | 1,040 of 1,040 (two receivers) | 260 of 260 | 65 families each |
| Arm | Packet name | What it holds |
|---|---|---|
| O | own__self | the agent’s own history, unedited; the world carries the error’s consequence |
| F | history_healed__world_consequence__matched | the history rewritten so the error never appears, against the unchanged wrong world; the world still carries the consequence |
| T | e29-truthful__self | the history preserved byte-for-byte, plus one trailing truthful retrospective correction |
| N | e29-neutral__self | the history preserved byte-for-byte, plus one trailing content-neutral note, length-matched to T |
| Contrast | Scope | Estimate | 95% interval | Resolution |
|---|---|---|---|---|
| T − N | pooled | +15.20 pp | [+12.46, +18.00] | positive |
| gpt-5.5 | +15.94 pp | [+12.75, +19.17] | positive | |
| claude-sonnet-5 | +14.47 pp | [+10.82, +18.18] | positive | |
| F − O | pooled | −6.43 pp | [−8.88, −3.97] | negative |
| gpt-5.5 | −8.10 pp | [−11.44, −4.65] | negative | |
| claude-sonnet-5 | −4.75 pp | [−8.05, −1.52] | negative |
| Contrast | Estimate | 95% interval | Resolution |
|---|---|---|---|
| N − O | +0.44 pp | [−1.36, +2.32] | unresolved |
| T − O | +15.65 pp | [+13.06, +18.31] | positive |
| Cell | Record the agent sees | World it acts in |
|---|---|---|
| S_pre | receipt says the mutation succeeded | effect absent (database before the step) |
| S_post | receipt says the mutation succeeded | effect present (database after the step) |
| F_pre | receipt says the mutation failed | effect absent (database before the step) |
| F_post | receipt says the mutation failed | effect present (database after the step) |
| Scope | S_pre | S_post | F_pre | F_post |
|---|---|---|---|---|
| pooled | 28.46 | 48.85 | 45.38 | 38.46 |
| gpt-5.5 | 40.77 | 69.23 | 66.92 | 56.15 |
| claude-sonnet-5 | 16.15 | 28.46 | 23.85 | 20.77 |
| Contrast | Scope | Estimate | Interval | Level | Resolution |
|---|---|---|---|---|---|
| interaction | pooled | +27.31 pp | [+14.23, +41.54] | 97.5% | positive |
| gpt-5.5 | +39.23 pp | [+23.08, +56.15] | 95% | positive | |
| claude-sonnet-5 | +15.38 pp | [+3.85, +27.69] | 95% | positive | |
| record effect, world pre | pooled | −16.92 pp | [−24.62, −9.62] | 95% | negative |
| gpt-5.5 | −26.15 pp | [−38.46, −13.85] | 95% | negative | |
| claude-sonnet-5 | −7.69 pp | [−14.62, −1.54] | 95% | negative |
| Re-issued the focal request | Frame | S_pre | S_post | F_pre | F_post |
|---|---|---|---|---|---|
| gpt-5.5 | 65 fam. | 50.8 [39.2, 62.3] | 16.2 [9.2, 23.8] | 46.2 [36.2, 56.2] | 16.2 [9.2, 23.8] |
| claude-sonnet-5 | 65 fam. | 54.6 [43.8, 64.6] | 4.6 [0.8, 9.2] | 90.8 [84.6, 96.2] | 53.1 [41.5, 64.6] |
| gemini-3.1-pro-preview | shared 63 | 30.2 [19.8, 40.5] | 9.5 [4.0, 15.9] | 61.1 [50.8, 70.6] | 27.0 [17.5, 37.3] |
| grok-4.6 | shared 63 | 65.9 [54.8, 77.0] | 6.3 [2.4, 10.3] | 86.5 [78.6, 93.7] | 53.2 [42.1, 64.3] |
| gpt-5 | shared 63 | 65.9 [55.6, 76.2] | 31.0 [19.8, 42.1] | 58.7 [47.6, 69.0] | 26.2 [16.7, 35.7] |
| gpt-5-mini | shared 63 | 72.2 [61.9, 81.7] | 43.7 [32.5, 54.8] | 75.4 [66.7, 83.3] | 42.1 [31.7, 52.4] |
| Wrote an exact copy of the focal record | S_pre | S_post | F_pre | F_post |
|---|---|---|---|---|
| gpt-5.5 | 53.8 [38.6, 68.8] | 11.2 [3.8, 20.2] | 70.0 [56.4, 82.4] | 18.8 [8.6, 30.4] |
| claude-sonnet-5 | 55.0 [40.0, 69.5] | 3.8 [0.0, 10.0] | 91.2 [82.6, 97.8] | 51.2 [35.9, 66.7] |
| Receiver | Family | Frame | Interaction | 95% interval | Verdict |
|---|---|---|---|---|---|
| gpt-5.5 | OpenAI | 65 families | +39.23 pp | [23.08, 56.15] | positive |
| claude-sonnet-5 | Anthropic | 65 families | +15.38 pp | [3.85, 27.69] | positive |
| gemini-3.1-pro-preview | 63 shared | +61.90 pp | [46.03, 77.78] | positive | |
| grok-4.6 | xAI | 63 shared | +43.65 pp | [28.57, 59.52] | positive |
| gpt-5-mini | OpenAI | 63 shared | +23.81 pp | [14.29, 34.13] | positive |
| gpt-5 | OpenAI | 63 shared | +16.67 pp | [0.79, 32.54] | positive |
| Receiver | Units | Interaction | Record effect, pre | Record effect, post | World effect, success record | World effect, failure record |
|---|---|---|---|---|---|---|
| gemini-3.1-pro-preview | 520, 65 fam. | +60.00 [+44.62, +76.15] | −43.85 [−55.38, −32.31] | +16.15 [+7.69, +25.38] | +50.00 [+37.69, +62.31] | −10.00 [−18.46, −1.54] |
| grok-4.6 | 504, 63 fam. | +43.65 [+28.57, +59.52] | −28.57 [−38.89, −19.05] | +15.08 [+5.56, +24.60] | +26.98 [+16.67, +38.10] | −16.67 [−25.40, −7.94] |
| gpt-5-mini | 520, 65 fam. | +23.85 [+14.62, +33.85] | −14.62 [−22.31, −7.69] | +9.23 [+3.08, +15.38] | −0.77 [−10.77, +9.23] unresolved | −24.62 [−34.62, −15.38] |
| gpt-5 | 520, 65 fam. | +15.38 [+0.77, +30.77] | −10.00 [−20.00, −0.77] | +5.38 [−4.62, +16.15] unresolved | +8.46 [+0.00, +16.92] | −6.92 [−17.69, +3.85] unresolved |
| gpt-4o | 520, 65 fam. | +60.00 [+41.54, +79.23] | −41.54 [−53.08, −30.77] | +18.46 [+8.46, +29.23] | +46.15 [+33.85, +57.69] | −13.85 [−24.62, −3.08] |
| gpt-4o-mini | 520, 65 fam. | +1.54 [−6.92, +10.77] unresolved | +1.54 [−6.15, +9.23] unresolved | +3.08 [−2.31, +9.23] unresolved | −10.00 [−20.77, +0.00] unresolved | −11.54 [−20.77, −2.31] |
| Quantity | Value |
|---|---|
| Planned | 4,320 units in 480 blocks, 240 checkpoints |
| Analysed | 4,068 units in 452 blocks |
| Never collected | 189 units in 21 blocks |
| Permanently held | 63 units in 7 blocks |
| Contrast | Scope | Estimate | Interval | Level | Resolution |
|---|---|---|---|---|---|
| specificity (primary) | pooled | +4.628 pp | [+2.989, +6.317] | 97.5% | positive |
| gpt-5.5 | +5.800 pp | [+3.814, +7.865] | 95% | positive | |
| claude-sonnet-5 | +3.456 pp | [+1.312, +5.477] | 95% | positive | |
| corresponding attenuation | pooled | +3.282 pp | [+0.938, +5.684] | 95% | positive |
| gpt-5.5 | +3.039 pp | [+0.336, +5.675] | 95% | positive | |
| claude-sonnet-5 | +3.525 pp | [+0.028, +7.092] | 95% | positive |
| Measure | Estimate | Interval | Level | Resolution |
|---|---|---|---|---|
| steps used | −0.297 steps | [−0.502, −0.108] | 97.5% | negative |
| hit horizon | −0.026 proportion | [−0.046, −0.008] | 97.5% | negative |
| touches the common cell | +1.667 steps | [+1.223, +2.127] | 97.5% | positive |
| Contrast | Scope | Estimate | Interval | Resolution |
|---|---|---|---|---|
| flag − neutral ( primary , Bonferroni two-comparison) | pooled | +1.62 pp | [−1.04, +4.36] at 97.5% | unresolved |
| gpt-5.5 | +3.50 pp | [+0.47, +6.53] | positive | |
| claude-sonnet-5 | −0.26 pp | [−3.50, +2.82] | unresolved | |
| full − answer | pooled | +4.75 pp | [+2.72, +6.79] | positive |
| gpt-5.5 | −0.21 pp | [−2.40, +1.99] | unresolved | |
| claude-sonnet-5 | +9.72 pp | [+6.58, +12.96] | positive |
| Contrast | pooled | gpt-5.5 | claude-sonnet-5 | gpt-5.6-sol |
|---|---|---|---|---|
| rewrite − original, world unrepaired | −5.54 [−8.08, −3.15] | −6.02 [−9.51, −2.55] | −5.06 [−8.71, −1.48] | −11.58 [−15.55, −7.65] |
| rewrite − original, world repaired | −1.64 [−4.25, +0.97] unres. | −5.47 [−9.39, −1.76] | +2.20 [−1.44, +5.87] unres. | −7.46 [−11.00, −3.84] |
| world repair under original history | +3.08 [+0.77, +5.39] | +2.41 [−0.61, +5.47] unres. | +3.74 [+0.22, +7.32] | +2.45 [−0.90, +5.84] unres. |
| world repair under rewritten history | +6.98 [+4.31, +9.70] | +2.96 [−0.70, +6.65] unres. | +11.00 [+6.87, +15.13] | +6.56 [+2.64, +10.58] |
| Collection | Units re-derived | Agreements | Label split (success / failure) |
|---|---|---|---|
| Record × world crossing | 1,040 | 1,040 | 419 / 621 |
| Expansion: gemini-3.1-pro-preview | 520 | 520 | 326 / 194 |
| Expansion: grok-4.6 | 512 | 512 | 413 / 99 |
| Expansion: gpt-5 | 520 | 520 | 228 / 292 |
| Expansion: gpt-5-mini | 520 | 520 | 225 / 295 |
| Expansion: gpt-4o | 520 | 520 | 210 / 310 |
| Dimension | Count |
|---|---|
| a: the record and the world treated as two separable objects | 91 of 360 |
| b: what the agent is shown varied while the underlying world state is held fixed | 53 of 360 |
| a ∧ b: both | 23 of 360 |
| c: the matched append control (five attributes) | 0 of 360 |
| d: what a record reveals held apart from what it asserts | 3 of 360, one only partially ( Gumaan, 2026 ; Panickssery et al., 2024 ; Hu and Ramachandran, 2026 ) |
| a ∧ b ∧ (c ∨ d): the conjunction the positioning argument rests on | 0 of 360 |
| Model id | Manifests naming it (of 65) |
|---|---|
| claude-opus-5-5 | 59 |
| claude-fable-5-1 | 58 |
| gpt-6-sol | 58 |
| claude-opus-4-8 | 58 |
| gemini-3.1-pro-preview | 2 |
LLM Agent Reliability
Large language model (LLM) agent reliability concerns dependable, safe, and verifiable behavior across tools, multi-step tasks, and changing environments.
See all 909 papers