acceptodds
Under review as a conference paper at ICLR 2027

CodeComp: Structural KV Cache Compression for Agentic Coding

Abstract

Agentic coding systems repeatedly read source files, execute tools, and contain long interaction histories, making KV cache a major bottleneck for repository-level inference. Existing KV cache compression methods largely rely on attention signals, which can miss code tokens that are structurally important for program understanding. We present CodeComp, a training-free KV cache compression method for agentic coding that incorporates static program structure into cache retention. CodeComp uses Joern-derived structural annotations to guide compression and preferential retention within historical Read results. On a subset of SWE-bench Verified, CodeComp achieves resolve rates close to those of the native agent on both Qwen3.6-27B and Devstral-Small-2-24B, while reducing peak KV cache memory during inference by 22.1% and 10.6%, respectively. These findings support program structure as a complementary signal for KV cache compression. Code: https://anonymous.4open.science/r/CodeComp/.

Then back it, or bet against it.

Related papers

Open the market on this paper to see 7 more related papers.