Pruning context to recent tool calls improves agent reliability and efficiency

Selective retention of the last five tool interactions plus automated summarization achieves 91.6% task completion in an enterprise expense itemization workflow, outperforming full-history retention.

PaperIndependentcs.AIarXiv:2606.10209v1
Abhilasha Lodha · Mahsa Pahlavikhah Varnosfaderani · Abir Chakraborty · Abhinav Mithal
Research Digest··2 min read
The authors test four context engineering strategies for GPT-5 agents using Model Context Protocol tools on a 50-task hotel expense benchmark. They find that pruning context to the last five tool call/response pairs and adding automated summarization yields the best results: 91.6% complete itemization, 99.64% amount itemized, with 63% fewer tokens and 60% less runtime than retaining full conversation history.

What they did

The study focuses on automated expense itemization in Microsoft Dynamics 365 Finance and Operations. They built a benchmark of 50 hotel expense tasks. They evaluate five GPT-5 configurations (including a no-user-model baseline) plus a cross-model test with Claude Sonnet 4.5. The key comparison is between full-context retention (baseline), pruning to last 5 tool call/response pairs, and pruning with summarization (summary window of 3). Results are averaged over 5 runs.

Key findings

  • Full-context retention achieves 71.0% complete itemization but consumes 1,480,996 tokens and 14.56 hours per benchmark.
  • Pruning to last 5 tool calls improves completion to 79.0% while reducing token use to 535,274 and runtime to 5.39 hours.
  • Adding summarization to the pruned context further boosts completion to 91.6% and amount itemized to 99.64%, using 553,374 tokens and 5.79 hours.
  • The no-user-model baseline achieves only 8.0% completion, highlighting the importance of the user model.

Why it matters

This work demonstrates that for tool-using agents, retaining full conversation history is not only costly but can hurt performance. Selective retention and compact summarization can improve both reliability and efficiency, offering a practical recipe for deploying enterprise agents at scale.

Caveats

The study is limited to a single domain (hotel expense itemization) and one enterprise system (D365 F&O). The benchmark size is modest (50 tasks). Results may not generalize to workflows with more diverse tool calls or longer horizons. The summarization method is not disclosed in detail; its performance may depend on the specific summarization technique.

§

Analysis

The paper challenges the default assumption that more context is always better for LLM agents. This aligns with findings in retrieval-augmented generation where selective context retrieval outperforms full context. The results suggest that recent interactions and concise summaries are more useful than exhaustively including all history. The cross-model evidence with Claude Sonnet 4.5 (not detailed but mentioned) adds some generality.

newspaper

Research Digest

Articles published under the Zotpaper byline are synthesized from multiple source publications by our AI editor and reviewed by our editorial process. Each story combines reporting from credible outlets to give readers a balanced, comprehensive view.