hillclimb.toml reference
hillclimb init writes a commented copy. Relative paths resolve against the
directory that holds the config file. Unknown keys are an error, not a warning.
[project]
| key | default | meaning |
|---|---|---|
name |
directory name | shown in reports |
repo |
"." |
the target git repository |
goal |
plain-language goal, placed at the top of every prompt | |
best_branch |
"hillclimb/best" |
accepted changes land here. Hillclimb creates it at your HEAD and never checks it out |
state_dir |
".hillclimb" |
SQLite journal, pristine snapshots, reports |
[metric]
| key | default | meaning |
|---|---|---|
command |
required | shell command, run from the repo root of a fresh checkout |
direction |
"min" |
"min" or "max" |
timeout_s |
600 |
per run. A timeout counts as an error |
The command must exit 0 and print either a JSON object with a numeric "score"
(as the whole output, or as any line, last one wins) or a final line that is a bare
number. Other JSON keys are stored and shown in the journal.
[files]
| key | meaning |
|---|---|
editable |
globs the agent may change. Every other change rejects the attempt |
frozen |
globs hashed at run start, rejected if touched, restored before every score |
forbid_patterns |
regexes that may not appear in any added line |
Glob rules: matched against repo-relative paths. * stays within one directory,
** crosses directories, and a bare directory name covers everything beneath it.
*.py only matches top-level files; use **/*.py for all of them.
[heldout]
| key | default | meaning |
|---|---|---|
command |
"" |
held-out score command. Empty disables the gate |
paths |
[] |
tracked held-out files, removed from the agent's worktree |
policy |
"gate" |
"gate": a dev win that is worse on held-out than the current best (beyond tolerance) is rejected. "report": measured and reported, never blocks |
tolerance |
0.0 |
allowed held-out regression under "gate" |
timeout_s |
600 |
The held-out command runs only on dev winners, in a checkout created after the agent exits. Its score is stored for you and never placed in a prompt.
[noise]
| key | default | meaning |
|---|---|---|
repeats |
1 |
metric runs per candidate (mean is compared) |
baseline_repeats |
3 |
baseline runs, used to estimate σ |
min_improvement |
0.0 |
absolute margin over the best |
sigmas |
2.0 |
or sigmas × σ × sqrt(2/repeats), whichever is larger |
[budget]
| key | default | meaning |
|---|---|---|
iterations |
10 |
attempts (interrupted ones don't count) |
wall_clock_minutes |
120 |
active time across sessions. No new attempt starts after this |
max_workers |
1 |
parallel attempts |
max_cost_usd |
0 |
stop once reported agent cost reaches this. 0 means no limit |
[agent]
| key | default | meaning |
|---|---|---|
backend |
"claude" |
"claude", "command" or "fake" |
model |
"claude-sonnet-5-5" |
also claude-opus-5-5, claude-haiku-5-5 |
timeout_s |
900 |
per attempt |
max_turns |
40 |
Claude backend |
effort |
"" |
optional --effort for the Claude CLI |
tools |
Read, Edit, Write, Glob, Grep, Bash | built-in tools offered to Claude |
allowed_bash |
[] |
the exact shell commands the agent may run, usually the dev metric |
directions |
[] |
research directions, one per attempt, rotating |
extra_instructions |
"" |
appended to every prompt |
command |
for backend = "command": gets the prompt on stdin and in $HILLCLIMB_PROMPT_FILE, edits its cwd, may print {"hypothesis": ..., "rationale": ..., "cost_usd": ...} as its last line |
|
script |
for backend = "fake": JSON list of scripted edits (see src/hillclimb/backends/fake.py) |
The Claude backend, exactly
Each attempt runs, with the working directory set to the attempt's worktree and the prompt on stdin:
claude -p --output-format json --model <model> \
--restricted --safe-mode --strict-mcp-config --permission-prompts none \
--no-session-persistence --max-turns <n> \
--tools Read,Edit,Write,Glob,Grep,Bash \
--allowedTools "Read,Edit,Write,Glob,Grep,Bash(<allowed_bash[0]>),..." \
--json-schema '{"hypothesis": ..., "rationale": ...}'
It uses your logged-in Claude Code, so no API key is needed. total_cost_usd from
the CLI is recorded as the attempt's cost. On a subscription that figure is the
notional API price, not a charge.
Environment
HILLCLIMB_WORKTREE_ROOT overrides where temporary worktrees go. The default is
$TMPDIR/hillclimb-<hash of state_dir>.