Let an agent climb your metric.

Hillclimb tests one idea at a time and keeps only real gains.

hillclimb run · claude-sonnet-5-5
Real run · synthetic demo data

The live dashboard (hillclimb ui) during a second, separately recorded run of the same demo, sped up 4×.

MITOpen source
Python3.12 and up
56Tests, all passing
SQLiteResumable journal
gitWorktree per attempt
Claude CodeHeadless, no API key
LocalRuns on your machine
3Backends: claude, command, fake

Open source, built first for a cattle-health startup.

Read the docs

From metric to better metric.

hillclimb.toml
metric
python3 score.py --split dev
direction
min · lower false alarms is better
editable
alert_rule.py
frozen
score.py, generate.py, README.md, data/dev_*
held-out
python3 score.py --split heldout
agent
claude-sonnet-5-5 · 2 workers

Prompt, attempt #6Current best: 9.04. Journal: 5 past experiments, with scores and reasons. Choose ONE hypothesis different from all of them.

AgentSubtract the herd-wide median of today's per-animal multi-signal score from each animal's score, and do the same for yesterday's term

Measured on its parent: 9.04 → 2.46

Anti-cheat · attempt #6
  • Only editable files changedalert_rule.py, +22 lines
  • 7 protected files match sha256scorer, generator, README, dev data
  • Held-out files absentdata/heldout_* hidden from the worktree
  • No forbidden codeno open(), os, subprocess, importlib
  • Ignored files purgedno planted caches reach the scorer
Activity · real run log
  1. #7hypothesis: Add 0.35 times the multi-signal score from two days ago to the existing today + 0.6…
  2. #6hypothesis: Subtract the herd-wide median of today's per-animal multi-signal score from each an…
  3. #7dev score 5.8211 over 1 run(s)
  4. #6dev score 2.461 over 1 run(s)
  5. #7rejected: held-out gate: 12.6018 is worse than best held-out 10.1581
  6. #6beat its parent but the best moved; replaying on eda8cc4f09
  7. #6ACCEPTED: 6.2944 -> 1.4198, held-out 2.4916; hillclimb/best now at 8f97fa3b16
Dev · visible6.29 → 5.82Better
Held-out · never shown10.16 → 12.60Worse, blocked

Experiment #7. The agent was told only “not kept after validation”.

Real runs, not mockups.

The score, over time.

Best dev score and its held-out score, every experiment.

0204060#1 accepted: dev 13.06, held-out 18.59#2 rejected: dev 41.79#3 accepted: dev 9.04, held-out 12.55#4 rejected: dev 12.54#5 accepted: dev 6.29, held-out 10.16#7 rejected: dev 5.82, held-out 12.60#6 accepted: dev 1.42, held-out 2.49#8 rejected: dev 6.11#9 accepted: dev 1.04, held-out 2.35dev 1.04held-out 2.35dev 55.94held-out 49.74

Every idea, journaled.

What was tried, and why it was kept or not.

  1. #1Replace the 7-day mean/stdev rumination z-score with a 14-day…13.06Kept
  2. #2Subtract the herd-wide median rumination deviation from its…41.79Conflicted
  3. #3Add 0.6 times yesterday's multi-signal score (computed from…9.04Kept
  4. #4Veto the risk score (return -1) on any day when activity is…12.54Not better
  5. #5Compute each animal's median/MAD baseline from days 3–16 back,…6.29Kept
  6. #6Subtract the herd-wide median of today's per-animal…1.42Kept
  7. #7Add 0.35 times the multi-signal score from two days ago to the…5.82Blocked by held-out
  8. #8Weight activity surges (activity above the animal's baseline,…6.11Not better
  9. #9Widen each animal's median/MAD baseline window from 14 to 21…1.04Kept
  10. #10Divide each animal's herd-median-adjusted score by the herd's…–Reverted by agent

The change it kept.

Experiment #6: subtract the herd’s daily median.

+def _shift(herd, day):+    if day in _SHIFT:+        return _SHIFT[day]+    vals = []+    for r in herd:+        h = _H.get(r["animal"], [])+        if len(h) >= 5:+            vals.append(_score(h, r))+    _SHIFT[day] = statistics.median(vals) if len(vals) >= 10 else 0.0+    for r in herd:+        _H.setdefault(r["animal"], []).append(r)+    return _SHIFT[day]++ def risk(history, today, herd):-    t = _score(history, today)

A report by morning.

hillclimb report, HTML and markdown.

Dev score55.94 → 1.04−98%
Held-out49.74 → 2.35−95%, never shown to the agent
Experiments105 kept
Time1.9 min$0.44 reported agent cost
Open the real report

Everything a research loop needs, handled.

Every idea is built in its own git worktree. Your checked-out branch never moves; wins land on hillclimb/best.

The scorer and its data are hashed at the start and restored from a pristine copy before every score.

Dev winners face a second score the agent never sees. Its numbers never enter a prompt.

Repeated baselines set a margin. A change must clear it to be kept.

Workers share one journal. A win found on an older best is replayed onto the new one.

Everything lives in SQLite. Ctrl-C, crash or reboot, then run again to continue.

Real numbers from one real run.

A synthetic herd-alert problem. False alarms per 100 healthy animal-weeks at 80% early recall.

Held-out false alarms, on a farm the agent never saw
−95%
Experiments by Claude Sonnet, 5 kept
10
Wall-clock time, two workers
1.9 min

Best dev score, 55.94 → 1.04

Experiment #7

Better on dev. Worse on a farm it never saw. Blocked.

Add 0.35 times the multi-signal score from two days ago to the existing today + 0.6×yesterday sum

Dev score, visible to the agent6.29 → 5.82Better
Held-out score, never shown10.16 → 12.60Worse, blocked

In every later prompt, the agent read only: not kept after validation (details withheld)

FAQ

What is Hillclimb?

An open-source loop that gives a coding agent one measurable problem. The agent tests one idea at a time; Hillclimb keeps only changes that beat the best and hold up on held-out data.

What do I need to run it?

Python 3.12+, uv, git, and a command that prints a score. The default agent is the Claude Code CLI, logged in. No API key is needed.

Can the agent cheat the metric?

It can only change the files you mark editable. Frozen files are hash-checked and restored before every score, and planted caches and symlinks are refused. Code that games the metric’s meaning inside editable files is still possible, which is what the held-out gate is for.

Does the agent ever see the held-out data?

No. Held-out files are removed from its worktree, its file tools are confined to that worktree, and held-out scores are stripped from every prompt.

What happens if I stop it?

Ctrl-C marks in-flight attempts as interrupted. Run it again and it resumes from the SQLite journal without re-measuring the baseline.

Are the numbers on this page real?

Yes, from one recorded run on synthetic data on 2026-11-27. The full report, journal, final diff and run log are linked in the footer.

Pick a metric. Start the climb.

$ uv sync
$ uv run hillclimb init --metric "python3 eval.py"
$ uv run hillclimb run
Read the quickstart