SJTU's Harness-R1: Fixing AI Agents by Rewiring Runtime Code, Not Retraining

alex_verem · x · 2026-08-06

A team at Shanghai Jiao Tong University built Harness-R1, demonstrating that fixing a failing AI agent doesn't require building a larger model. Instead, the problem can be addressed by rewiring the code around it.

Instead of retraining the agent itself, the researchers trained a separate 9B parameter "harness engineer" model while keeping the agent's weights completely frozen. When an agent misuses tools, loses track of state, or repeats failed actions, the root cause often lies in the code that feeds it context and validates its actions. The engineer model diagnoses these failure trajectories and writes executable code patches to modify the runtime environment.

This approach offers a cost-effective new perspective for improving AI agent stability in real-world deployments.

Original post →

More from coding & agent

coding & agent channel →