cs.AIAug 16, 2026

HyMem: Hierarchical Context Management for Long-Horizon Agents via Information Isolation

Authors: XinQi Wang, Jinwei Xiao, Sijia Cui, Hongming Zhang, Yanna Wang, Qingyang Zhang, Bo Xu

Organizations: National Key Laboratory of Cognition and Decision Intelligence for Complex Systems, Institute of Automation, Chinese Academy of Sciences · University of Chinese Academy of Sciences · Nanjing Artificial Intelligence Research of IA

Abstract

Large language model (LLM) agents often perform poorly on complex, long-horizon tasks because their context becomes increasingly cluttered over time. As interactions accumulate, detailed execution traces and intermediate outputs dominate the context, making it difficult for the model to retain and use high-level planning information. Most existing methods address this issue through compression or retrieval applied to a single, flat context, which does not clearly separate different types of context information and often leads to degraded reasoning. To address this challenge, we propose HyMem, a hierarchical framework that explicitly separates the agent's context into distinct functional layers. HyMem organizes context by function to separate high-level planning from execution and complex analysis. Its isolated reasoning module handles complex subtasks without adding intermediate reasoning traces to the persistent planning context, while its memory management module preserves task progress across context refreshes through structured summaries. These components reduce redundant context accumulation, retain task-critical information, and support coherent long-horizon reasoning within a limited context window. Experiments on GAIA and Browsecomp-plus show that, with DeepSeek-V4, HyMem achieves average Pass@1 scores of 66.7% and 61.3%, outperforming the strongest baseline by 6.1 and 4.7 percentage points, respectively. Further analysis indicates that HyMem effectively controls the growth of the reasoning context, allowing the model to maintain focus and accuracy across complex, long-horizon tasks.

Figures & tables

Appendix figures & tables4 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Organize then Retrieve: Hierarchical Memory Navigation for Efficient Agents

    Jun 10, 2026Hao-Lun Hsu, Nikki Lijing Kuang, Boyi Liu +2Hierarchical MemoryLong-Horizon Agent Tasks

  2. ActiveMem: Distributed Active Memory for Long-Horizon LLM Reasoning

    Jun 9, 2026Yunhan Jiang, Wenbin Duan, Shasha Guo +3Long-Horizon LLM AgentsAgent Memory Management

  3. Escaping the Context Bottleneck: Active Context Curation for LLM Agents via Reinforcement Learning

    Apr 13, 2026Xiaozhe Li, Tianyi Lyu, Yizhao Yang +6Lost-in-the-Middle EffectLLM Context Management