A PyTorch-like framework for training reusable agent harnesses

Megadragon9 · reddit · 2026-07-21

A Reddit post introduces harness-training, a PyTorch-like framework for training a reusable agent harness rather than a single task model.

The core idea is to train the harness once against a fixed task LLM and environment, then swap in different task LLMs later and evaluate the same frozen harness across new environments. The author says the current implementation supports any OpenAI-compatible API and can train against Terminal-Bench or SWE-Bench, with the framework designed to be extensible to other task environments.

The post also explains the training loop: a baseline-vs-candidate verdict is treated like loss, successful candidate changes are promoted via git commits, rejected ones remain as refs, and the project aims to improve general capability transfer across models and tasks. The accompanying blog post reports that the framework improved results on Terminal Bench 2.0 and even transferred from SWE-Bench-style training to terminal tasks. A key lesson from the work was that determinism was missing in the original design.

Related event: Research: Harness Drives Generalization in Reinforcement Language Models(9 posts)→

Original post →

More from coding & agent

coding & agent channel →