arXiv AI By Zerui Yang, Miaomiao Dong, Quan Xue, Chaorui Zhang, Xuanyu Zheng, Xiyuan Wang, Haolin Ruan, Xueyan Niu, Guangcheng Song, Weixi Zhang, Wei Han, Bo Bai

Context Has a Price: Adding and Removing Context for LLM Coding Agents under Prefix Caching

Read the original on arXiv AI →

The paper investigates how adding or removing context in large language model coding agents affects cost and performance. Using over 20,000 runs on SWE‑bench, Loc‑Bench, and Verified, the authors find that retrieved code can reduce read and search commands but may increase overall cost when cached input is cheaper. Removing old observations can either save or increase cost depending on cache pricing, and shorter prompts do not necessarily lead to cheaper runs because agents may take more steps. The study also highlights that shared cached prefixes in concurrent experiments can distort cost comparisons.

Machine-generated by The Flow from the publisher's headline and feed description — not written or checked by a human. The full article lives at arXiv AI.

arXiv AI
Oct 9

Curating Always-Loaded Context for LLM Agents: A Capacitated Assortment Model with Censored Feedback

The paper studies how to curate the fixed context files that large language model agents load at the start of each session. It models this as a capacitated assortment problem, proving bounds on optimal file size and showing that simply appending all positive‑value instructions can be far suboptimal. The authors analyze censored feedback from past sessions, derive evidence‑collection thresholds for adding instructions, bound regret under limited human review, and empirically demonstrate that irrelevant rules in real context files hurt model compliance.

By Zexuan Liu, Yuning Yang, Tiancheng Zhao
arXiv AI
Oct 27

CTXAgent - Self-Controlled Context Management of LLM Agents

The paper introduces CTXAgent, a self‑controlled context management system for large language model agents that compacts conversation history when a token threshold is reached. It evaluates seven frontier models, comparing their ability to manage context with and without dedicated tools, and benchmarks performance across coding, scientific, and software engineering tasks. Results show that well‑managed models keep live context below 100k tokens, maintain high benchmark scores, and achieve significant cost reductions, with Claude Opus 5.5 outperforming its explicit configuration by 34% lower cost.

By Matthias Busch, Marius Tacke, Roland C. Aydin, Christian Feiler, Christian J. Cyron
arXiv Computation and Language
Oct 21

Cache Engineering for Agents

The paper introduces cache engineering for large language model agents, enabling direct control over the active key-value cache without altering the trajectory or triggering costly re-prefilling. It defines cache operations such as drop and repos, formalizes their effects, and addresses the challenge of history-dependent cache states. The authors co-design a stateless AKV serving engine that manages stateful cache reuse, eviction, and restoration, achieving significant performance and cost improvements over traditional summarization methods.

By Tianyu Fu, Ruoxi Wang, Zihan Min, Zhongqi Ren, Zhihao Li, Tengxuan Liu, Shengxu Mu, Hanling Zhang, Yu Wang