arXiv:2610.19368cs.SEOct 2026

Manuscript Offprint

arXiv:2610.19368

OS-Bench: Evaluating SWE Agents on Cross-OS Code Migration

Qirui Jin, Kenan Li, Liao Zhu, Lingching Tung, Yikai Zhang, Yijia Wu, Zijian Jin, Pengfei Gao, Yu Kang, Qingwei Lin, Wenke Lee

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

Qirui Jin1,∗^{1,*}, Kenan Li2,∗^{2,*}, Liao Zhu2^{2}, Lingching Tung2^{2}, Yikai Zhang2^{2}, Yijia Wu2^{2}, Zijian Jin2^{2}, Pengfei Gao2^{2}, Yu Kang2^{2}, Qingwei Lin2^{2}, Wenke Lee1^{1}

1^{1} Georgia Institute of Technology 2^{2} Microsoft

Language-model (LM) agents are increasingly evaluated on repository-level software engineering (SWE) benchmarks derived from GitHub issues and pull requests. Although these benchmarks cover a broad range of development tasks, they provide limited insight into a common yet technically distinct challenge: migrating an existing implementation from one operating system (OS) to another while preserving behavior on both. We introduce OS-BENCH, an executable benchmark for cross-OS code migration between Linux and Windows. Motivated by case studies showing that cross-platform features are frequently implemented on one OS before support is added for another, OS-BENCH identifies migration opportunities by comparing execution coverage collected from the same repository on both systems. Platform-specific regions are then verified, organized into five migration scenarios, and transformed into repository-level tasks with target-platform tests and source-platform regression tests. The resulting benchmark contains 140 validated tasks from 111 repositories across C, C++, C#, Go, and Rust, comprising 91 Windows-to-Linux and 49 Linux-to-Windows migrations. We evaluate six models with SWE-agent, Claude Code, OpenHands, and Win-agent. The best configurations achieve only 26.4% success on Linux-target tasks and 20.4% on Windows-target tasks while preserving correctness across both systems. These results indicate that cross-OS migration is a challenging and underexplored capability, and OS-BENCH is a testbed for improving platform-aware SWE agents.

Dataset: SWE-bench-Live/OS-bench

Correspondence: qiruijin@gatech.edu, kenan.li.24@ucl.ac.uk

  • Equal contribution. †\dagger Corresponding authors.

1 Introduction

Cross-platform support is essential for software libraries, developer tools, and applications that need to run across different computing environments. Supporting a new operating system (OS), however, requires more than recompiling the same source code. Developers often need to handle differences in system APIs, filesystem and path conventions, process and signal behavior, networking interfaces, text encodings, build toolchains, and command-line environments. A migration patch must therefore implement the required behavior on the target platform while preserving existing functionality on the source platform.

LM-based software engineering agents can explore repositories, execute tests, and modify multiple files in response to natural-language instructions. Their progress is typically evaluated on benchmarks built from real GitHub issues or pull requests [1−4][1-4]. While these benchmarks capture realistic repository-level development tasks, they usually evaluate each task in only one execution environment. As a result, they do not directly test whether an agent can identify an OS-specific implementation gap, adapt behavior across incompatible platform abstractions, work effectively in

Unix Implementation commit 497b1ec, January 21, 2012

src/unix/udp.c

@ -509,6 +509,24 @ int uv_udp_set_membership return 0;}

+int uv_udp_set_multicast_ttl(uv_udp_t* handle, int ttl) { + if (setsockopt(handle->fd, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof ttl) == -1) { + uv_set_sys_error(handle->loop, errno); + return -1; } + return 0; }

+int uv_udp_set_broadcast(uv_udp_t* handle, int on) { + if (setsockopt(handle->fd, SOL_SOCKET, SO_BROADCAST, &on, sizeof on) == -1) { + uv_set_sys_error(handle->loop, errno); + return -1; } + return 0; }

int uv_udp_getsockname(uv_udp_t* handle, struct sockaddr* name,

Windows Implementation commit 726e36c, January 23, 2012

src/win/udp.c

@ -578,3 +578,24 @ void uv_process_udp_send_req DECREASE_PENDING_REQ_COUNT(handle); +int uv_udp_set_multicast_ttl(uv_udp_t* handle, int ttl) { + if (setsockopt(handle->socket, IPPROTO_IP, IP_MULTICAST_TTL, (const char*)&ttl, sizeof ttl) == -1) { + uv_set_sys_error(handle->loop, errno); + return -1; } + return 0; }

+int uv_udp_set_broadcast(uv_udp_t* handle, int on) { + if (setsockopt(handle->socket, SOL_SOCKET, SO_BROADCAST, (const char*)&on, sizeof on) == -1) { + uv_set_sys_error(handle->loop, errno); + return -1; } + return 0; }

#define SOCKOPT_SETTER(name, option4, option6)
int uv_udp_set_##name(uv_udp_t* handle, int value) { \

Figure 1 A cross-OS code migration example from repository libuv/libuv. The functionality was first implemented on Unix in an earlier commit and subsequently implemented on Windows in a later commit. During execution, each platform invokes only its corresponding platform-specific implementation.

the target operating system, and preserve existing functionality on the original OS.

Our preliminary case studies illustrate how this challenge arises in real multi-platform repositories. In these cases, functionality is implemented for one platform first, such as Linux, and later ported to another, such as Windows, using a separate platform-specific implementation. Figure 1 shows an example from the asynchronous I/O library libuv/libuv. Support for configuring UDP sockets for multicast and broadcast was first introduced in the Unix backend and was later added to the Windows backend in a separate commit. The two implementations expose the same user-facing behavior, but they live in different code paths and rely on different operating-system interfaces.

Although such histories reveal migration work, migration tasks cannot be reliably extracted directly from individual commits. A single migration may span multiple commits, and each commit may mix migration changes with unrelated bug fixes, refactoring, or feature development. Using a commit as a task can therefore omit changes needed to complete the migration or include edits unrelated to it. Constructing a coherent task from commit history therefore requires substantial manual effort to trace the migration across multiple commits and disentangle relevant edits from unrelated changes.

We address this challenge requiring heavy manual workload and automate the task-construction process by using differences in execution coverage to identify platform-specific implementations. When a repository's tests are run on Linux and Windows, code associated with one backend is exercised on one OS but not the other. We build OS-BENCH around this observation using a differential-coverage pipeline. We first build and test candidate repositories in native Linux and Windows environments, compare their coverage traces, and verify which differences reflect platform-specific behavior. We then remove verified target-platform implementations to construct migration tasks, retaining tests that fail when the implementations are missing and regression tests that check unrelated behaviors are preserved. This procedure creates controlled restoration tasks without requiring migration changes to align with historical commit boundaries.

OS-BENCH contains 140 executable tasks from 111 open-source repositories spanning C, C++, C#, Go, and Rust. It includes both migration directions: 91 tasks migrate functionality supported on Windows to Linux, while 49 migrate Linux-supported functionality to Windows. Each task provides a repository at a reproducible base commit, a natural-language migration objective, an executable environment, fail-to-pass tests for the target functionality, and pass-to-pass tests for regression checking. We evaluate each patch on both the target and source platforms to check that it restores the missing functionality while preserving existing behavior under the test suites.

We evaluate six models using three Linux agent harnesses—SWE-agent, Claude Code, and OpenHands—as well as the Windows-native Win-agent harness. The strongest configuration solves only 26.4% of Linux-target tasks, while the best Windows configuration reaches 20.4% on Windows-target tasks when success requires the patch to work correctly on both systems. Performance also varies substantially across languages, migration directions, and agent harnesses. In particular, changing the harness can noticeably change the performance of the same underlying model. These results show that reliable migration remains difficult and that performance depends on both the model and the tools it uses to interact with the operating system.

Our main contributions are as follows:

  • We formulate cross-OS code migration as an executable repository-level SWE task, where an agent must implement missing behavior on a target platform without breaking functionality on the source platform.

• We introduce an LM-assisted, scalable task-construction pipeline that uses differential execution coverage between Linux and Windows to identify and verify platform-specific implementations without relying on historical commit boundaries.

• We release OS-BENCH, containing 140 validated tasks from 111 repositories across five programming languages and both Linux-to-Windows and Windows-to-Linux migration directions.

• We evaluate six models with four agent harnesses and find low cross-platform success rates, with substantial variation across languages, migration directions, and agent designs.

References (22)