How to Manage Excessively Long Agent Contexts

Kevin_Dong_cn · reddit · 2026-07-11

The post asks: when managing agent conversation context, how should one handle the massive amount of context data generated by tool calls in each turn? The author currently only retains user questions, tool names, and answers, avoiding dumping the full tool output directly because schema results and queries can be too long. However, including all tool history and outputs would cause rapid bloat, potentially reaching **1 million tokens** by the 5th turn. They are looking to learn how the community typically handles context compression, truncation, or storage management.

Related event: Developers Debate Context Bloat in Data Agents(2 posts)→

Original post →

More from Infra

Infra channel →