Skip to content

Hill-Climbing an Agent: Claude's hillclimb, Google's eval optimize, Harness² and How Not to Overfit Your Eval

Anthropic and Google shipped tools that improve an agent by searching prompts, tools and settings against an eval, and papers did the same for whole harnesses. How agent hill-climbing works and the rules that stop it overfitting.

BY AIAGENTINTERVIEWS EDITORIAL · EDITORIAL TEAM · UPDATED NOVEMBER 24, 2026 · 6 MIN READ

PRACTICE THIS:Improving the harness, not the model ·Accept an automated harness edit?

"Hill-climbing" used to be optimisation jargon. This autumn it became a product feature. On 28 September Anthropic described two new commands in its Claude Code skill for the Claude API, one that builds an eval and one that hill-climbs an agent against it. On 28 October Google's developer blog walked through "hill-climbing agent quality" with an eval optimize command in its Agents CLI. Between them, a run of research papers did the same thing to whole agent harnesses, the most cited being Harness² (9 October).

The idea is simple, and so is the way it goes wrong: an optimiser searching hard enough will find changes that improve the score without improving the agent. This article covers what the new tools do, what the research found, and the rules that keep hill-climbing honest. Sources were checked on 24 November 2026.

What is being climbed

An agent has many surfaces you can change without retraining a model. Anthropic's post lists them: the system prompt, skills, tool descriptions, the model and effort setting, and the harness code itself. Hill-climbing means changing one, measuring on an eval, keeping the change if the score improves, and repeating. Done by hand, it is ordinary agent development. Done by an agent or an optimiser, it can try hundreds of variants in an afternoon, and that is where the risk comes from.

The new tools

Anthropic (28 September). /claude-api build-eval builds an evaluation; /claude-api hillclimb tunes against it. The rules the post sets out are the most useful part:

  • Split cases randomly into train and test, and never let the optimiser see the test set.
  • Keep a change only if both splits improve. If train rises while test stays flat, treat it as overfitting and revert.
  • Never paste failing cases into the prompt, and keep reference answers out of the agent's reach.
  • Check that the noise floor is below the smallest improvement you would act on.
  • Pick the final version by test score, with confidence intervals.

The post reports the skill's own score moving from 66.1% to 87.9%. In its customer-support example, the configuration the climb chose scored 98.9% on the cases it was tuned on and 90.5% on held-out tickets. The second number is the one to quote; the gap between them is exactly what the rules are there to catch.

Google (28 October). The Agents CLI's eval optimize runs automated prompt hill-climbing with GEPA, a reflective optimiser that rewrites prompts from execution traces and feedback. The post is candid that GEPA sometimes finds variants that score higher by overfitting to the metric's wording, and relies on human review as the control. Its demonstration uses four eval cases, which is enough to show the workflow and nowhere near enough to trust a result.

Others. Arize applied Anthropic's loop to production traces in October and added a rule worth keeping: the judge model should not be the model you are testing. Prime Intellect's verifiers added a GEPA command on 12 October. And the Claude Code team's 16 November post on verification describes tuning recall "up to the point where the next improvement would be overfitting to the eval", with a tuning set kept separate from a fixed test set.

What the research found

The papers this autumn optimised whole harnesses, not just prompts:

  • Harness² (9 October, Google Cloud AI Research and Northwestern University): a recursive loop in which an editor agent proposes harness changes, probes them on tasks and keeps what behavioural contrasts support. It reports gains of up to 11.5 points on WorkBuddy-Bench, 4.5 on JobBench and 11.8 on LAB. It also reports that task-specific self-improvement fails to generalise to new scenarios. Our lesson on improving the harness, not the model covers its design.
  • ActiveSaddler (1 October) treats the order of training scenarios for harness optimisation as a non-stationary bandit, reporting 4.4 and 7.5 point gains in test pass@1 on GAIA2 and Terminal-Bench 2.0 over a fixed order.
  • Self-evolving harnesses (first version 29 September, revised 20 November) start from a 49-line seed harness with strictly separated training and held-out tasks plus five out-of-distribution benchmarks, and report about five points of in-distribution gain. One model's evolved harness scored below the seed: optimisation can make things worse.
  • Adaptive-GEPA (30 September) routes requests to specialised programs and reports a family mean rising from 52.6 to 70.6, against 62.5 for plain GEPA, while warning that equal call budgets do not mean equal total compute.
  • Agent4Sci (20 October) asked whether frontier agents can climb scientific benchmarks themselves. They found a mean 10.4% relative improvement over the published best, mostly from a "bag of ML-engineering tricks", and a "rapid collapse into local engineering sweeps": the local-optimum failure of any hill-climber.

The pattern across all of them: gains are real on the distribution being optimised, smaller or absent outside it, and sometimes negative.

Why it overfits: a simulation

Here is the failure in its simplest form. Twenty prompt variants are tried, and none of them is actually better than the baseline: every one succeeds 70% of the time. Each is scored on 50 tuning cases, and the best is checked on 200 unseen cases:

import random

rng = random.Random(7)
TRUE_RATE = 0.70          # every variant is really just as good as the baseline

def score(cases):
    return sum(rng.random() < TRUE_RATE for _ in range(cases)) / cases

variants = [score(50) for _ in range(20)]       # try 20 prompt edits on 50 tuning cases
best = max(range(20), key=lambda i: variants[i])
held_out = score(200)                            # the "winner" on 200 unseen cases
print(round(variants[best], 2), round(sum(variants) / 20, 2), round(held_out, 2))
# => 0.84 0.72 0.68

The "winning" variant scored 84% on the tuning set, fourteen points above its true rate, purely because the best of twenty noisy measurements is high by chance. On held-out cases it scores 68%. Real optimisers search far more than twenty variants, which makes this selection effect worse, not better. A held-out set, repeated runs and a minimum improvement above the noise floor are the only defences.

Rules for hill-climbing an agent

  1. Freeze a held-out test set the optimiser never sees, and pick the final version by it.
  2. Measure the noise floor by running the unchanged agent several times; ignore improvements smaller than that.
  3. Change one surface at a time, so you know what helped.
  4. Score cost and latency too. Anthropic's support example traded down to a smaller model; a climb that only maximises quality will happily triple your bill.
  5. Validate the judge against people before letting an optimiser climb it, and do not use the agent's own model as its judge.
  6. Keep the agent away from the checks: no failing cases pasted into prompts, no editable tests, no access to reference answers.
  7. Refresh the eval from production so the hill you climb keeps looking like your users.

What this means in an interview

"Your automated prompt optimiser improved the eval score by eight points. Do you ship it?" is a good question to be ready for, and our practice version, accepting an automated harness edit, asks it about harness changes. A strong answer asks for the held-out score, the noise floor and the number of variants tried, checks cost and latency, reads examples of what changed, and ships behind a canary with the old version ready. Knowing that the best of many noisy measurements is biased upwards is the single idea that separates an engineer who has hill-climbed from one who has only read about it.

Sources

Checked 24 November 2026:

  • Anthropic, "Automating eval design and hillclimbing with Claude" (28 September 2026), claude.dev/blog
  • Google Developers Blog, "Hill-Climbing Agent Quality with Agents CLI Evaluation" (28 October 2026)
  • Arize, "Claude's hillclimb loop for AI agents: start with production traces" (October 2026), arize.com/blog
  • "How the Claude Code team thinks about verification" (16 November 2026), claude.dev/blog
  • arXiv 2610.14224 (Harness²), 2610.00906 (ActiveSaddler), 2609.38372 (self-evolving harnesses), 2609.38762 (Adaptive-GEPA), 2610.28763 (Agent4Sci)
  • Prime Intellect verifiers v0.4.0 release notes, github.com/PrimeIntellect-ai/verifiers
PRACTICE THIS

Where this post leads in the curriculum: lessons and interview questions:

FAQ

What is hill-climbing in agent development?▲

Improving an agent by repeatedly changing one editable part (a prompt, tool descriptions, skills, model or effort setting, or harness code), measuring it on an evaluation set, and keeping changes that score better. Anthropic and Google both use the term for their eval-driven optimisation tools as of late 2026.

What does /claude-api hillclimb do?▼
How do you avoid overfitting when optimising an agent's prompt?▼
What is GEPA?▼