Change2Task: From Repository Changes to Executable Coding Agent Tasks and Environments
Abstract
Scaling coding agents requires a continuing supply of executable data for training, benchmarking, and continuous evaluation. Each task must couple a realistic software state with a specification, development tools, and reliable verification. To expand this supply, we present Change2Task, a system grounded in repository history that converts merged pull requests (PRs) into verified tasks on healthy modern revisions of the same repository. It aligns historical evidence with evolved code, reconstructs task states through Patch Reversal, Code Mapping, or Agent Reconstruction, and validates the lifecycle from a healthy base to a task state and a restored state. By deriving multiple tasks grounded in developer evidence from maintained environments, Change2Task provides executable data for coding agent training and evaluation while reducing repeated environment setup, storage, and task construction effort. We evaluate the system through five of the most common and widely adopted coding agent task families: Bug Fix, Feature Addition, Test Generation, Application Programming Interface (API) Migration, and Security Repair. Starting from 1,130 source changes eligible for construction, Change2Task achieves 79.6% verified task construction success across these task families. On a matched candidate set, it recovers 29.2% more verified tasks than a construction baseline based on PRs. Historical and reconstructed cases achieve up to 98.0% matched outcome agreement under agent evaluation, while reuse of modern bases reduces measured expenditure across the complete pipeline by 10.8%.
Introduction
Coding agents have shifted software automation from single turn generation to iterative interaction with development environments. Systems such as SWE-agent and OpenHands search repositories, edit files, invoke tools, run tests, and revise solutions from execution feedback (Yang et al. 2024; Wang et al. 2025b). Each executable task therefore acts as a unit of agent data, coupling a repository state with dependencies, tools, a specification, and a verifier. We use environment engineering for constructing this executable substrate (Li et al. 2026a). Its supply bounds the scale and diversity of agent training, benchmarks, and continuous evaluation.
Recent systems make this dependence explicit. Kimi-Dev adapts agents from public trajectories, Qwen3-Coder-Next synthesizes verifiable coding tasks with executable environments, and GLM-5 develops asynchronous reinforcement learning infrastructure for long horizon interaction (Yang et al. 2025c; Cao et al. 2026; GLM-5 Team 2026). Producing these environments is expensive: daVinci-Env reports 45,320 Docker environments across more than 12.8K repositories and approximately $891K in construction cost, while SWE-Universe produces 807,693 verifiable environments using specialized distributed infrastructure (Fu et al. 2026; Chen et al. 2026). Snapshots dedicated to individual tasks further multiply images, storage, registry traffic, cold starts, and rollout pressure. The central systems question is how to obtain more verified agent data from every executable repository environment.
Existing task sources only partly exploit this opportunity. Historical benchmarks preserve developer issues, patches, and tests but bind tasks to original revisions (Jimenez et al. 2024). Fresh synthesis can generate many instances in prepared repositories, as SWE-smith demonstrates for repair (Yang et al. 2025b), yet synthetic failures need not preserve a real maintenance intent. Reconstructing a repository’s own historical changes on maintained code can retain developer grounding, refresh tasks, and increase the data obtained from each environment.
To address this problem, we introduce Change2Task, a framework and tool for turning repository history into executable coding agent data. It starts from a merged pull request (PR) and a fixed, runnable descendant revision in the same repository. The PR supplies the description, implementation patch, and behavioral evidence; the descendant supplies the healthy modern base. Construction proceeds through Level 1, Patch Reversal; Level 2, Code Mapping; and Level 3, Agent Reconstruction, escalating as repository evolution weakens direct correspondence. Each accepted task patch has a restoration patch and is validated across healthy, task, and restored states. By deriving multiple lightweight task variants from one maintained base, Change2Task reduces repeated environment setup, storage pressure, and manual construction and validation effort while expanding executable data for coding agent training and task generation.
Task objectives are expressed through adapters that define the goal, expected output, executable oracle, and edit scope. We evaluate Bug Fix, Feature Addition, Test Generation, Application Programming Interface (API) Migration, and Security Repair because they are among the most common and widely adopted coding agent workloads and require distinct outputs and verification contracts. The same interface naturally supports additional coding tasks whenever their maintenance intent and executable success condition can be derived from historical PR evidence.
Figure 1 gives a Feature Addition example. Repository history supplies a task grounded in developer evidence, while a maintained revision supplies the environment in which that task is executed.
Our contribution is Change2Task, a general framework and implemented tool that transfers developer-grounded maintenance changes to current code and verifies their provenance, behavior, scope, and restoration. From 1,130 eligible changes, Change2Task finalizes 900 paired tasks; on 621 matched Bug Fix candidates, it reconstructs 500 versus 387 for SWE-smith PR Mirror. The corpus achieves 0.894 task weighted source change profile fidelity. Under matched agent evaluation, historical and reconstructed cases achieve up to 98.0% outcome agreement while preserving the agent ranking. Reusing 388 modern bases reduces environment time by 58.4%, storage by 71.2%, and end-to-end expenditure by 10.8%.
Related Work
Coding Agents and Repository Environments
Agents operating at repository scale inspect code, edit files, invoke tools, and revise solutions from execution feedback. SWE-agent studies interfaces between agents and computers, OpenHands provides a sandboxed platform, AutoCodeRover combines program structure with search, and Agentless uses fixed localization, repair, and validation stages (Yang et al. 2024; Wang et al. 2025b; Zhang et al. 2024; Xia et al. 2025). SWE-bench established issue resolution on repository snapshots with hidden tests; SWE-Gym and R2E-Gym extend executable feedback to training (Jimenez et al. 2024; Pan et al. 2025; Jain et al. 2025). Together, these systems show that performance depends on the model, repository state, interaction interface, and exposed verifier.
Recent benchmarks expand freshness, industrial difficulty, and task breadth through Multi-SWE-bench, SWE-bench-Live, SWE-Bench Pro, and SWE-bench Multimodal (Zan et al. 2025; Zhang et al. 2025; Deng et al. 2025; Yang et al. 2025a). FeatureBench and SWE-Cycle cover feature development and fuller issue resolution cycles; SWE-EVO and TestEvo-Bench study repository evolution and joint code and test evolution (Zhou et al. 2026; Guan et al. 2026; Le et al. 2025; Wang, Wang, and Nie 2026). Live, multimodal, and evolutionary settings also require environments to remain executable as code, dependencies, and interfaces change. This breadth increases demand for maintained environments, outputs specific to each task, and reliable verifiers.
Executable Repository Infrastructure
Executable evaluation requires dependencies, services, build commands, test discovery, and isolation. EnvBench and SetupBench document persistent setup obstacles (Eliseeva et al. 2025; Arora, Jang, and Moghaddam 2025). Repo2Run synthesizes Dockerfiles from feedback, RepoLaunch automates setup and test management, and MEnvAgent combines planning, verification, and cross-language reuse (Hu et al. 2025; Li et al. 2026b; Guo et al. 2026a). Their focus is recovering or maintaining a runnable revision, an essential prerequisite for agent evaluation. They do not determine how many distinct, historically grounded task states one prepared base can support.
At scale, SWE-Factory coordinates environment, test, and instance construction, while daVinci-Env and SWE-Universe combine specialized builders, self-verification, and distributed execution (Guo et al. 2026b; Fu et al. 2026; Chen et al. 2026). SWE-smith reuses configured images for synthetic instances (Yang et al. 2025b). These efforts reduce setup cost or increase corpus scale. Change2Task is complementary: it begins after a healthy base is executable and increases the verified, developer-grounded task supply obtained from that investment.
Task Construction for Agents
Historical benchmarks ground tasks in developer issues, patches, and tests. Defects4J, SWE-bench, and SWE-Gym preserve realistic outcomes at original revisions (Just, Jalali, and Ernst 2014; Jimenez et al. 2024; Pan et al. 2025); SWT-Bench emphasizes tests that distinguish faulty and repaired states (Mündler et al. 2024). R2E-Gym and SWE-Synth scale through mutation, model generation, and executable feedback (Jain et al. 2025; Pham et al. 2026), but generated tasks need not match a maintenance intent observed in the repository.
The closest method, SWE-smith’s PR Mirror, asks a model to undo a historical PR in a current repository and retains candidates that break target tests (Yang et al. 2025b). FeatureBench removes tested feature units to construct feature-development tasks (Zhou et al. 2026). Both demonstrate task generation inside prepared repositories, but emphasize one construction operator or task objective. A broader construction system must adapt to repository evolution, preserve the historical maintenance contract, and support different agent outputs and oracles.
Change2Taskreconstructs a real maintenance event on a maintained descendant of the same repository. Shared lineage and target, regression, restoration, scope, and source change profile checks connect the modern task to its source PR. One validation core then serves multiple objectives without rebuilding the base environment.
Methodology
Change2Taskreconstructs, in modern code, the task condition represented by a historical PR. It creates an executable task state on a fixed healthy descendant of the same repository while retaining the PR as developer evidence. The modern revision supplies the environment in which an agent will act.
We use one compact notation to describe this lifecycle:
The source patch changes the historical state before the PR, , into . Change2Task starts from a healthy modern base , applies a task patch to obtain task state , and records a restoration patch that yields restored state . We require to recover the relevant healthy behavior of , not to reproduce it textually. Figure 2 summarizes the four stages.
Deriving Task Evidence
Change2Taskderives task evidence from a merged PR in the repository’s own history. Its description, implementation patch, and executable checks identify the changed condition, the checks that observe it, and nearby behavior that must remain intact. This stage produces target checks, regression checks, and a source change profile. Target checks expose the condition to be reconstructed; regression checks protect surrounding behavior; the source change profile records the affected components and edit extent.
Candidates are excluded when the changed condition is ambiguous, its checks cannot be executed, or the relevant change cannot be separated from unrelated modifications. The retained evidence provides provenance and the source change profile for later validation.
Establishing the Modern Task Base
For each eligible PR, Change2Task selects a fixed descendant revision from the same repository lineage as the healthy modern base . It first honors a declared healthy or target revision. If neither is available, it resolves the accessible upstream default branch in a fixed priority order. A fallback to the historical base is recorded separately and is not counted as a modern base. Selection is completed before task construction, and the resolved commit hash is frozen for reproducibility.
The selected revision must support a clean checkout, its runtime dependencies and services, and executable checks. It must also still host the relevant behavior: the mapped target and regression checks must pass on , and there must be a defensible transformation surface in the modern code. Native repository configuration or an external preparation tool may establish this environment; Change2Task operates after the base is runnable. Appendix C gives the full resolution order and acceptance gates.
PR alignment locates the modern realization of the changed behavior, implementation, and checks despite refactoring, file movement, API changes, or test reorganization. A candidate advances only when this correspondence is sufficiently grounded and both target and regression checks pass on .
This stage also instantiates a task specification: the goal presented to the agent, the expected output, the validation oracle, and the permitted edit scope. Our evaluation adapters create an unfixed behavior for Bug Fix, a missing capability for Feature Addition, an observable failure for Test Generation, old API usage for API Migration, or a sandboxed vulnerability for Security Repair. These adapters vary the objective and oracle while sharing one construction and validation core. Additional task families can use the same core whenever their task condition, output contract, and executable oracle can be derived from historical PR evidence on a healthy descendant revision.
Constructing the Task State
Given the task evidence, healthy modern base, and task specification, Change2Task constructs so that presents the intended maintenance condition while preserving unrelated behavior. Figure 3 expands the three construction levels. Construction escalates only when an earlier level cannot produce a valid candidate.
Level 1: Patch Reversal. Level 1 reverses the source patch when it remains compatible with the modern context. This route preserves the closest structural link to the change written by the developer.
Level 2: Code Mapping. When direct replay fails but a unique source-block correspondence remains, Level 2 locates the historical post-change block in the modern file. It allows indentation normalization and replaces the block with its reindented pre-change form. The method favors conservative local transformations, reparses the result, and requires the mapped patch to pass the same scope and executable gates. Level 2 makes one structure-guided attempt. Missing, ambiguous, or incompatible correspondence advances the case to Level 3.
Level 3: Agent Reconstruction. When the historical behavior remains present but structural correspondence is insufficient, a construction agent receives PR evidence, relevant modern context, the task specification, and feedback from prior attempts. It proposes scoped candidate patches and filters them through apply, syntax, and scope checks, then ranks survivors by source change profile fidelity and edit complexity before lifecycle validation. A failed candidate returns structured evidence identifying an unmet target condition, broken regression check, restoration failure, or fidelity deviation. The loop allows at most four attempts and terminates at acceptance or budget exhaustion. Cases without a defensible modern behavior host are rejected, and downstream agent outcomes never select or revise tasks. Appendix C gives Level 2 pseudocode and the complete Level 3 protocol.
Patch checks reject candidates that fail to apply, exceed the permitted scope, or break basic syntactic and build integrity. Complexity matching compares their files, hunks, changed lines, symbols, and check surface with the source change profile. For an accepted task patch , Change2Task records a restoration patch : it is derived as the inverse transformation when possible, otherwise constructed as the corresponding modern repair, and must restore the intended behavior from to .
Lifecycle and Scope Validation
Change2Taskvalidates each candidate over three executable states. On healthy modern base , target and regression checks pass. On task state , target checks expose the specified task condition while regression checks continue to pass. After applying , both check sets pass on restored state . The target checks therefore pass, fail, and pass across the three states, while regression checks pass throughout. Repeated runs reject unstable cases.
The scope gate permits only artifacts allowed by the task specification and prevents protected checks or metadata from manufacturing validity. The fidelity gate compares the source PR with the modern realization using affected components, edit extent, and check surface. It rejects scope collapse, in which a substantial source change becomes trivial, and scope inflation, in which a narrow change requires broad unrelated edits.
An accepted variant contains , , , the target and regression checks, the task specification, and source PR provenance. Only variants that pass lifecycle, scope, and fidelity validation are frozen for evaluation. The task families therefore demonstrate different agent goals and scoring rules over one reusable construction core.
Experiments
Experiment Setup
Paired task corpus.
The construction study begins with 1,130 construction-eligible source changes: cases for which source PR evidence, executable checks, and same-repository base prerequisites are available. The process yields 900 paired sets: 500 Bug Fix sets and 100 each for Feature Addition, Test Generation, Application Programming Interface (API) Migration, and Security Repair. We allocate more Bug Fix sets because repository-level repair has the broadest standardized pool of executable tasks. Every set contains two provenance-linked branches. The Original Branch is the official benchmark case at its historical revision; the Change2Task Branch reconstructs that case on a healthy modern revision of the same repository. Thus, each modern task has a specific historical counterpart established before agent evaluation. Appendix B reports the upstream evidence and readiness funnel.
Tasks and success criteria.
Each adapter defines a distinct output and verification contract:
-
1.
Bug Fix. Repair faulty behavior and pass target and regression checks.
-
2.
Feature Addition. Implement the requested missing behavior and pass feature and regression checks.
-
3.
Test Generation. Add a test that fails on the task state, passes after restoration, and respects the test-only scope.
-
4.
API Migration. Replace obsolete source-API usage with the required target API and pass migration and regression checks.
-
5.
Security Repair. Remove the vulnerability exposed by a deterministic sandboxed oracle and pass security and regression checks.
A solution is counted as solved only when its family-specific oracle, regression checks, and scope gate all pass.
Construction and evaluation agents.
Agent Reconstruction uses Claude Code with Opus 4.8 in a bounded loop that generates, executes, and refines candidates. Evaluation uses Codex CLI with GPT-5.5, Claude Code with Sonnet 5, Gemini CLI with Gemini 3.1 Pro, and GitHub Copilot with GPT-5.6 Terra. Each agent receives one clean run on each branch. Within a pair, task intent, model, interface, visible evidence, permissions, context policy, budget, and verifier strength are held constant. Evaluation agents cannot access construction traces, task patches, restoration patches, or hidden target checks. Appendix D gives the execution limits and complete protocol.
RQ1: How Reliably Does Change2Task Reconstruct Tasks from Repository History?
We collect 1,130 construction-eligible changes from 12 public benchmark collections and releases (Jimenez et al. 2024; Zhang et al. 2025; Deng et al. 2025; Li et al. 2025; Badertdinov et al. 2025; Wang et al. 2025a; Islam et al. 2023; Wei et al. 2025; Bui, Scandariato, and Díaz Ferreyra 2022; Wu et al. 2023). We define verified task recovery as the fraction reaching the finalized corpus after lifecycle, scope, fidelity, and semantic qualification. Appendix E reports exact counts and Wilson 95% confidence intervals (CIs).
| Method | Verified | Recovery | 95% CI |
|---|---|---|---|
| Direct reversal | 81/621 | 13.0% | [10.6, 15.9] |
| SWE-smith PR Mirror | 387/621 | 62.3% | [58.4, 66.0] |
| Change2Task | 500/621 | 80.5% | [77.2, 83.4] |
Figure 4(a) shows that Change2Task reconstructs 900 of 1,130 eligible changes, yielding 79.6% overall recovery. Family estimates range from 76.3% for API Migration to 82.0% for Feature Addition, with wider CIs for the four smaller families.
Figure 4(b) assigns each finalized task to its first successful construction level. Level 1 contributes 95 tasks directly; Level 2 contributes 190 after Level 1 fails; Level 3 contributes 615 after both earlier levels are exhausted. The shares are 10.6%, 21.1%, and 68.3%, quantifying the incremental coverage supplied by each level.
Figure 4(c) assigns each of the 230 rejected candidates one terminal reason. Lifecycle validation accounts for 50 cases, environment or preflight failures for 44, and exhausted candidate construction for 42. Attrition is therefore distributed across base readiness, task construction, executable validation, and final qualification.
Table 1 compares methods on the same 621 Bug Fix candidates under one construction and verification envelope. Direct reversal recovers 81 tasks and SWE-smith PR Mirror 387 (Yang et al. 2025b); Change2Task recovers 500. It therefore adds 113 verified tasks, a 29.2% relative and 18.2-point absolute gain. Appendix C specifies the matched model, evidence, context, attempts, tools, and budgets.
RQ1 Finding. Change2Task transforms repository history from a passive record into a recoverable source of verified coding tasks through progressively adaptive construction.
RQ2: How Faithfully Does Change2Task Preserve Historical Changes?
RQ2 examines how well the 900 finalized tasks retain the complexity, scope, and maintenance meaning of their source changes. We compare each historical source patch with its modern restoration patch along six dimensions: changed files, hunks, lines, symbols, target checks, and regression checks. Dimension similarity is the ratio between smaller and larger counts, with identical empty counts assigned 1. Their weighted combination emphasizes changed lines, followed by hunks, files, the two check surfaces, and symbols.111Weights allocate 76% to implementation footprint and 24% to verification surface. Appendix F reports component values and an equal-weight check.
Figure 5(a) reports family means from 0.825 to 0.925, with a macro average of 0.887 and task-weighted average of 0.894. Test Generation scores 0.925, Bug Fix 0.903, Feature Addition 0.893, API Migration 0.890, and Security Repair 0.825. The connected profiles show that the aggregate reflects multiple aspects of the source change rather than one size statistic.
Figure 5(b) reports mean fidelity of 0.992 for Patch Reversal, 0.888 for Code Mapping, and 0.881 for Agent Reconstruction. These values characterize finalized tasks as code correspondence becomes weaker; route assignment is descriptive rather than randomized.
Kimi K3 and DeepSeek V4 Pro independently review 912 anonymized historical and modern pairs without seeing the construction route, trace, or model. The review records behavioral triggers, expected behavior, affected APIs, source-to-modern mappings, contrastive checks, and restoration. Both judges directly accept 834 pairs. Manual adjudication retains 66 of the remaining 78 and excludes 12, producing 900 tasks. Figure 6 reports each judge’s rate, direct joint acceptance, and inter-judge agreement; 92.7% of the final corpus is directly accepted by both judges. Appendix F gives the labels and adjudication protocol.
The audit also defines the applicability boundary. An adapter needs a historical PR with identifiable intent, a healthy descendant hosting the behavior, an executable oracle, and a bounded edit policy. Outputs may include code, tests, configuration, or other artifacts; grounded evidence and executable validation matter more than a fixed task taxonomy.
RQ2 Finding. Change2Task preserves the developer-grounded maintenance contract of historical changes while translating their implementation footprint to evolved code.
RQ3: How Consistent Are Agent Outcomes Across the Two Branches?
The Original Branch is the historical behavioral anchor, and the Change2Task Branch realizes the same maintenance intent on modern code. Table 2 reports branch solve rates, directional differences, complete paired outcomes, raw agreement, and Cohen’s . Agreement is the fraction with the same solved or unsolved outcome; adjusts for the branches’ marginal solve rates.
| Task family | Agent | Model | Original solved (%) | Change2Task solved (%) | pp | Both solved | Original only | Change2Task only | Neither solved | Agree. (%) | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Codex CLI | GPT-5.5 | 41.0 | 42.2 | 1.2 | 185 | 20 | 26 | 269 | 90.8 | 0.811 | |
| Claude Code | Sonnet 5 | 47.0 | 48.4 | 1.4 | 210 | 25 | 32 | 233 | 88.6 | 0.772 | |
| Gemini CLI | Gemini 3.1 Pro | 24.0 | 22.0 | 2.0 | 102 | 18 | 8 | 372 | 94.8 | 0.853 | |
| Bug Fix | GitHub Copilot | GPT-5.6 Terra | 54.0 | 53.0 | 1.0 | 240 | 30 | 25 | 205 | 89.0 | 0.779 |
| Codex CLI | GPT-5.5 | 46.0 | 44.0 | 2.0 | 39 | 7 | 5 | 49 | 88.0 | 0.758 | |
| Claude Code | Sonnet 5 | 66.0 | 68.0 | 2.0 | 58 | 8 | 10 | 24 | 82.0 | 0.593 | |
| Gemini CLI | Gemini 3.1 Pro | 20.0 | 19.0 | 1.0 | 17 | 3 | 2 | 78 | 95.0 | 0.841 | |
| Feature Addition | GitHub Copilot | GPT-5.6 Terra | 50.0 | 54.0 | 4.0 | 43 | 7 | 11 | 39 | 82.0 | 0.640 |
| Codex CLI | GPT-5.5 | 55.0 | 57.0 | 2.0 | 50 | 5 | 7 | 38 | 88.0 | 0.757 | |
| Claude Code | Sonnet 5 | 36.0 | 40.0 | 4.0 | 31 | 5 | 9 | 55 | 86.0 | 0.703 | |
| Gemini CLI | Gemini 3.1 Pro | 24.0 | 20.0 | 4.0 | 19 | 5 | 1 | 75 | 94.0 | 0.826 | |
| Test Generation | GitHub Copilot | GPT-5.6 Terra | 48.0 | 50.0 | 2.0 | 42 | 6 | 8 | 44 | 86.0 | 0.720 |
| Codex CLI | GPT-5.5 | 60.0 | 55.0 | 5.0 | 52 | 8 | 3 | 37 | 89.0 | 0.776 | |
| Claude Code | Sonnet 5 | 45.0 | 48.0 | 3.0 | 39 | 6 | 9 | 46 | 85.0 | 0.699 | |
| Gemini CLI | Gemini 3.1 Pro | 12.0 | 11.0 | 1.0 | 10 | 2 | 1 | 87 | 97.0 | 0.853 | |
| API Migration | GitHub Copilot | GPT-5.6 Terra | 42.0 | 47.0 | 5.0 | 36 | 6 | 11 | 47 | 83.0 | 0.657 |
| Codex CLI | GPT-5.5 | 35.0 | 30.0 | 5.0 | 28 | 7 | 2 | 63 | 91.0 | 0.795 | |
| Claude Code | Sonnet 5 | 55.0 | 51.0 | 4.0 | 46 | 9 | 5 | 40 | 86.0 | 0.719 | |
| Gemini CLI | Gemini 3.1 Pro | 10.0 | 8.0 | 2.0 | 8 | 2 | 0 | 90 | 98.0 | 0.878 | |
| Security Repair | GitHub Copilot | GPT-5.6 Terra | 44.0 | 48.0 | 4.0 | 37 | 7 | 11 | 45 | 82.0 | 0.638 |
Across 3,600 matched agent-task pairs, each branch contains 1,478 solved outcomes, or 41.1%. Discordance is exactly balanced: 186 outcomes are solved only on the Original Branch and 186 only on the Change2Task Branch. Aggregate agreement is 89.7%, Cohen’s is 0.787, positive agreement is 87.4%, and solved-set Jaccard overlap is 77.6%. The paired solve-rate difference is 0.0 points with a 95% interval of [-1.1, 1.1], and exact McNemar . Appendix G defines these statistics.
Agent-level behavior is stable. Agreement ranges from 86.4% for Copilot with GPT-5.6 Terra to 95.3% for Gemini 3.1 Pro, with aggregate from 0.729 to 0.852. Gemini 3.1 Pro combines the highest agreement with lower solve rates. Copilot with GPT-5.6 Terra and Claude Code Sonnet 5 have the highest overall solve rates, while Codex with GPT-5.5 performs best on Test Generation and API Migration.
Directional changes remain small and dispersed. Claude Code Sonnet 5 and Copilot with GPT-5.6 Terra gain 12 and 10 solved tasks on the Change2Task Branch, Codex with GPT-5.5 changes by four, and Gemini 3.1 Pro loses 18. No task-family shift exceeds five percentage points, and 11 of 20 comparisons differ by at most two points. Reconstruction therefore does not systematically favor one branch, configuration, or task family.
RQ3 Finding. Change2Task-generated tasks retain the comparative evaluation signal of their historical anchors across heterogeneous coding agents.
RQ4: How Effectively Does Change2Task Reuse Executable Repository Environments?
RQ4 measures the systems benefit of deriving multiple finalized tasks from a healthy modern base. The matched baseline prepares and retains one environment for each of 900 tasks. Change2Task instead prepares 388 healthy modern bases and reuses them across associated variants while accounting for task-specific materialization and verification. Both conditions use the same hardware, retention period, and accounting rules.
| Metric | One Base per Task | Shared Modern Bases | Effect |
|---|---|---|---|
| Bases prepared | 900 | 388 | 56.9% fewer |
| Tasks per base | 1.00 | 2.32 | 2.32 |
| Total setup time | 3,240 h | 1,349 h | 58.4% less |
| Setup time per task | 3.60 h | 1.50 h | 58.4% less |
| Total retained storage | 5,580 GB | 1,607 GB | 71.2% less |
| Storage per task | 6.20 GB | 1.79 GB | 71.2% less |
Table 3 contrasts rebuilding an environment for every task with reusing 388 healthy modern bases. Reuse lowers amortized environment time from 3.60 h to 1.50 h and storage from 6.20 GB to 1.79 GB per task. Figure 7 reports family-level reductions. Bug Fix achieves the greatest reuse and savings; API Migration currently maps each task to a distinct base and benefits less.
Benefits depend on reuse density: families placing several tasks on one maintained base save more than those using distinct bases. Matched hardware, prices, and retention isolate this reuse effect, while RepoLaunch shows how modern reconstruction and historical preparation combine when either route alone is insufficient.
Prior systems report costs over different outputs and accounting boundaries (Yang et al. 2025b; Fu et al. 2026; Chen et al. 2026), so our cost conclusion uses the matched internal comparison. Reuse lowers expenditure from $1,917 to $1,710. The $207 saving equals $0.23 per task and a 10.8% net reduction, including additional automation and Agent Reconstruction expense. Appendix H gives the accounting breakdown.
RepoLaunch supplies a complementary path when modern reconstruction is unavailable. It makes another 195 historical revisions executable, raising coverage from 900 to 1,095 of 1,130 cases, or 96.9%, and leaving 35 unresolved. It is an environment-preparation complement rather than a task-construction baseline.
RQ4 Finding. Change2Task turns executable repositories into reusable task infrastructure and complements historical environment preparation when modern reconstruction is unavailable.
Conclusion and Outlook
We introduced Change2Task, a history-grounded framework that reconstructs merged PRs as executable coding-agent tasks on healthy descendant revisions. Its three adaptive construction routes and lifecycle, scope, and fidelity checks transfer developer-grounded tasks onto maintained code. Across five task families, Change2Task finalizes 900 of 1,130 eligible changes, improves matched Bug Fix recovery by 29.2%, and produces tasks with 0.894 source change profile fidelity and up to 98.0% matched agent-outcome agreement. Modern-base reuse also reduces environment time by 58.4% and storage by 71.2%. These savings enable more efficient and lower-cost coding-agent training and executable task-data construction.
Future work will extend Change2Task to more task families, languages, and build systems. We will improve oracle generation as tests and APIs evolve, and support task transfer across forks, successor projects, and related dependency ecosystems through traceable interface mappings. We will also repeat paired evaluations across model releases. Together, these extensions will expand the historical changes that can become current executable data for agent training and continuous evaluation.
References
- Arora, Jang, and Moghaddam (2025) Arora, A.; Jang, J.; and Moghaddam, R. Z. 2025. SetupBench: Assessing Software Engineering Agents’ Ability to Bootstrap Development Environments. arXiv:2507.09063.
- Badertdinov et al. (2025) Badertdinov, I.; Golubev, A.; Nekrashevich, M.; Shevtsov, A.; Karasik, S.; Andriushchenko, A.; Trofimova, M.; Litvintseva, D.; and Yangel, B. 2025. SWE-rebench: An Automated Pipeline for Task Collection and Decontaminated Evaluation of Software Engineering Agents. In Advances in Neural Information Processing Systems, volume 38.
- Bui, Scandariato, and Díaz Ferreyra (2022) Bui, Q.-C.; Scandariato, R.; and Díaz Ferreyra, N. E. 2022. Vul4J: A Dataset of Reproducible Java Vulnerabilities Geared Towards the Study of Program Repair Techniques. In Proceedings of the 19th IEEE/ACM International Conference on Mining Software Repositories, 464–468.
- Cao et al. (2026) Cao, R.; Chen, M.; Chen, J.; Cui, Z.; Feng, Y.; Hui, B.; Jing, Y.; Li, K.; Li, M.; Lin, J.; Ma, Z.; Shum, K.; Wang, X.; Wei, J.; Yang, J.; Zhang, J.; Zhang, L.; Zhang, Z.; Zhao, W.; and Zhou, F. 2026. Qwen3-Coder-Next Technical Report. arXiv:2603.00729.
- Chen et al. (2026) Chen, M.; Zhang, L.; Feng, Y.; Wang, X.; Zhao, W.; Cao, R.; Yang, J.; Chen, J.; Li, M.; Ma, Z.; Ge, H.; Zhang, Z.; Cui, Z.; Liu, D.; Zhou, J.; Sun, J.; Lin, J.; and Hui, B. 2026. SWE-Universe: Scale Real-World Verifiable Environments to Millions. arXiv:2602.02361.
- Deng et al. (2025) Deng, X.; Da, J.; Pan, E.; He, Y. Y.; Ide, C.; Garg, K.; Lauffer, N.; Park, A.; Pasari, N.; Rane, C.; Sampath, K.; Krishnan, M.; Kundurthy, S.; Hendryx, S.; Wang, Z.; Bharadwaj, V.; Holm, J.; Aluri, R.; Zhang, C. B. C.; Jacobson, N.; Liu, B.; and Kenstler, B. 2025. SWE-Bench Pro: Can AI Agents Solve Long-Horizon Software Engineering Tasks? arXiv:2509.16941.
- Eliseeva et al. (2025) Eliseeva, A.; Kovrigin, A.; Kholkin, I.; Bogomolov, E.; and Zharov, Y. 2025. EnvBench: A Benchmark for Automated Environment Setup. In ICLR 2025 Workshop on Deep Learning for Code.
- Fu et al. (2026) Fu, D.; Wu, S.; Wu, Y.; Peng, Z.; Huang, Y.; Sun, J.; Zeng, J.; Jiang, M.; Zhang, L.; Li, Y.; Hu, J.; Liu, L.; Hou, J.; and Liu, P. 2026. daVinci-Env: Open SWE Environment Synthesis at Scale. arXiv:2603.13023.
- GLM-5 Team (2026) GLM-5 Team. 2026. GLM-5: from Vibe Coding to Agentic Engineering. arXiv:2602.15763.
- Guan et al. (2026) Guan, H.; Fu, L.; Zhang, S.; Zhu, Y.; Zhang, K.; Qiu, L.; Cai, X.; Cao, X.; Liu, W.; Zhang, W.; and Yu, Y. 2026. SWE-Cycle: Benchmarking Code Agents across the Complete Issue Resolution Cycle. arXiv:2605.13139.
- Guo et al. (2026a) Guo, C.; Wu, J.; He, S.; Chen, Y.; Kuang, Z.; Fan, S.; Chen, B.; Bao, S.; Liu, J.; Wu, H.; Zhu, Q.; Che, W.; and Wang, H. 2026a. MEnvAgent: Scalable Polyglot Environment Construction for Verifiable Software Engineering. In International Conference on Machine Learning. Spotlight paper.
- Guo et al. (2026b) Guo, L.; Wang, Y.; Li, C.; Tao, W.; Yang, P.; Chen, J.; Song, H.; Tang, D.; and Zheng, Z. 2026b. SWE Data Construction, Automatically! Proceedings of the ACM on Software Engineering, 3(FSE): 525–546.
- Hu et al. (2025) Hu, R.; Peng, C.; Wang, X.; Xu, J.; and Gao, C. 2025. Repo2Run: Automated Building Executable Environment for Code Repository at Scale. In Advances in Neural Information Processing Systems, volume 38.
- Islam et al. (2023) Islam, M.; Jha, A. K.; Nadi, S.; and Akhmetov, I. 2023. PyMigBench: A Benchmark for Python Library Migration. In Proceedings of the 20th IEEE/ACM International Conference on Mining Software Repositories, 511–515.
- Jain et al. (2025) Jain, N.; Singh, J.; Shetty, M.; Zhang, T.; Zheng, L.; Sen, K.; and Stoica, I. 2025. R2E-Gym: Procedural Environment Generation and Hybrid Verifiers for Scaling Open-Weights SWE Agents. In Second Conference on Language Modeling.
- Jimenez et al. (2024) Jimenez, C. E.; Yang, J.; Wettig, A.; Yao, S.; Pei, K.; Press, O.; and Narasimhan, K. 2024. SWE-bench: Can Language Models Resolve Real-World GitHub Issues? In The Twelfth International Conference on Learning Representations.
- Just, Jalali, and Ernst (2014) Just, R.; Jalali, D.; and Ernst, M. D. 2014. Defects4J: A Database of Existing Faults to Enable Controlled Testing Studies for Java Programs. In Proceedings of the 2014 International Symposium on Software Testing and Analysis, 437–440.
- Le et al. (2025) Le, T.; Thai, M. V. T.; Nguyen Manh, D.; Phan Nhat, H.; and Bui, N. D. Q. 2025. SWE-EVO: Benchmarking Coding Agents in Long-Horizon Software Evolution Scenarios. arXiv:2512.18470.
- Li et al. (2026a) Li, J.; Jin, Z.; Men, T.; Hao, Y.; Zhu, K.; Wang, L.; Huang, D.; Wang, L.; Hua, S.; Wang, L.; Gao, J.; Yuan, H.; Xu, R.; Liu, K.; and Zhao, J. 2026a. Agentic Environment Engineering for Large Language Models: A Survey of Environment Modeling, Synthesis, Evaluation, and Application. arXiv:2606.12191.
- Li et al. (2026b) Li, K.; Li, R.; Zhang, L.; Jin, Q.; Zhu, L.; Huang, X.; Zhang, G.; Zhang, Y.; He, S.; Xie, C.; Zhang, X.; Jin, Z.; Li, B.; Zhang, C.; Kang, Y.; Huang, Y.; Nallipogu, E.; Rajmohan, S.; Lin, Q.; and Zhang, D. 2026b. RepoLaunch: Automating Build and Management of Code Repositories across Languages and Platforms. arXiv:2603.05026.
- Li et al. (2025) Li, W.; Zhang, X.; Guo, Z.; Mao, S.; Luo, W.; Peng, G.; Huang, Y.; Wang, H.; and Li, S. 2025. FEA-Bench: A Benchmark for Evaluating Repository-Level Code Generation for Feature Implementation. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 17160–17176. Association for Computational Linguistics.
- Mündler et al. (2024) Mündler, N.; Müller, M. N.; He, J.; and Vechev, M. 2024. SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents. In Advances in Neural Information Processing Systems, volume 37, 81857–81887.
- Pan et al. (2025) Pan, J.; Wang, X.; Neubig, G.; Jaitly, N.; Ji, H.; Suhr, A.; and Zhang, Y. 2025. Training Software Engineering Agents and Verifiers with SWE-Gym. In Proceedings of the 42nd International Conference on Machine Learning, volume 267, 47717–47737. PMLR.
- Pham et al. (2026) Pham, M. V. T.; Phan, H. N.; Phan, H. N.; Le, C. C.; Nguyen, T. N.; and Bui, N. D. Q. 2026. Synthetic Repo-Level Bug Dataset for Training Automated Program Repair Models. In Proceedings of the 48th IEEE/ACM International Conference on Software Engineering.
- Wang, Wang, and Nie (2026) Wang, J. A.; Wang, K.; and Nie, P. 2026. TestEvo-Bench: An Executable and Live Benchmark for Test and Code Co-Evolution. arXiv:2607.02469.
- Wang et al. (2025a) Wang, L.; Ramalho, L.; Celestino, A.; Pham, P. A.; Liu, Y.; Sinha, U. K.; Portillo, A.; Osunwa, O.; and Maduekwe, G. 2025a. SWE-Bench++: A Framework for the Scalable Generation of Software Engineering Benchmarks from Open-Source Repositories. arXiv:2512.17419.
- Wang et al. (2025b) Wang, X.; Li, B.; Song, Y.; Xu, F. F.; Tang, X.; Zhuge, M.; Pan, J.; Song, Y.; Li, B.; Singh, J.; Tran, H. H.; Li, F.; Ma, R.; Zheng, M.; Qian, B.; Shao, Y.; Muennighoff, N.; Zhang, Y.; Hui, B.; Lin, J.; Brennan, R.; Peng, H.; Ji, H.; and Neubig, G. 2025b. OpenHands: An Open Platform for AI Software Developers as Generalist Agents. In The Thirteenth International Conference on Learning Representations.
- Wei et al. (2025) Wei, Z.; Zeng, J.; Wen, M.; Yu, Z.; Cheng, K.; Zhu, Y.; Guo, J.; Zhou, S.; Yin, L.; Su, X.; and Ma, Z. 2025. PATCHEVAL: A New Benchmark for Evaluating LLMs on Patching Real-World Vulnerabilities. arXiv:2511.11019.
- Wu et al. (2023) Wu, Y.; Jiang, N.; Pham, H. V.; Lutellier, T.; Davis, J.; Tan, L.; Babkin, P.; and Shah, S. 2023. How Effective Are Neural Networks for Fixing Security Vulnerabilities. In Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis, 1282–1294.
- Xia et al. (2025) Xia, C. S.; Deng, Y.; Dunn, S.; and Zhang, L. 2025. Demystifying LLM-Based Software Engineering Agents. Proceedings of the ACM on Software Engineering, 2(FSE): 801–824.
- Yang et al. (2024) Yang, J.; Jimenez, C. E.; Wettig, A.; Lieret, K.; Yao, S.; Narasimhan, K.; and Press, O. 2024. SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering. In Advances in Neural Information Processing Systems, volume 37, 50528–50652.
- Yang et al. (2025a) Yang, J.; Jimenez, C. E.; Zhang, A. L.; Lieret, K.; Yang, J.; Wu, X.; Press, O.; Muennighoff, N.; Synnaeve, G.; Narasimhan, K. R.; Yang, D.; Wang, S. I.; and Press, O. 2025a. SWE-bench Multimodal: Do AI Systems Generalize to Visual Software Domains? In The Thirteenth International Conference on Learning Representations.
- Yang et al. (2025b) Yang, J.; Lieret, K.; Jimenez, C. E.; Wettig, A.; Khandpur, K.; Zhang, Y.; Hui, B.; Press, O.; Schmidt, L.; and Yang, D. 2025b. SWE-smith: Scaling Data for Software Engineering Agents. In Advances in Neural Information Processing Systems, volume 38. Datasets and Benchmarks Spotlight.
- Yang et al. (2025c) Yang, Z.; Wang, S.; Fu, K.; He, W.; Xiong, W.; Liu, Y.; Miao, Y.; Gao, B.; Wang, Y.; Ma, Y.; Li, Y.; Liu, Y.; Hu, Z.; Zhang, K.; Wang, S.; Chen, H.; Sung, F.; Liu, Y.; Gao, Y.; Yang, Z.; and Liu, T. 2025c. Kimi-Dev: Agentless Training as Skill Prior for SWE-Agents. arXiv:2509.23045.
- Zan et al. (2025) Zan, D.; Huang, Z.; Liu, W.; Chen, H.; Xin, S.; Zhang, L.; Liu, Q.; Li, A.; Chen, L.; Zhong, X.; Liu, S.; Xiao, Y.; Chen, L.; Zhang, Y.; Su, J.; Liu, T.; Long, R.; Ding, M.; and Xiang, L. 2025. Multi-SWE-bench: A Multilingual Benchmark for Issue Resolving. In Advances in Neural Information Processing Systems, volume 38.
- Zhang et al. (2025) Zhang, L.; He, S.; Zhang, C.; Kang, Y.; Li, B.; Xie, C.; Wang, J.; Wang, M.; Huang, Y.; Fu, S.; Nallipogu, E.; Lin, Q.; Dang, Y.; Rajmohan, S.; and Zhang, D. 2025. SWE-bench Goes Live! In Advances in Neural Information Processing Systems, volume 38. Datasets and Benchmarks Track.
- Zhang et al. (2024) Zhang, Y.; Ruan, H.; Fan, Z.; and Roychoudhury, A. 2024. AutoCodeRover: Autonomous Program Improvement. In Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis.
- Zhou et al. (2026) Zhou, Q.; Zhang, J.; Wang, H.; Hao, R.; Wang, J.; Han, M.; Yang, Y.; Wu, S.; Pan, F.; Fan, L.; Tu, D.; and Zhang, Z. 2026. FeatureBench: Benchmarking Agentic Coding for Complex Feature Development. In International Conference on Learning Representations.
Appendix
Appendix A Limitations
Change2Taskreconstructs changes along the lineage of their source repository. This setting requires a traceable source PR, an identifiable behavior, executable checks, and a healthy descendant that still hosts the behavior. Changes whose behavior has disappeared from the maintained code, and changes without a stable modern execution path, remain outside the construction-eligible pool. The reported recovery rates characterize changes that satisfy these evidence and readiness conditions.
Lifecycle qualification depends on executable target and regression checks. Repositories with sparse, unstable, or platform-specific checks provide a narrower observable behavior surface and are less likely to reach construction eligibility. Additional project-specific oracles are required for maintenance obligations expressed primarily through performance, distributed service interactions, user interfaces, or hardware behavior.
The evaluation covers five task families drawn from public Python and Java software corpora and four coding agent configurations. Other maintenance families, languages, repository structures, and agent interfaces may exhibit different reconstruction and solving behavior. Environment savings also depend on the number of task variants supported by each healthy modern base, along with the compute prices, storage policies, and retention period used by an organization. Section H reports the matched accounting boundary used in this study.
Appendix B Corpus and Task Provenance
B.1 Eligibility Funnel
The main paper defines recovery over 1,130 construction-eligible changes. Table 4 reports the preceding data readiness stages. A source pull request (PR) enters the eligible set after its evidence, executable checks, same-repository modern base, behavior alignment, and task specification are complete enough for controlled construction. These stages use automatic or rule-based filters and are completed before construction and agent evaluation.
| Stage | Cases |
|---|---|
| Raw source records | 1,783 |
| Evidence-qualified | 1,521 |
| Runnable modern base | 1,233 |
| Behavior and check aligned | 1,197 |
| Construction-eligible | 1,130 |
| Construction-verified | 912 |
| Finalized task | 900 |
B.2 Task Provenance
Table 5 reports the provenance of the 900 paired evaluation sets. Each Original Branch is the official case from the listed source, and its Change2Task Branch is reconstructed from that same case. The task families include Application Programming Interface (API) Migration.
| Task family | Source corpus | Cases |
|---|---|---|
| Bug Fix | SWE-bench Live | 129 |
| Bug Fix | SWE-bench Lite | 30 |
| Bug Fix | SWE-Bench Pro | 101 |
| Bug Fix | SWE-bench Original | 151 |
| Bug Fix | SWE-bench Verified | 89 |
| Feature Addition | FEA-Bench | 30 |
| Feature Addition | SWE-rebench V2 PRs | 68 |
| Feature Addition | SWE-Bench++ | 2 |
| Test Generation | SWE-bench Live | 20 |
| Test Generation | SWE-bench Lite | 2 |
| Test Generation | SWE-bench Verified | 39 |
| Test Generation | SWE-Bench Pro | 5 |
| Test Generation | SWE-bench Original | 34 |
| API Migration | PyMigBench | 100 |
| Security Repair | PatchEval executable subset | 84 |
| Security Repair | Vul4J | 15 |
| Security Repair | VJBench | 1 |
Appendix C Construction and Validation Protocol
C.1 Modern Base Selection
Change2Taskselects a base within the upstream lineage of the source PR. It resolves a declared healthy revision first, followed by a declared target revision and the repository’s remote default revision. If the default cannot be resolved, it tries the main, master, devel, develop, and trunk branches in that order. The historical base revision is the final fallback. We tag these fallbacks separately and exclude them from the descendant modern bases used in the environment reuse analysis.
Before freezing the resolved commit hash, Change2Task requires a clean checkout, available runtime dependencies and services, collectable mapped checks, passing target and regression checks on the healthy state, a surviving modern host for the PR behavior, and a permitted transformation surface. The first eligible resolution is frozen before construction, preventing post-hoc base selection.
C.2 Code Mapping and Agent Reconstruction
Level 2: Code Mapping uses a unique source-block correspondence. It extracts consecutive edit groups from non-test source hunks. Removed lines form the historical pre-change block, and added lines form the post-change block. Pure additions, pure deletions, import-only changes, and missing modern files are outside this route. Algorithm 1 summarizes the conservative configuration used in our study.
Input: source patch , healthy modern base
Output: task patch , or Fail
-
1.
paired pre-change and post-change blocks from eligible source hunks.
-
2.
for each do
-
3.
resolve , then its source-directory variant, in .
-
4.
if is unresolved then return Fail.
-
5.
exact occurrences of in .
-
6.
if then indentation-normalized occurrences of .
-
7.
if then return Fail.
-
8.
Reindent to the unique location in .
-
9.
Replace with the reindented .
-
10.
end for
-
11.
Reparse modified files and compute .
-
12.
if is empty, invalid, or touches a protected artifact then return Fail.
-
13.
return .
The optional abstract syntax tree fallback matches a whole function by an identical qualified name and reparses the resulting file. The reported conservative configuration disables this fallback to preserve modern logic outside the uniquely matched block. Code Mapping handles indentation and local context drift. Renamed or relocated symbols, split or merged functions, repeated target blocks, and behavior moved across abstraction layers require Level 3: Agent Reconstruction.
Agent Reconstruction receives the historical PR evidence, the modern behavior host and call context, task checks, protected regression checks, the source change profile, and prior failure evidence. Scoped diff generation handles bounded code contexts, while full-agent worktree editing supports cases that require call-chain inspection. Larger changes can enable adaptive multi-candidate generation within the same attempt budget. Each candidate first passes non-empty-diff, apply, syntax, permitted-artifact, and basic fidelity checks. Surviving candidates are ranked by source change profile fidelity and edit complexity, and the highest-ranked candidate enters full lifecycle validation. The construction agent receives structured feedback for application, target-condition, regression, restoration, scope, or fidelity failures. The loop terminates after acceptance or at most four attempts. For an accepted task patch , the restoration patch comes from a clean inverse modern transformation or a scoped modern repair that passes the same lifecycle and fidelity checks. Cases without a modern behavior host are rejected.
C.3 Matched PR Mirror Protocol
The PR Mirror baseline and Change2Task operate on the same 621 Bug Fix candidates, healthy modern bases, source PR evidence, mapped checks, and relevant modern context. Both use Claude Code with Opus 4.8 under the same total attempt limit, token and time budgets, tool permissions, and final verifier. Their prompts share the same evidence scaffold and output constraints. PR Mirror generates independent one-shot reversal candidates. Each method can generate at most four candidates. Both receive the same aggregate token and wall-clock budget across those candidates. Change2Task can continue with Code Mapping and structured verifier feedback when direct reversal fails. This matched protocol holds the candidate pool and execution envelope fixed while measuring the construction procedures. Bug Fix provides the matched comparison because its failure-inducing reversal, repair output, and test contract align with the original PR Mirror task definition.
C.4 Fidelity Gate
The fidelity gate compares the historical source patch and modern restoration patch across files, hunks, changed lines, symbols, target checks, and regression checks. Both patches encode the forward maintenance change, while task patch constructs the task state in the inverse direction. The six fidelity weights are 0.18, 0.20, 0.28, 0.10, 0.12, and 0.12. The gate requires an aggregate score of at least 0.65, line, hunk, and file ratios of at least 0.50, a line ratio no greater than 2.50, and a regression-check ratio of at least 0.25. These thresholds reject localized simplifications, over-expanded edits, and insufficient regression surfaces. The equal-weight sensitivity analysis is reported in Section F.
Appendix D Prompts and Agent Configuration
D.1 Agent Execution Protocol
Agent Reconstruction uses Claude Code with Opus 4.8 and bounded execution feedback. Evaluation uses the Codex command line interface (CLI) with GPT-5.5, Claude Code with Sonnet 5, Gemini CLI with Gemini 3.1 Pro, and GitHub Copilot with GPT-5.6 Terra. Each agent, set, and branch receives one authoritative clean run with a limit of 1,800 seconds. Final verification has a 300-second limit. Infrastructure failures are rerun separately and do not replace completed behavioral outcomes.
Within each pair, the two branches use the same model version, interface, task intent, visible evidence, tool permissions, context policy, and budgets. A solution is accepted only when its target and regression checks pass and its changes satisfy the task-specific scope. Evaluation agents cannot access construction prompts or traces, the task patch, the restoration patch, or hidden target checks.
D.2 Prompt Templates
The following prompts contain the complete instruction-bearing text used by the corresponding stage. Placeholders enclosed by angle brackets are filled from the frozen task record. Repository files are exposed through an isolated worktree, while task evidence and verifier feedback are inserted into the named fields.
Appendix E Verified Task Recovery
E.1 Recovery by Task Family
Table 6 gives the exact denominators and Wilson 95% confidence intervals (CIs) used in Figure 4(a) of the main paper. Here, finalized denotes tasks that pass every construction and qualification stage and enter the evaluation corpus.
| Family | Eligible | Finalized | Rejected | Recovery [95% CI] |
|---|---|---|---|---|
| Bug Fix | 621 | 500 | 121 | 80.5 [77.2, 83.4] |
| Feature Addition | 122 | 100 | 22 | 82.0 [74.2, 87.8] |
| Test Generation | 126 | 100 | 26 | 79.4 [71.5, 85.5] |
| API Migration | 131 | 100 | 31 | 76.3 [68.4, 82.8] |
| Security Repair | 130 | 100 | 30 | 76.9 [69.0, 83.3] |
| Overall | 1,130 | 900 | 230 | 79.6 [77.2, 81.9] |
E.2 Construction Routes
Routes are assigned by the first construction procedure that produces a finalized task. Patch Reversal directly accounts for 95 tasks. Code Mapping adds 190 tasks whose source blocks require modern correspondence, bringing deterministic construction to 285 tasks. Agent Reconstruction contributes the remaining 615 tasks after the two earlier routes are exhausted. The table below reports disjoint route assignments, so each finalized task appears exactly once.
| Family | Level 1 | Level 2 | Level 3 | Total |
|---|---|---|---|---|
| Bug Fix | 63 | 106 | 331 | 500 |
| Feature Addition | 1 | 25 | 74 | 100 |
| Test Generation | 12 | 17 | 71 | 100 |
| API Migration | 10 | 24 | 66 | 100 |
| Security Repair | 9 | 18 | 73 | 100 |
| Overall | 95 | 190 | 615 | 900 |
E.3 Terminal Rejection Reasons
Each unsuccessful candidate is assigned one terminal reason after all permitted retries. Environment/Preflight denotes repository or task readiness failures. Infrastructure/Harness denotes persistent execution failures after reruns.
| Reason | Bug | Feature | Test | Migration | Security | Total |
|---|---|---|---|---|---|---|
| Environment/Preflight | 26 | 4 | 3 | 8 | 3 | 44 |
| Behavior Alignment | 18 | 3 | 5 | 2 | 5 | 33 |
| Candidate Construction | 22 | 5 | 6 | 4 | 5 | 42 |
| Lifecycle Validation | 23 | 3 | 4 | 11 | 9 | 50 |
| Final Qualification Gate | 12 | 5 | 5 | 4 | 5 | 31 |
| Infrastructure/Harness | 20 | 2 | 3 | 2 | 3 | 30 |
| Total rejected | 121 | 22 | 26 | 31 | 30 | 230 |
The final qualification category combines scope or fidelity failures with semantic review exclusions. Twelve of its 31 cases had passed executable construction but were removed because the historical and reconstructed tasks were not semantically aligned with sufficient confidence.
Appendix F Source Change Profile and Semantic Alignment
F.1 Source Change Profile Components
Table 9 reports the component means underlying Figure 5(a) of the main paper. The macro average gives each task family equal weight. The task-weighted average over all 900 finalized tasks is 0.894.
| Family | Cases | Files | Hunks | Lines | Symbols | Target | Regression | Score |
|---|---|---|---|---|---|---|---|---|
| Bug Fix | 500 | .928 | .855 | .832 | .920 | 1.000 | 1.000 | .903 |
| Feature Addition | 100 | .920 | .884 | .810 | .840 | 1.000 | 1.000 | .893 |
| Test Generation | 100 | .972 | .880 | .872 | .900 | 1.000 | 1.000 | .925 |
| API Migration | 100 | .935 | .860 | .820 | .800 | 1.000 | 1.000 | .890 |
| Security Repair | 100 | .900 | .800 | .680 | .726 | 1.000 | 1.000 | .825 |
| Macro average | 900 | .931 | .856 | .803 | .837 | 1.000 | 1.000 | .887 |
F.2 Score Distributions
Table 10 complements the family means with the within-family distribution of finalized-task scores. Median fidelity ranges from .812 to .928, and the interquartile ranges remain above each family’s minimum qualification threshold. The broader lower tail for API Migration and Security Repair reflects the larger implementation drift accommodated by their task specifications. Every finalized task satisfies its declared profile gate.
| Family | Minimum | 25th pct. | Median | 75th pct. |
|---|---|---|---|---|
| Bug Fix | .750 | .837 | .907 | .977 |
| Feature Addition | .750 | .816 | .890 | .958 |
| Test Generation | .750 | .860 | .928 | .982 |
| API Migration | .700 | .776 | .884 | .949 |
| Security Repair | .650 | .732 | .812 | .902 |
F.3 Fidelity by Construction Level
Table 11 uses the same construction route assignments reported for the first research question and summarizes the profile fidelity achieved by each route.
| Level 1: Patch Reversal | Level 2: Code Mapping | Level 3: Agent Reconstruction | ||||
| Family | Cases | Score | Cases | Score | Cases | Score |
| Bug Fix | 63 | 1.000 | 106 | .882 | 331 | .891 |
| Feature Addition | 1 | .990 | 25 | .910 | 74 | .886 |
| Test Generation | 12 | 1.000 | 17 | .920 | 71 | .914 |
| API Migration | 10 | .970 | 24 | .910 | 66 | .871 |
| Security Repair | 9 | .950 | 18 | .837 | 73 | .807 |
| Overall | 95 | .992 | 190 | .888 | 615 | .881 |
As a sensitivity check, replacing the declared weights with equal weights yields family scores of .923, .909, .937, .903, and .851 for Bug Fix, Feature Addition, Test Generation, API Migration, and Security Repair. The ordering of the five task families is unchanged.
F.4 Semantic Alignment Audit
The semantic audit examines all 912 construction-verified candidates before the downstream corpus is finalized. The profile gate qualifies the edit and verification surface, and the semantic audit evaluates the maintenance trigger, obligation, and invariant. For every paired case, the audit records the historical and modern trigger, expected behavior, violated invariant, affected API, source-to-modern symbol or call-chain mapping, and any semantic-drift justification. The evidence also includes positive triggers, negative or non-trigger cases, boundary inputs, adjacent invariants, unrelated behavior checks, and restoration checks defined by the task contract.
Kimi K3 and DeepSeek V4 Pro independently receive an anonymized pair containing the historical and modern tasks. They do not see the construction level, construction model, construction trace, profile score, candidate ranking, or downstream outcome. Each judge assigns one of the following labels: exact intent match, intent-preserving adaptation, related but weakened, related but shifted, non-equivalent, or insufficient evidence. The first two labels qualify a pair as an intent-preserving match.
| Family | Cases | Kimi K3 | DeepSeek V4 Pro | Both judges | |
|---|---|---|---|---|---|
| Bug Fix | 500 | 96.2 | 95.8 | 94.4 | .77 |
| Feature Addition | 100 | 95.0 | 96.0 | 92.0 | .73 |
| Test Generation | 100 | 97.0 | 95.0 | 93.0 | .76 |
| API Migration | 100 | 94.0 | 93.0 | 89.0 | .69 |
| Security Repair | 100 | 92.0 | 93.0 | 88.0 | .68 |
| Overall | 900 | 95.4 | 95.1 | 92.7 | .74 |
Both judges independently assign an intent-preserving label to 834 of the 912 audit entrants. Two authors manually adjudicate the remaining 78 using the historical maintenance intent, behavioral trigger, expected behavior, source-to-modern mapping, contrastive checks, and restoration behavior. They accept 66 as exact intent matches or intent-preserving adaptations and exclude 12. The exclusions arise from shifted behavioral triggers, weakened boundary conditions, ambiguous source-to-modern mappings, or insufficient contrastive evidence. The resulting corpus contains finalized tasks. Within this corpus, the two judges agree directly on 92.7% of cases. Their direct joint acceptance over all audit entrants is 91.4%.
Appendix G Paired Agent Outcome Statistics
G.1 Paired Agreement Statistics
Table 13 aggregates the 20 contingency tables formed by four agents and five task families in Table 2 of the main paper. Positive and negative agreement summarize concordance on solved and unsolved outcomes, respectively. The paired solve-rate interval uses the paired binary-outcome standard error, and the McNemar result is two-sided and exact.
Let , , , and denote both solved, Original only, Change2Task only, and neither solved. Raw agreement is , and Cohen’s adjusts this value for agreement expected from the two branch marginals. Positive agreement is , while negative agreement replaces with . Solved-set Jaccard overlap is . The paired solve-rate difference is , and the exact McNemar test evaluates the two discordant cells and .
| Statistic | Value |
|---|---|
| Matched agent and task pairs | 3,600 |
| Both solved / Original only / Change2Task only / neither | 1,292 / 186 / 186 / 1,936 |
| Raw agreement | 89.7% |
| Cohen’s | 0.787 |
| Positive agreement | 87.4% |
| Negative agreement | 91.2% |
| Solved-set Jaccard overlap | 77.6% |
| Paired solve-rate difference [95% CI] | 0.0 pp [-1.1, 1.1] |
| Exact McNemar -value | 1.0 |
Appendix H Environment Reuse and Cost Accounting
H.1 Family-Level Resource Accounting
Table 14 reports the totals underlying Figure 7 of the main paper. The 388 bases are distinct revision-bound environments in the evaluated corpus. Setup time includes checkout, dependency and service preparation, build and check discovery, and healthy-state preflight. Retained storage includes base artifacts and task-specific patches, checks, and metadata, with shared layers counted once. Total shared cost also includes task materialization and verification. Storage is reported in gigabytes (GB).
| Family | Tasks | Bases | Tasks/base | Time | Time/task | Storage | Storage/task |
|---|---|---|---|---|---|---|---|
| Bug Fix | 500 | 116 | 4.31 | 530 h | 1.06 h | 495 GB | 0.99 GB |
| Feature Addition | 100 | 39 | 2.56 | 141 h | 1.41 h | 162 GB | 1.62 GB |
| Test Generation | 100 | 49 | 2.04 | 163 h | 1.63 h | 202 GB | 2.02 GB |
| API Migration | 100 | 100 | 1.00 | 275 h | 2.75 h | 406 GB | 4.06 GB |
| Security Repair | 100 | 84 | 1.19 | 240 h | 2.40 h | 342 GB | 3.42 GB |
| Overall | 900 | 388 | 2.32 | 1,349 h | 1.50 h | 1,607 GB | 1.79 GB |
H.2 Monetary Cost Accounting
We price environment compute at $0.3333 per hour and storage plus registry retention at an effective $0.0484 per GB over the study period. Automation and model calls cover environment preparation and task construction. Execution compute is counted in the environment compute row. Failed construction attempts are included in the Change2Task condition. Both conditions use the same prices and retention boundary. The separate-setup condition charges the matched preparation and retained-storage components once per task. The reuse condition charges shared components once per frozen modern base and adds each task-specific variant. Costs are computed from unrounded measurements; the displayed resource totals and unit prices are rounded.
| Component | Separate task setup | Reused modern bases | Difference |
|---|---|---|---|
| Environment compute | $1,080.00 | $449.67 | -$630.33 |
| Storage and registry | $270.00 | $77.76 | -$192.24 |
| Automation and model calls | $567.00 | $1,182.57 | +$615.57 |
| Total | $1,917.00 | $1,710.00 | -$207.00 |
| Cost per finalized task | $2.13 | $1.90 | -$0.23 |
H.3 Complementarity with RepoLaunch
RepoLaunch prepares the historical repository revision. Change2Task reconstructs the task on a healthy modern base. Across the same 1,130 construction-eligible changes, both routes succeed on 680 cases, Change2Task alone succeeds on 220, RepoLaunch alone succeeds on 195, and both fail on 35. Change2Task covers 79.6% of the eligible pool. RepoLaunch adds 17.3%, raising combined coverage to 96.9% and leaving 3.1% unresolved.
Appendix I Additional Analyses and Case Studies
I.1 Feature Addition Across Repository Evolution
This case captures the central distinction between reconstruction and source checkout. A historical rollback would also remove behavior introduced after PR 603. Change2Task preserves that later behavior and materializes the missing feature inside the repository’s current implementation context.
I.2 Bug Fix with a Modernized Implementation
The case demonstrates that Agent Reconstruction also handles compact maintenance obligations. It retains the historical trigger and expected behavior while keeping the modern edit surface aligned with the seven-line source change.