CodeComp: Structural KV Cache Compression for Agentic Coding
arXiv cs.CL / 4/14/2026
📰 NewsDeveloper Stack & InfrastructureIdeas & Deep AnalysisModels & Research
Key Points
- CodeComp addresses the problem that agentic coding tasks over long codebases are bottlenecked by the LLM KV cache under limited memory, making KV compression a key lever for inference efficiency.
- Prior attention-only KV compression can incorrectly discard structurally critical code tokens (e.g., call sites, branch conditions, assignments) that are important for program understanding.
- CodeComp is a training-free compression method that injects static program analysis into inference by building Code Property Graph priors extracted with Joern.
- Experiments on bug localization and patch generation benchmarks show CodeComp outperforms attention-only compression baselines with equal memory budgets and recovers most full-context accuracy under aggressive compression.
- The approach is reported to integrate seamlessly into SGLang-based agentic coding pipelines without any model modification.
💡 Insights using this article
This article is featured in our daily AI news digest — key takeaways and action items at a glance.

![[Patterns] AI Agent Error Handling That Actually Works](/_next/image?url=https%3A%2F%2Fmedia2.dev.to%2Fdynamic%2Fimage%2Fwidth%3D1200%2Cheight%3D627%2Cfit%3Dcover%2Cgravity%3Dauto%2Cformat%3Dauto%2Fhttps%253A%252F%252Fdev-to-uploads.s3.amazonaws.com%252Fuploads%252Farticles%252Frn5czaopq2vzo7cglady.png&w=3840&q=75)

