Coding agents5 February 2026arXiv:2602.05892
ContextBench: A Benchmark for Context Retrieval in Coding Agents
Han Li, Letian Zhu, Bohan Zhang, Rili Feng, Jiaming Wang, Yue Pan, Earl T. Barr, Federica Sarro et al.
TL;DR
ContextBench evaluates how well coding agents retrieve the right code context during a task, not just whether they finish.
Why builders should care
Many coding-agent failures start with the wrong context. Measure retrieval directly.
How to apply it
- 1.Log which files your agent reads per task and compare against the files the fix actually touched.
Key results
Quoted from the abstract- ContextBench consists of 1,136 issue-resolution tasks from 66 repositories across eight programming languages, each augmented with human-annotated gold contexts.
- Our results show that sophisticated agent scaffolding yields only marginal gains in context retrieval ("The Bitter Lesson" of coding agents), LLMs consistently favor recall over precision, and substantial gaps exist between explored and utilized context.