Semantic Context Handoff with On-Demand Evidence for Long-Horizon Agents
Guolong Zheng, Chen Hou, Xu Yang, Jianshan Zhang, Tao Huang
Abstract
Traditional long-horizon LLM agents often hand off context through full-history prompting, retaining all previous action--observation interactions. As execution proceeds, this history keeps growing, increasing inference cost and potentially degrading accuracy. Existing methods control this growth by preserving compact conclusions while removing earlier observations, but doing so can discard evidence that later becomes relevant. We introduce Semantic Context Handoff (SCH), whose central abstraction is state--evidence separation: a compact semantic state carries the agent's current interpretation, while supporting action--observation evidence remains separately addressable and can re-enter context when later execution makes it relevant, without separate summarization or retrieval-model calls. Empirically, SCH improves long-horizon agent performance while substantially reducing context cost. In a controlled 150-task SWE-bench study, SCH's evidence recovery improves Pass@1 from 80.0\% to 86.9\% at essentially unchanged token use and execution time. In the complete-system comparison, SCH achieves 86.9% Pass@1 while using 43% fewer tokens and 41% less wall-clock time than the strongest baseline by task performance. Across models and benchmarks, SCH consistently reduces token use relative to full-history prompting while remaining competitive with or improving upon the evaluated baselines. Trajectory analysis confirms that SCH recovers evidence from substantially earlier parts of the interaction history rather than merely preserving a recent context window.
Create a lesson
Related papers
CompAct-Bench: A Benchmark for Working-Context Compaction in Long-Horizon Agent Tasks
Shared title terminology · Jiayi Chen, Lizhe Chen, Yujia Chen et al.
3D GameDev Arena: Benchmarking Coding Agents That Plan, Build, and Playtest extreme Long-Horizon Browser Games
Shared title terminology · Bizhe Bai, Jiliang Jian, Yuqing Yan et al.
CrossEnv: Synthesizing Verifiable Cross-Environment Tasks for Long-Horizon Agent Training
Shared title terminology · Zhengfeng Yu, Tian Lan, Zhijing Wu et al.
When Are Images Needed in Multimodal Machine Translation? Text-Only Routing for On-Demand Visual Context
Shared title terminology · Xinyu Wang, Yingfeng Luo, Yuxin Gao et al.
Embodied Graph: A Relational World Model for Long-Horizon Tasks
Shared title terminology · Zongyuan Wu, Xin Wang, Tongtong Feng et al.
Evidence sufficiency assessment enables cost-effective review allocation in on-premise clinical AI agents
Shared title terminology · Yiwen Qiu, Che Sun, Shu Shen et al.