
Hriday Ampavatina, Magdalini Eirinaki · arXiv 2026 · 2026
DOI: 10.48550/arxiv.2612.00909
Counts differ because each database indexes a different set of publications. We treat OpenAlex as the canonical count; Google Scholar is not shown (no API, and crawling it violates its ToS).
Large Language Model (LLM) agents run long sessions that all begin with the same system prompt, which holds the agent's instructions and the documentation of its tools. Serving engines store this shared prefix once for all sessions, so removing it from the key-value (KV) cache of one session frees no memory, but the session loses the documentation that the agent needs to call its tools. Published KV-cache eviction policies treat every cached token the same way against the memory budget, so they remove the shared prefix like any other text. In this paper, we measure seven published eviction policies on recorded sessions of SWE-agent, a coding agent, and we count the memory of each session the way a serving engine does, with the shared prefix counted once for all sessions. We test four models of the Qwen2.5 and Llama-3.1 families, with 1.5 to 14 billion parameters. When a session keeps an eighth of its cache, four of the policies, which choose tokens by attention or by position, keep at most 14% of the shared prefix, and the model can rarely recall how to call its tools. Under prefix caching, keeping the whole prefix costs no extra memory per session, and it lets the model recall its tool documentation in nearly every case. Keeping the prefix also improves how often the agent's next commands follow the command format documented in the system prompt by 10 to 22 percentage points on three models. For five of the six policies that we test on recall, it never significantly lowers the recall of facts from the session's own history (the part of its input after the shared prefix). Our results show that a serving engine with prefix caching can keep the shared prefix out of eviction at no memory cost, and that the agent then recalls its tool documentation and writes valid commands more often.
arXiv (Cornell University) 2026 · 2026 · 0 citations95% match
arXiv (Cornell University) 2026 · 2026 · 0 citations95% match
DROPS (Schloss Dagstuhl – Leibniz Center for Informatics) 2023 · 2023 · 79073 citations90% match
Journal of Machine Learning Research 2003 · 2003 · 27075 citations90% match
2014 · 24939 citations90% match
2001 · 21904 citations90% match
arXiv (Cornell University) 2013 · 2013 · 18054 citations95% match
No comments yet — start the discussion below.
arXiv (Cornell University) 2014 · 2014 · 14617 citations95% match
Communications of the ACM 1995 · 1995 · 14194 citations90% match
Journal of Cross-Cultural Psychology 1970 · 1970 · 13711 citations90% match