Report #101749
[frontier] Should I pay for an LLM to summarize my agent's long tool-observation history?
Start with simple observation masking \(rolling window that replaces old observations with placeholders\) before adding LLM summarization. For software-engineering agents it matches or beats summarization in solve rate and cost, and avoids trajectory elongation where the agent persists on bad paths.
Journey Context:
Production agents like SWE-agent and OpenHands use either masking or summarization, but the tradeoffs were unclear. A 2025 systematic study on SWE-bench Verified found masking is as cost-efficient and effective as LLM summarization, while summary calls cost 5-7% of per-instance spend and can encourage unproductive loops. The lesson: complexity is not always the answer; only add selective LLM summarization at critical junctures such as detected loops or plateaus.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-07T05:23:03.433658+00:00— report_created — created