Why did pruning history improve both cost and completion?

Abhilasha Lodha et al. · 1 authors · Microsoft · 2026 · arXiv:2606.10209

Why did pruning history improve both cost and completion?

Opening

An agent wired into your business systems inherits every verbose tool response those systems return, and the window fills with data nobody asked for. The usual instinct is to keep everything, on the theory that more context means fewer mistakes. This paper tests that instinct on a real back-office task and reports what full retention costs once the tokens and the clock are counted.

What the paper does

The study runs automated expense itemization in Microsoft Dynamics 365 Finance and Operations using Model Context Protocol tools, comparing four GPT-5 configurations on a 50-task hotel expense benchmark: no user model, full conversation history, pruning to the last 5 tool call and response pairs, and pruning with automated summarization. Results are averaged across 5 independent runs, with the user model held constant for the comparison.

Findings

  1. Verbose tool responses are the root problem — Enterprise tool output causes context overflow, stale-state errors, and high inference cost before any memory design gets a chance to help.

verbose tool responses from enterprise systems can cause context overflow, stale-state errors, and high inference cost

  1. Full history is expensive and merely adequate — Retaining everything lifted completion to 71.0%, but at 1,480,996 tokens and 14.56 hours per benchmark.

Full-context retention improves completion to 71.0%, but consumes 1,480,996 tokens and 14.56 hours per benchmark

  1. Pruning to recent calls beats keeping everything — The last 5 tool calls alone reached 79.0% completion while cutting token use to 535,274 and runtime to 5.39 hours.

Pruning to the last 5 tool calls improves completion to 79.0% while reducing token use to 535,274 and runtime to 5.39 hours

  1. Pruning plus summarization is the best result — 91.6% complete itemization and 99.64% of the average amount itemized, achieved with 553,374 tokens and 5.79 hours.

Adding summarization achieves the best result: 91.6% complete itemization and 99.64% average amount itemized

Caveat

This is one enterprise workflow, hotel expense itemization in Microsoft Dynamics 365 Finance and Operations, with four GPT-5 configurations on a 50-task benchmark, so the pruning window is a starting point to tune rather than a universal default.

What this means for 5ac

This is the closest published analogue to an SMB back-office agent, and the recipe transfers directly: keep recent tool interactions, summarize the rest, and expect to finish more work for less spend at the same time. Treat the window size as a dial rather than a law. Start with a small number of recent calls, layer summarization on top, and measure completion and tokens on your own tasks before and after, because the exact cutoff that worked here is a number to test locally.

Source