SWE Context Bench: A Benchmark for Context Learning in Coding

Jiayuan Zhu, Junde Wu, Minhao Hu, Shengda Zhu, Jiazhen Pan +7 more
2/9/2026
cs.SEcs.AI
benchmark-dataset

No confident code implementation found for this paper.

Abstract

Large language models are increasingly used as coding agents for software engineering tasks. Current benchmarks mainly evaluate whether the agent can correctly solve the request or fix the bugs.

Show full abstract

They largely treat tasks as independent and do not assess whether agents can reuse previous experience across related problems. As a result, the efficiency gains from reusing the previous experience remains difficult to measure. We introduce SWE-ContextBench, a benchmark designed to explicitly evaluate context understanding and retrieval in coding agents. SWE-ContextBench consists of 1,100 base tasks with another 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 how accurately and efficiently agents solve related issues when prior cases are available in context. Using SWE-ContextBench, we study the behavior of multiple coding agents across varying context reuse settings and retrieval strategies. Our results show that accurately summarized and retrieved previous experience can significantly improve resolution accuracy and reduce 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 management and retrieval accuracy, and position SWE-ContextBench as a principled benchmark for studying context learning in coding agents.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhu2026context,
  title  = {SWE Context Bench: A Benchmark for Context Learning in Coding},
  author = {Jiayuan Zhu and Junde Wu and Minhao Hu and Shengda Zhu and Jiazhen Pan and Weixiang Shen and Yijun Yang and Fenglin Liu and Jianye Hao and Yueming Jin and Qirong Ho and Min Xu},
  year   = {2026},
  eprint = {2602.08316},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.08316v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2602.08316.svg)](https://codeofpaper.com/paper/2602.08316)

Discussion