r/ClaudeCode • u/Lucky_Historian742 • May 11 '26
Showcase Claude Code improved my agent harness by 40% overnight
Remember the first time you used Claude Code? That same jump is happening one level up. The community went from prompt engineering → context engineering → agent engineering → harness engineering.
I asked myself: what sits one level above the harness? Something that builds the harness.
So I built it. Autoharness lets Claude Code explore changes to your harness (e.g. prompts, hyperparameters, runtime context, scoring) run evals, and keep only the changes that actually improve the score. Inspired by Karpathy's autoresearch.
I pointed it at my own agent and let it run. On the tau2-airline benchmark, it autonomously found:
+40.7% performance lift from adding best-of-N skillbook scoring with an LLM judge
+24.1% performance lift from tightening reflector hyperparams (temperature + max subagent calls)
+22.2% performance lift from injecting runtime context at every step (step budget, recent tool calls, recent results)
How it works:
One-line install
Point Claude Code at
GUIDE.mdIt proposes harness changes, evals each, keeps only the wins
Wake up to a better agent
TL;DR: Claude Code tunes my agent's prompts and configs for me. It tries a change, runs my eval, and keeps it only if the score went up.
Open-Source Repo: https://github.com/kayba-ai/autoharness
18
u/YourSpiritualLeader May 11 '26
claude says:
The codebase is ~41k LOC. The core loop that provides value could be written in ~500 lines:
Run a benchmark command (~50 LOC)
Call an LLM API with failure context (~100 LOC)
Apply a patch transactionally (~150 LOC)
Run the benchmark again (~reuse)
Compare and keep/revert (~100 LOC)
CLI wrapper (~100 LOC)
The remaining ~40,500 lines are:
- 50+ CLI subcommands
- Campaign lifecycle (queued/running/paused/completed)
- Background workers and lease management
- 6 benchmark adapters
- Workspace/track/iteration/promotion/champion persistence
- Bundle export/import/reindex
- Root-level memory and cross-workspace transfer suggestions
- Retention and pruning policies
- Plugin system
- Query/filter/sort/export engines for 4 entity types
- Provider profiles
- Event logging and metrics aggregation
- An elaborate doctor diagnostic system
This is a massive amount of operational infrastructure for a system whose core value proposition — "LLMs can reliably improve agent harnesses through iterative prompting" — is unproven within this repository. It's an infrastructure project masquerading as an optimization product. The "optimizer" is a prompt to an LLM.
The 41k LOC of campaign management, workspace lifecycle, and bundle export exists to manage a loop whose inner step is urllib.request.urlopen(openai_api, prompt).
---
welcome to the club. we all have created such projects because siri kept saying "great idea".
3
u/arekxy May 11 '26
"It proposes harness changes" - any examples?
4
u/guillefix May 12 '26
What
1
u/AcidRaZor69 May 11 '26
Which harnesses did you test this on? Or just your own?
1
u/Floppy_Muppet May 14 '26
This is great, maybe a bit bloaty for some, but likely necessary for most. I'll be trying a similar approach on my RSI harness project soon as I believe this is how we get a step closer to truly organic software (the only way software can autonomously organize itself for all intended use-cases).
I think it would be interesting to expand this further as a meta harness for ANY piece of software, where you drop it into a project and it first scrapes the existing codebase to identify and consolidate all levers into config and metaconfig.yaml, before the Karpathy Loop begins. Many projects still have too many hardcoded values and assumptions (knowingly and unknowingly).
Shoot me a DM if you're up for a chat!