ContextBench: A Benchmark for Context Retrieval in Coding Agents (2026)
FreeFirst benchmark focused on whether coding agents retrieve the right repository context before editing — measures relevance, latency, and downstream task success under realistic codebase navigation pressure
About ContextBench: A Benchmark for Context Retrieval in Coding Agents (2026)
ContextBench is a process-oriented benchmark designed to evaluate how LLM-based coding agents retrieve and use code context during automated issue resolution. It comprises 1,136 issue-resolution tasks sourced from 66 open-source repositories spanning eight programming languages, each augmented with human-annotated gold contexts. The benchmark includes an automated evaluation framework that tracks agent trajectories and measures context recall, precision, and efficiency throughout the resolution process. It evaluates four frontier LLMs and five coding agents, revealing that sophisticated agent scaffolding yields marginal gains in context retrieval, LLMs consistently favor recall over precision, and there are substantial gaps between explored and utilized context. ContextBench provides intermediate gold-context metrics that complement existing end-to-end benchmarks, offering valuable signals for understanding and improving LLM reasoning in software tasks.
Key Features
Pros & Cons
- First benchmark specifically targeting the context retrieval process in coding agents
- Includes human-annotated gold contexts for reliable ground truth
- Large scale: 1,136 tasks from 66 diverse repositories in 8 languages
- Provides intermediate process-oriented metrics (recall, precision, efficiency) in addition to end-task success
- Automated evaluation framework ensures reproducibility and fair comparison
- Limited to coding agent context retrieval; does not cover other aspects of code generation or debugging
- Findings indicate current agents have only marginal gains from sophisticated scaffolding, highlighting limitations of existing methods
- Benchmark tasks may not fully represent real-world codebase navigation complexity
- Requires access to LLM APIs or local model deployment to run evaluations