Software-in-the-loop reconstruction (SWR) reuses existing scientific programs as both reference solutions and verifiers to generate training tasks for terminal agents. For each workflow, the method executes multiple input configurations, shows the agent some input-output pairs, and asks it to reconstruct the program. The agent's program is then evaluated on hidden configurations against the original workflow's outputs, providing verified trajectories for supervised fine-tuning.
The authors instantiated SWR with 500 workflows across 46 software families, including tools from physics, biology, and earth sciences. An agent solved 838 tasks across three attempts, producing 1,422 verified trajectories. Fine-tuning a language model on these trajectories improved its performance on Terminal-Bench 2 from 47.94% to 53.56%, outperforming matched-token controls.
This work is interesting because it addresses a key bottleneck in building terminal agents for scientific domains: the need for domain-specific verifiers and reference solutions for each task. By reusing existing software, the method scales automatically, requiring only new workflows and input configurations rather than hand-authored tasks.