arXiv cs.AI· Fernando Vallecillos-Ruiz, Islem Bouzenia, Michael Pradel, Leon Moonen·· 4 小时前精选AI 评分60
论文研究软件工程 Agent 轨迹删除的效果与隐藏成本
The Hidden Costs of Forgetting: A Study of Trajectory Deletion in Software Engineering Agents
AI 导读
arXiv 论文(arXiv:2610.35496)对软件工程 Agent 的轨迹删除做了实证研究,覆盖 42 种轨迹缩减配置、两个 SOTA Agent 在 SWE-bench Verified 上的 9,400 次运行。
推荐理由
该实证研究用 9400 次运行揭示轨迹删除节省 token 却可能推高成本,为 Agent 成本优化提供了可迁移的定价模型视角。
正文 · 原文
Abstract:Software engineering agents resend their entire trajectory to an LLM at every turn, motivating online trajectory reduction. Prior work shows that randomly deleting 75% of tokens in old turns may preserve agent effectiveness, but it remains unclear why, how agents compensate for missing content, and whether it actually reduces costs. This paper presents an empirical study of 42 trajectory-reduction configurations, focusing on effectiveness, agent behavior, and cost. We systematically explore deleting content from old turns by varying the scope, granularity, amount, and timing of deletion across 9,400 runs with two state-of-the-art agents on SWE-bench Verified. We find deleting large amounts of trajectory content (e.g., up to 100% of reasoning text) can preserve overall effectiveness. Importantly, such deletion must be applied with a delay, as immediate deletion tends to significantly degrade effectiveness. Agents often compensate for deleted content by re-fetching it, increasing both the number of turns taken and the input/output tokens. Whether trajectory reduction reduces costs depends on the pricing model: Under a flat pricing model, estimated costs fall in 26 of 42 evaluations. Surprisingly, under a caching-aware pricing model, zero evaluations yield lower costs, since reducing the trajectory breaks the cached prefix billed at a lower rate. Our findings have three implications: First, token counts alone are misleading; trajectory reduction techniques must consider overall costs under a realistic pricing model. Second, analyzing trajectories is crucial to understand agent behavior, as end-to-end effectiveness hides differences such as excessive re-fetching. Finally, these results highlight the need for future work on memory management to reduce costs without sacrificing effectiveness.
| Subjects: | Software Engineering (cs.SE); Artificial Intelligence (cs.AI) |
| Cite as: | arXiv:2610.35496 [cs.SE] |
| (or arXiv:2610.35496v1 [cs.SE] for this version) | |
| https://doi.org/10.48550/arXiv.2610.35496 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Fernando Vallecillos-Ruiz [view email]
[v1]
Mon, 26 Oct 2026 14:25:17 UTC (256 KB)
来源:arXiv cs.AI · arxiv.org