Skip to content

Set a budget or a stop time

Thermite runs a campaign until its job is done: a hill climb until you stop it, a goal campaign until its goals are met, and a research campaign until its time is up. Nothing else stops it unless you set a limit. Why Thermite runs until the job is done says why.

Set a limit when you want one, and always before agents use a paid model key.

LimitWhere you set itWhat it countsWhere it works
A stop timeStop after (hours) on the New campaign page, or budget.wall_hours in the contractHours since the run was created, paused time includedEvery rig
Device hoursbudget.device_hours in the contractHours the judge’s jobs for the run took, each from its start to its endEvery rig
Model spendbudget.llm_usd in the contractDollars of the tokens that the workers’ trials used, at the token prices the rig was givenOnly on a rig that has both token prices: the local stack, once you set them

A limit pauses only a run with agents that has a model. A run with no agents, such as a try of the kit or a run started with --agents off, is never paused by a limit.

On Campaigns › New campaign, step 4 Where it runs, open Advanced and enter the hours in Stop after (hours), such as 48. Empty means no limit. The page has no field for money or device hours: for those, write a contract.

Add a budget with only the limits you want:

contract.json (part)
"budget": { "wall_hours": 48, "device_hours": 20, "llm_usd": 150 }

Then validate the contract and start a run: see Write a contract and Start a campaign from the command line.

budget.llm_usd counts only when the rig’s harness has both token prices, in dollars per million tokens. On the local stack, set them in your shell and start the stack again:

Terminal window
export THERMITE_LLM_USD_PER_MTOK_IN=3
export THERMITE_LLM_USD_PER_MTOK_OUT=15
docker compose up -d

Add your -f options if you start the stack with override files. The harness keeps the prices only while it runs with them: a later up -d from a shell without them starts it again without prices. To keep them, put both lines, without export, in the .env file in your Thermite folder. Without both prices, llm_usd never pauses anything, and nothing warns you.

When a limit is reached, no new trial starts. The trials that are running go on to their end, so the spend can go a little past llm_usd. Once they have ended, the run is paused with one of these reasons:

  • the wall-time budget is spent
  • the device-hours budget is spent
  • the model budget is spent ($150.12), with the amount spent

The run’s state is Paused, and its History says, for example, Run sort-speed-1 paused: the wall-time budget is spent. Its queued judge jobs wait too. Nothing is lost: the champion and every verdict stay.

A research campaign ends by its own time instead: after max_duration of running time, or min_duration when there is no max_duration, it writes its final report and closes with the research window is over.

Resuming doesn’t help: the run is still over its limit, so it is paused again at once. No command changes a run’s limits (goal 061). Start a new run instead. Its limits count from zero.

  • From the command line: to change a limit, edit budget and raise the contract’s version. Then assign a new run with --seed-commit and the old run’s champion, so the new run starts where the old one stopped. The champion’s attempt page shows its full commit under Commit.
  • On the dashboard: Start a run, on the campaign’s page, starts a new run with the same limits, counted from zero. It starts from the latest saved version’s starting commit or, for a campaign started from the command line, with its newest assignment’s contract and commit: not from the old champion. To change Stop after (hours), fill in the New campaign page again with the same Campaign name: this saves a new version, and later runs use it. To go on from the old champion, take the result, commit it on a branch of your project, and give that branch in Start from in the new version.
  • A Claude or ChatGPT subscription’s usage window: when it is used up, that rig’s agents wait for it to reset, then go on.
  • One try lasts (minutes) on the New campaign page ends one trial, and the next starts fresh. A command over an agent’s memory or disk limit is stopped.

Neither ends a campaign. The limits and pacing reference lists them all.