TokenPilot: Cache-Efficient Context Management for LLM Agents

Buqiang Xu, Zirui Xue, Dianmou Chen, Chenyang Fu, Chiyu Wu, Caiying Huang, Chen Jiang, Jizhan Fang, Xinle Deng, Yijun Chen, Yunzhi Yao, Xuehai Wang, Jin Shang, Huajun Chen, Ningyu Zhang


Abstract
As LLM agents are deployed in long-horizon sessions, context accumulation drives up inference costs. Existing approaches utilize text pruning or dynamic memory eviction to minimize token footprints; however, their unconstrained sequence mutations alter layouts, introducing prefix mismatches and cache invalidation. This reveals a critical trade-off between text sparsity and prompt cache continuity. To address this, we present **TokenPilot**, a dual-granularity context management framework. Globally, *Ingestion-Aware Compaction* acts as a framework harness to stabilize prompt prefixes and eliminate open-world environmental noise at the ingestion gate. Locally, *Lifecycle-Aware Eviction* monitors the ongoing residual utility of context segments, enforcing a conservative batch-turn schedule to offload content segments only when task relevance expires. Experiments on ‘PinchBench‘ and ‘Claw-Eval‘ under both isolated and continuous modes demonstrate that TokenPilot reduces costs by **61%** and **56%** in isolated mode, and **61%** and **87%** in continuous mode, while maintaining competitive performance compared to prior systems.
Anthology ID:
2026.findings-emnlp.899
Volume:
Findings of the Association for Computational Linguistics: EMNLP 2026
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
Findings
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
19034–19049
Language:
URL:
https://aclanthology.org/2026.findings-emnlp.899/
DOI:
Bibkey:
Cite (ACL):
Buqiang Xu, Zirui Xue, Dianmou Chen, Chenyang Fu, Chiyu Wu, Caiying Huang, Chen Jiang, Jizhan Fang, Xinle Deng, Yijun Chen, Yunzhi Yao, Xuehai Wang, Jin Shang, Huajun Chen, and Ningyu Zhang. 2026. TokenPilot: Cache-Efficient Context Management for LLM Agents. In Findings of the Association for Computational Linguistics: EMNLP 2026, pages 19034–19049, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
TokenPilot: Cache-Efficient Context Management for LLM Agents (Xu et al., Findings 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.findings-emnlp.899.pdf