MEDSWE-BENCH: A Benchmark for Biomedical Software Engineering Agents
Subtle bugs in biomedical software can silently invalidate scientific and clinical conclusions without triggering runtime failures. Existing benchmarks miss this failure mode: PR-mined coding benchmarks suffer from pretraining leakage, while biomedical agent benchmarks largely omit multilingual, repository-level tasks, rigorous tests, and strong sandboxing. We introduce \bench{}, comprising 81 feature-level biomedical engineering tasks across 33 open-source repositories, 8 translational domains, and 8 languages. To construct it, we develop \forge{}, a multi-agent framework that extracts live-repository tasks, stress-tests contract-grounded scientific oracles under formula-free prompts, and evaluates patches in history-stripped, offline containers. Across six frontier reasoning models, top systems (GPT-6.2 Sol and Claude Fable 5) reach only 49.4\% and 45.7\% accuracy; open-source models trail proprietary ones by 3.1times while using 27times more tokens per solve, and 33.3\% of tasks remain unsolved. Trajectory auditing reveals that 86.1\% of true failures stem from scientific identification and realization rather than localization---over 80\% of which pass agents' local tests while violating clinical conventions or repository contracts---and 75.1\% attempt blocked upstream lookups, underscoring the need for hardened sandbox isolation.
