GameSWE: Evaluating Coding Agents in Live Game Runtimes

Hui Shen, Zhihan Liu, Xingzhi Li, Sihan Xu, Yifei Zuo, Wenhao Chai, Jisen Li, Zhuoran Yin, Changyi Yang, Chenyang Zhao, Wenjie Qu, Xianbang Wang, Xuesong Ye, Yunta Hsieh, Jiaxuan Luo, Zhuhan Bao, Zhengshen He, Yunge Wen, Jianing Ma, Guobin Zhang, Xin Wang, Zhongwei Wan, Hangrui Cao, Yuqing Jian, Shatong Zhu, Yifeng Liu, Xueshen Liu, Minkyoung Cho, Boyuan Zheng, Hei Ting, Chan, Zesen Zhao, Jingxuan Zhang, Hengyuan Zhang, Zunhai Su, Jing Xiong, Chaofan Tao, Ziheng Zhang, Kejing Xia, Xing Wei, Yuchen Jiang, Rui Hu, Xutao Ma, Zhen Qi, Zhen Zhang, Ping Zhang, Yichi Chen, Simo Zhang, Mengyao Wen, Xin Xu, Jiawei Lu, Yifan Zhang, Deyang Luorong, Ziyu Liu, Jirong Yang, Ruoke Zhang, Chenwei Wu, Minchen Luo, Yuanshuo Lu, Xiaoyin Qu, Qiao Xiao, Xinyuan Dai, Sangyu Pan, Muhammad Khaquan, Haizhong Zheng, Rui Sun, Zhongzhu Zhou, Yuwei Fang, Tianfu Fu, Kai Zhang, Ngai Wong, Mi Zhang, Zhaoran WangarXiv 2026

TL;DR

Passing a repository’s unit tests doesn't guarantee your code will survive contact with the real world—especially when that code is a plugin living inside a complex, stateful host program. GameSWE puts AI coding agents to the ultimate practical test by having them write and fix mods for 12 popular video games (like Minecraft, Stardew Valley, and Balatro) and verifying their work directly inside the live, running games. Even the strongest frontier models stumble at the boundary between their code and the game engine, frequently declaring victory on patches that crash or fail once the game actually boots up.

What Problem Does This Paper Address?

If you've been following AI software engineering, you know the standard playbook established by benchmarks like SWE-bench: give an agent a codebase and a GitHub issue, let it edit the files, and run the repository’s test suite inside an isolated container.

That works great for standalone libraries, complete with neatly mocked environments. However, a huge amount of real-world software—browser extensions, plugins, enterprise add-ons—doesn't run on its own. It runs inside a live host program that the developer doesn't own or control. Whether a plugin actually works depends on messy runtime realities: load orders, undocumented globals, third-party extensions sharing the same memory, and stateful lifecycle events like saving, reloading, or a player respawning. Repository unit tests only catch what their authors thought to mock. Code can look pristine in isolation and still fall apart the moment it meets its host.

Methods

To bridge this gap, the authors use video game modding as a natural, reproducible proving ground. They built a four-stage live-runtime verification harness that evaluates AI-generated code without mocks or LLM-as-a-judge approximations:

Figure 2: Overview of GameSWE. Repair tasks provide bug reports and an existing mod; construction tasks provide a feature request and the game interfaces it builds on. The agent inspects and edits the code without access to the game. The live-runtime harness then builds the submission, loads it into the real game or dedicated server together with the pinned third-party mods it depends on, and runs fail-to-pass and pass-to-pass tests inside the running game (Section 3.2). The scenes illustrate the two task types and are not recorded agent outputs.
  1. Agent Workspace (Blind to Runtime): Models are placed in a standard shell-and-text scaffold with the mod’s source code, API documentation, and task instructions—but zero access to the game binary, the test suite, or third-party dependencies.
  2. Build & Load: Once the agent submits its patch, the harness compiles the mod using the game’s actual toolchain and loads it into the real game (or dedicated server) alongside pinned third-party mods.
  3. In-Game Fixtures: Hand-written fail-to-pass (F2P) tests check the new fix/feature, while pass-to-pass (P2P) tests ensure existing behavior isn't broken. Crucially, these tests are in-game fixtures—automated sequences that load saves, place items, kill and respawn players, or restart servers.
  4. Clean Teardown: A task is only counted as resolved if it builds, loads, passes every test, and shuts down cleanly without errors.

Datasets

The paper introduces GameSWE v1, a newly constructed benchmark of 150 tasks drawn from open-source mods across 12 released games (including Minecraft, RimWorld, Garry’s Mod, Don’t Starve Together, Terraria, and Palworld) spanning five languages: Lua, Java, C#, SourcePawn, and Squirrel.

Figure 1: GameSWE. Mod repair and construction tasks in the benchmark.
  • Task Split: 100 repair tasks (fixing real or injected bugs in existing mods averaging ~8,900 lines) and 50 construction tasks (building a new mod from scratch or a tiny skeleton).
  • Comparison to Existing Benchmarks: While SWE-bench repositories are much larger overall, GameSWE requires larger average code edits (221.4 lines vs. 32.8 lines) and runs more F2P tests per task (17.4 vs. 9.1). Unlike recent game-dev benchmarks where agents build toy games from scratch, GameSWE tests extending shipped commercial software alongside external third-party mods.

Key Insights and Ideas

  • Agents’ self-checks create a massive illusion of competence: Without access to the live game, agents write their own syntax checks and mock scripts based on how they assume the host works. In 70.0% of failed attempts, the agent confidently submitted its work as complete; in 31.0%, it explicitly claimed its own tests passed—right before failing in the actual game.
  • Failures cluster at the code-host boundary: Nearly 70% of unresolved submissions compile and load into the game before failing. Agents fail in three telling ways: hallucinating plausible APIs that don't exist in that game version, violating strict file-packaging rules, or writing core logic that works in isolation but isn't wired into every game lifecycle event (like world reloads).
  • Ecosystem fluency doesn't transfer evenly: Even though task difficulty was calibrated across games, models that aced Minecraft or Balatro hit a brick wall on Palworld. Knowing how to code in Lua doesn't mean an agent understands a specific engine's quirks.

Key Results

The authors evaluated seven frontier and open-weight models (single attempt per task, equal weighting across games):

  • Overall Resolution Rates: Claude Opus 5.5 led at 69.0%, followed by GPT-6 Astra (61.0%), Kimi K3.1 Pro (49.5%), and DeepSeek-V4.1-Flash (44.9%). Three models (MiniMax M3.1 Flash, GLM 5.3 Flash, and Qwen 3.8 27B) scored at or below 25.0%.
  • Building vs. Fixing: Every single model found building mods from scratch much harder than debugging. Claude Opus 5.5 solved 75.0% of repair tasks, but dropped to 56.0% on construction tasks; weaker models solved between 2.0% and 16.0% of constructions.
  • Wild Per-Game Variance: Even top performers swung wildly depending on the host game. GPT-6 Astra achieved 100.0% on Minecraft and Balatro, yet scored 0.0% on Palworld (where five of seven models scored zero).

Limitations and Future Work

  • Deliberately "Blind" Agents: In this setup, agents cannot run the game interactively to test their hypotheses—they must get it right from code and documentation alone. Evaluating agents that can interactively playtest or read live runtime logs remains an open step.
  • Current Scope & Co-loading: GameSWE v1 is a snapshot of 12 games and 150 tasks, and third-party mods are currently loaded by default only when the target mod depends on them (20 tasks), though a 4-game pilot co-loading unrelated popular mods showed nearly identical test outcomes.
  • A Living Benchmark: The authors designed GameSWE to expand continuously, planning future versioned snapshots that add new games, programming languages, and modding frameworks as agent capabilities evolve.

Summary updated

BibTeX
@misc{shen2026gameswe,
  author = {Hui Shen and Zhihan Liu and Xingzhi Li and Sihan Xu and Yifei Zuo and Wenhao Chai and Jisen Li and Zhuoran Yin and Changyi Yang and Chenyang Zhao and Wenjie Qu and Xianbang Wang and Xuesong Ye and Yunta Hsieh and Jiaxuan Luo and Zhuhan Bao and Zhengshen He and Yunge Wen and Jianing Ma and Guobin Zhang and Xin Wang and Zhongwei Wan and Hangrui Cao and Yuqing Jian and Shatong Zhu and Yifeng Liu and Xueshen Liu and Minkyoung Cho and Boyuan Zheng and Hei Ting and Chan and Zesen Zhao and Jingxuan Zhang and Hengyuan Zhang and Zunhai Su and Jing Xiong and Chaofan Tao and Ziheng Zhang and Kejing Xia and Xing Wei and Yuchen Jiang and Rui Hu and Xutao Ma and Zhen Qi and Zhen Zhang and Ping Zhang and Yichi Chen and Simo Zhang and Mengyao Wen and Xin Xu and Jiawei Lu and Yifan Zhang and Deyang Luorong and Ziyu Liu and Jirong Yang and Ruoke Zhang and Chenwei Wu and Minchen Luo and Yuanshuo Lu and Xiaoyin Qu and Qiao Xiao and Xinyuan Dai and Sangyu Pan and Muhammad Khaquan and Haizhong Zheng and Rui Sun and Zhongzhu Zhou and Yuwei Fang and Tianfu Fu and Kai Zhang and Ngai Wong and Mi Zhang and Zhaoran Wang},
  title = {{GameSWE: Evaluating Coding Agents in Live Game Runtimes}},
  year = {2026},
  eprint = {2611.39516},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.39516},
}
Figure