CADOC: Cache-Aware Dynamic Object Context for Long-Horizon Agents

📅 2026-09-29
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
This study addresses the degradation of reasoning capabilities and the failure of prefix caching in long-horizon agents caused by context bloat. To mitigate these issues, this work proposes an online reversible compression algorithm that substitutes structured objects with compact cards to reduce prompt length while preserving on-demand retrieval of original content. Furthermore, it introduces a novel cache-aware scheduling mechanism grounded in the Economic Order Quantity (EOQ) model, which achieves theoretically optimal batch editing by balancing waiting costs against reconstruction overhead. Experimental results demonstrate that the proposed approach reduces input token consumption by 40% on average while maintaining task performance comparable to full-context baselines, thereby enabling efficient dynamic context management for long-horizon agents.
📝 Abstract
For a long-horizon agent, context is the bottleneck: the history is resent with every request, the window caps task length, and reasoning degrades as the history grows. Replacing structured objects with compact retrieval Cards shortens the prompt and keeps the exact originals retrievable, but editing the history can break prefix-cache reuse, and prior recoverable methods time their edits by forecasts of future reuse or by preset intervals. We propose CADOC (Cache-Aware Dynamic Object Context), an online algorithm that replaces structured objects with compact Cards while preserving exact, on-demand retrieval of their original contents. CADOC schedules replacements in batches by balancing accumulated waiting cost against shared cache-reconstruction cost. Its scheduling rule follows from an economic order quantity trade-off, recovers the optimal integer batch under stationary assumptions. Across evaluation, CADOC consistently achieves the lowest aggregate input cost among the compared configurations, which reduces input cost by approximately 40\% on average while maintaining task performance close to full context. CADOC thus provides a cost-derived approach to compressible context management, demonstrating that efficient compression depends not only on shortening prompts but also on scheduling edits to preserve cache reuse.
Problem

Research questions and friction points this paper is trying to address.

long-horizon agents
context management
prefix cache reuse
prompt compression
input cost reduction
Innovation

Methods, ideas, or system contributions that make the work stand out.

Cache-Aware Context Management
Dynamic Object Compression
Long-Horizon Agents
Economic Order Quantity (EOQ)
Prefix Cache Reuse
Junjie Yao
Junjie Yao
Shanghai Jiao Tong University
Z
Zhangchen Zhou
School of Mathematical Sciences, Shanghai Jiao Tong University, Shanghai, China.
Z
Zhi-Qin John Xu
School of Mathematical Sciences, Shanghai Jiao Tong University, Shanghai, China.; Institute of Natural Sciences, Shanghai Jiao Tong University, Shanghai, China.