AgentSwing: Adaptive Parallel Context Management Routing for Long-Horizon Web Agents

Zhaopeng Feng, Liangcai Su, Zhen Zhang, Xinyu Wang, Xiaotian Zhang +14 more
3/29/2026
cs.CLcs.AIcs.MA

No confident code implementation found for this paper.

Abstract

As large language models (LLMs) evolve into autonomous agents for long-horizon information-seeking, managing finite context capacity has become a critical bottleneck. Existing context management methods typically commit to a single fixed strategy throughout the entire trajectory. Such static designs may work well in some states, but they cannot adapt as the usefulness and reliability of the accumulated context evolve during long-horizon search. To formalize this challenge, we introduce a probabilistic framework that characterizes long-horizon success through two complementary dimensions: search efficiency and terminal precision. Building on this perspective, we propose AgentSwing, a state-aware adaptive parallel context management routing framework. At each trigger point, AgentSwing expands multiple context-managed branches in parallel and uses lookahead routing to select the most promising continuation. Experiments across diverse benchmarks and agent backbones show that AgentSwing consistently outperforms strong static context management methods, often matching or exceeding their performance with up to $3\times$ fewer interaction turns while also improving the ultimate performance ceiling of long-horizon web agents. Beyond the empirical gains, the proposed probabilistic framework provides a principled lens for analyzing and designing future context management strategies for long-horizon agents.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{feng2026agentswing,
  title  = {AgentSwing: Adaptive Parallel Context Management Routing for Long-Horizon Web Agents},
  author = {Zhaopeng Feng and Liangcai Su and Zhen Zhang and Xinyu Wang and Xiaotian Zhang and Xiaobin Wang and Runnan Fang and Qi Zhang and Baixuan Li and Shihao Cai and Rui Ye and Hui Chen and Jiang Yong and Joey Tianyi Zhou and Chenxiong Qian and Pengjun Xie and Bryan Hooi and Zuozhu Liu and Jingren Zhou},
  year   = {2026},
  eprint = {2603.27490},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2603.27490v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2603.27490.svg)](https://codeofpaper.com/paper/2603.27490)

Discussion