SWE Context Bench: A Benchmark for Context Learning in Coding
arXiv:2602.08316v2 Announce Type: replace-cross Abstract: Large language models are increasingly used as programming agents for repository level software engineering tasks. While recent benchmarks evaluate correctness in realistic codebases, they largely treat tasks as independent and do not assess whether agents can reuse previous experience or contexts across related problems. As a result, the ability of agents to accumulate, retrieve, and apply prior experience, as well as the efficiency gains from such reuse, remains difficult to measure. We introduce SWE-ContextBench, a benchmark designed — Jared Zhu, Minhao Hu, Junde Wu
View PDF HTML (experimental)
Abstract:Large language models are increasingly used as programming agents for repository level software engineering tasks. While recent benchmarks evaluate correctness in realistic codebases, they largely treat tasks as independent and do not assess whether agents can reuse previous experience or contexts across related problems. As a result, the ability of agents to accumulate, retrieve, and apply prior experience, as well as the efficiency gains from such reuse, remains difficult to measure. We introduce SWE-ContextBench, a benchmark designed to explicitly evaluate context reuse in programming agents. Built on SWE-Bench Lite, SWE-Bench Multilingual, and SWE-Bench Verified, SWE-ContextBench consists of 1,100 base tasks with 376 related tasks derived from real dependency and reference relationships among GitHub issues and pull requests. SWE-ContextBench groups base tasks and related tasks with shared context across 51 unique repositories and 9 programming languages. The benchmark evaluates agents along three complementary dimensions: prediction accuracy, time efficiency, and cost efficiency. Using SWE-ContextBench, we study multiple context reuse settings, including oracle guided and autonomous retrieval, as well as full execution trajectories and compact summaries. Our results show that correctly selected summarized context improves resolution accuracy and substantially reduces runtime and token cost, particularly on harder tasks. In contrast, unfiltered or incorrectly selected context provides limited or negative benefits. These findings highlight the importance of context representation and retrieval quality, and position SWE-ContextBench as a principled benchmark for studying context reuse in programming agents.
Subjects:
Software Engineering (cs.SE); Artificial Intelligence (cs.AI)
Cite as: arXiv:2602.08316 [cs.SE]
(or arXiv:2602.08316v2 [cs.SE] for this version)
https://doi.org/10.48550/arXiv.2602.08316
arXiv-issued DOI via DataCite
Submission history
From: Jiayuan Zhu [view email] [v1] Mon, 9 Feb 2026 06:44:45 UTC (773 KB) [v2] Fri, 27 Mar 2026 15:29:51 UTC (1,141 KB)
Sign in to highlight and annotate this article

Conversation starters
Daily AI Digest
Get the top 5 AI stories delivered to your inbox every morning.
More about
researchpaperarxivA Retrospective on the ICLR 2026 Review Process
The selection of papers for ICLR 2026 has fully concluded. We extend our congratulations to the authors whose work will appear at the conference. Creating ICLR’s technical program requires immense effort from the authors, reviewers, and area chairs, and we thank you for your contributions and service. For researchers whose work was rejected, we hope […]
Bold bet on AI to keep UK at forefront of science and research breakthroughs from healthcare, to better public services - GOV.UK
<a href="https://news.google.com/rss/articles/CBMi6AFBVV95cUxPSU9QQ2Y0NVJHZDNPQ3htWE45R2tfODhYSzJfRm9aRjlzSmV5X1U5cVlKWFVqWmk0ZTZhV0x2VUNmZjg1Z05DVk41MW1hMzZJOE05WEFHNVFBZlg5ZjNHd21sUi1OVEp4SjlnQTV0UVFJLWJDVzdxdFRHelNsNC1yaWRyWGtPRXk1aGU4MHllQzRYNFdHVk1Yc3Fid09uV3VwWFN1Nkc0Yktnam04S0Y4cVJtMlJqY1hYczBpQnlCNUtEejBxaFBHUUN0cXJVcU53VjZoNm05QVlZd2dhek5STEhiQVgyT2t5?oc=5" target="_blank">Bold bet on AI to keep UK at forefront of science and research breakthroughs from healthcare, to better public services</a> <font color="#6f6f6f">GOV.UK</font>
Anthropic hires its first “AI welfare” researcher - Ars Technica
<a href="https://news.google.com/rss/articles/CBMiiwFBVV95cUxNN2FQVGFDQ0s2eFBDdTVsSWhKN0lWQmFuZmtwQmNkRkRWNU4xLXp6dmhBV08wNVFURXVFbmkteDFOMXBuM3dnSkp3MTN1eXdUNDR4V2JYZW9WRGVKTFFIejgxRTh1LThDYlVfZl9tZmM0RGsyWWpCd1hZcmtYLUVXYWd3Vk5PZHhlQnZz?oc=5" target="_blank">Anthropic hires its first “AI welfare” researcher</a> <font color="#6f6f6f">Ars Technica</font>
Knowledge Map
Connected Articles — Knowledge Graph
This article is connected to other articles through shared AI topics and tags.
More in Research Papers
A Retrospective on the ICLR 2026 Review Process
The selection of papers for ICLR 2026 has fully concluded. We extend our congratulations to the authors whose work will appear at the conference. Creating ICLR’s technical program requires immense effort from the authors, reviewers, and area chairs, and we thank you for your contributions and service. For researchers whose work was rejected, we hope […]
Vector Researchers present papers at ACL 2024
Vector researchers will be well represented at the 62nd Annual Meeting of the Association for Computational Linguistics in Bangkok, Thailand this year. 14 papers co-authored by Vector-affiliated researchers are being […] The post Vector Researchers present papers at ACL 2024 appeared first on Vector Institute for Artificial Intelligence .
Yann LeCun's Team's New Paper: AI Development Mimicking Human Intelligence Hits a Dead End - eu.36kr.com
<a href="https://news.google.com/rss/articles/CBMiU0FVX3lxTFBkbTRhNlhtRnY0cVBERld2OTdWNkRGMXBEaG9Vc21janRUcjJaUlJ4YzZRajVmMGQxNGJYTFB6M3lleUFNakUtWElHdGwzTXBQZjNZ?oc=5" target="_blank">Yann LeCun's Team's New Paper: AI Development Mimicking Human Intelligence Hits a Dead End</a> <font color="#6f6f6f">eu.36kr.com</font>
Plans must be made for the welfare of sentient AI, animal consciousness researchers argue - The Hill
<a href="https://news.google.com/rss/articles/CBMiiAFBVV95cUxNNzVaUTkzYkFUaVRsNGtnQVRXS2xsQVZfd1dFQ01RUlNZWUdDbjBNLUNycll2enl2NHp4Z0Ficm9HUnNWUnlvSGFrR3lDVUVxT1QyeE03QWhWcHFDTVJxV3VUQ0FKT3hiTkY3dWZha3JjcjRIM3l3WUtHZVlBUlhxdVBhLW1tdlJ40gGOAUFVX3lxTFBDQnllcVNNa1NRYVMyYlBtVXVxR0VPeHNjTjNMNWNTMFZXRjRkSU1OeXRFNmxvcENqbXkwSERoU1pGdXJYX2g5c214cFJFdEc1WUlkaEE5TlFDTTNoek5yR18tVi1vWUlGUnl4Tk13VWlFMDhzdUUyOUl3RmhNZ0FobTdiVG51N2h1SmJ5Y3c?oc=5" target="_blank">Plans must be made for the welfare of sentient AI, animal consciousness researchers argue</a> <font color="#6f6f6f">The Hill</font>
Discussion
Sign in to join the discussion
No comments yet — be the first to share your thoughts!