arXiv:2611.12083cs.SENov 2026

Manuscript Offprint

arXiv:2611.12083

SWE-Time: Benchmarking Temporal Repository Understanding

Shijun Xiao, Xinrong Chen, Hao Liu, Wensheng Zhang, Yongqiang Tang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Repository-level code-understanding benchmarks have progressively expanded the spatial scope of reasoning, from local code to entire repositories, while largely treating each repository as a static snapshot. However, how models reason about repository evolution over time remains largely unexplored. We introduce SWE-Time, a benchmark for temporal repository understanding that makes repository evolution itself the reasoning target. SWE-Time evaluates two complementary temporal directions: retrospective understanding of repository evolution through historical regression analysis and prospective understanding of intended changes from pre-change repository states. To enable realistic yet reliable evaluation in these settings, we introduce the RealWorld-to-Verifiable Construction Framework, which transforms real-world developer queries and historical evidence into verifiable evaluation tasks. We evaluate 15 coding agents on 1,661 cases from 65 GitHub repositories. Within Claude Code, Claude Opus 4.8 achieves the highest SWE-Time Avg. of 61.9, leaving substantial headroom. Controlled analyses highlight the importance of historical code evidence and developer intent, while consistent reasoning across repository states remains challenging. These results highlight repository evolution as a distinct and challenging dimension of code understanding.

1 Introduction

"Why do we remember the past but not the future?"

—Stephen Hawking, A Brief History of Time

Coding has become one of the most important applications of large language models, motivating numerous benchmarks for code generation (Chen et al., 2021; Hendrycks et al., 2021; Liu et al., 2023; Jain et al., 2025; Zhuo et al., 2025), software repair (Jimenez et al., 2024), and repository-level reasoning (Liu et al., 2024; Ding et al., 2023; Li et al.,

Figure

Figure 1: Existing code-understanding benchmarks focus on a fixed repository snapshot, whereas SWE-Time evaluates how code evolves through retrospective and prospective reasoning. Spatial scope increases from functions to files, cross-file interactions, and repositories. St−1S_{t-1}, StS_t, and St+1S_{t+1} denote repository states, connected by changes Δt\Delta_t and Δt+1\Delta_{t+1}. Dashed future states are hidden from the agent.

2024). Despite their different objectives, these tasks share a common requirement: code understanding (CU), the ability to reason about program behavior and dependencies (Yang et al., 2024; Li et al., 2025; Wang et al., 2026; Lu et al., 2021; Yan et al., 2024; Nguyen et al., 2025). Dedicated CU benchmarks assess this shared capability directly at the repository level. For example, SWE-QA-Pro and RepoProbe use natural-language questions about repository code (Cai et al., 2026; Yang et al., 2026), whereas RepoReason and RepoReasoner evaluate assertion verification, output prediction, and call-chain prediction (Li et al., 2026; Wang et al., 2026).

These benchmarks expand the spatial scope of CU evaluation from individual functions and files to entire repositories. However, they generally assess code within a fixed repository snapshot. In practice, each snapshot is part of an evolving repository history, as shown in Figure 1. Current behavior reflects past changes, while the effects of a new change depend on the current repository state (Ren et al., 2004). For example, when a feature that previously worked starts failing, developers need to identify which change introduced the regression (Zeller, 1999). Before implementing a request, developers need to anticipate its effects on repository components and behavior, even though the modified code does not yet exist (Sillito et al., 2006; Ko et al., 2007). These problems motivate evaluating both retrospective reasoning about the origins of current behavior and prospective reasoning about the consequences of future changes.

To assess these two forms of reasoning, we introduce SWE-Time, a benchmark for temporal repository understanding. Its two tasks instantiate these reasoning directions. In Task Backward, agents trace a reported regression through repository history to identify the first-bad commit. In Task Forward, they reason from developer intent and the pre-change repository state to predict how the requested change would affect repository behavior. They assess whether agents can relate code changes to repository behavior in both directions.

Realistic, reproducible evaluation requires authentic developer queries and verifiable reference answers (Just et al., 2014; Widyasari et al., 2020; Gyimesi et al., 2019; Tomassi et al., 2019). Existing CU benchmarks fall into two categories: natural-language QA benchmarks and programmatic benchmarks. QA benchmarks (Cai et al., 2026; Yang et al., 2026) offer developer-oriented questions but often score open-ended answers with LLM judges (Zheng et al., 2023). Programmatic benchmarks (Li et al., 2026; Wang et al., 2026), by contrast, support deterministic scoring but typically do not start from natural-language developer requests. We introduce the RealWorld-to-Verifiable Construction Framework, using independently verifiable historical evidence to identify authentic development events suitable for reliable evaluation. The resulting tasks combine authentic developer queries with deterministic answer verification.

Applying this procedure yields 1,661 cases from 65 GitHub repositories. We evaluate 15 coding agents on the resulting benchmark, using Claude Code for the main model comparison and Codex for supplementary references. Claude Opus 4.8 achieves the highest SWE-Time Avg. within Claude Code at 61.9. To examine the sources of difficulty, we conduct controlled experiments on historical code evidence and developer intent, and assess correctness across paired repository states using Pair Exact. These analyses show that both historical evidence and developer intent contribute to performance, while maintaining correct predictions across repository states remains difficult. Our contributions are as follows:

  • We formulate temporal repository understanding as retrospective and prospective reasoning, and introduce SWE-Time to evaluate both through repository-grounded tasks.

  • We introduce the RealWorld-to-Verifiable Construction Framework, using independently verifiable historical evidence to identify authentic development events suitable for reliable evaluation.

  • We evaluate 15 coding agents and use controlled experiments to characterize the roles of historical evidence, developer intent, and repository state in their performance.