A `--max-usd` spend limit feature for `harness2` runs, designed to control monetary costs associated with model-backed experiments.
Raw Developer Origin & Technical Request
GitHub Issue
Oct 16, 2026
Hi, thanks for releasing Harness². I'd like to contribute a feature and wanted to check with you before I write the code.
## The problem
The experiments guide warns that model-backed runs cost money, and the full LAB stream has 1,143 tasks. Right now I can limit a run with `--only-domains` or `--max-tasks`, but both of those limit the number of tasks, not the money. The cost of a task changes with k, the mode, the model and how long each rollout goes, so I can't really tell ahead of time what `--max-tasks 20` will cost me. If a rollout gets stuck in a loop or a provider changes its price, the run keeps spending until someone looks.
The ledger already records the cost of every rollout and session, so the number is there. Nothing uses it to stop a run yet.
## What I'd like to add
I'd add a `--max-usd` flag to `harness2`, off by default. Before each task starts, the sweep adds up what the run has spent so far, including tasks from earlier runs in the same namespace. Once the total reaches the limit, it stops starting new tasks and prints how much it spent and how many tasks are left. The tasks it skipped show up in the domain summary with a `spend_limit` status. To keep going, you run the same command again with a higher limit, and it picks up where it stopped.
With `--workers` above 1, the domains run as threads, so they'd share one running total behind a lock.
## How it fits the method
I tried to keep this out of the method itself. The check only happens between tasks,...
Developer Debate & Comments
No active discussions extracted for this entry yet.
Adjacent Repository Pain Points
Other highly discussed features and pain points extracted from google-research/harness2.
Frequently Asked Questions
Market intelligence mapped to A `--max-usd` spend limit feature for `harness2` runs, designed to control monetary costs associated with model-backed experiments..
What problem does A `--max-usd` spend limit feature for `harness2` runs, designed to control monetary costs associated with model-backed experiments. solve?
Are engineers actively discussing A `--max-usd` spend limit feature for `harness2` runs, designed to control monetary costs associated with model-backed experiments.?
Which technical concepts are associated with A `--max-usd` spend limit feature for `harness2` runs, designed to control monetary costs associated with model-backed experiments.?
Engagement Signals
Cross-Market Term Frequency
Quantifies the cross-market adoption of foundational terms like k and mode by tracking occurrence frequency across active SaaS architectures and enterprise developer debates.
SaaS Metrics