Sitemap
Towards AI

We train AI Engineers. We deploy Enterprise AI. Join 100K+ AI practitioners at Towards AI Academy or reach out for help making your company AI native. towardsai.com

Member-only story

Coding an Agent: A Harness That Rewrites Itself

7 min read3 days ago

--

An agent is two things wearing one name. There is the model, a few billion weights that predict the next token, and there is everything wrapped around it: the instructions it reads before your first message, the tools it may call, the skills it can load, the rules that keep it from doing something regrettable with rm. The wrapping is called the harness. Making the model better means training it again, which takes data, hardware and patience. Making the harness better means editing text files, which takes an afternoon and an opinion.

The trouble is the opinion. Every harness edit is a guess about how the model will behave, and the only way to check a guess is to run the agent and watch. Google Cloud AI Research published a method in October 2026 that lets an agent do that loop for itself, without anyone handing it the right answers. It is called Harness², and this post explains how it works and how I rebuilt it in plank, the Rust coding agent this series has been building: a small local model does the work, hosted models do the editing, and a tuner called pt tune runs the loop. This is the theory half. The next post is the practice half: the tasks, the measurements, the commands and the mistakes.

Press enter or click to view image in full size

--

--

Former Software Engineer at Google, still haven't found what I'm looking for. Retro computing, 6502 assembly, Rust. Full record: whois.enzolombardi.net

Towards AI
Towards AI

Published in Towards AI

We train AI Engineers. We deploy Enterprise AI. Join 100K+ AI practitioners at Towards AI Academy or reach out for help making your company AI native. towardsai.com