Skip to content

Costs & budgets

worca tracks what every stage spends and rolls it up per run, per stage, and per model. This page covers where those numbers come from, the project-wide pricing settings, and the budget — a cost circuit breaker that stops a run before it burns through more than you allowed.

Each agent subprocess reports its token usage and cost when it finishes. By default the cost figure is Claude CLI’s own number. Two overrides exist:

  • Per-model pricing rates. A model alias can carry its own input/output/ cache rates — required for alt-endpoint models where the CLI’s Anthropic-priced number would be wrong (often reported as $0 or priced against the wrong model). Rates are edited per alias on the Models page; when an alias routes through ANTHROPIC_BASE_URL, worca prices usage from these rates instead of trusting the CLI.
  • Server-tool rates. Web search and web fetch requests are billed per-request, not per-token. Their rates live here, under Project Settings → Costs & Budgets.

The Costs page in the sidebar aggregates all of it: totals across runs, cost by run, by stage, and by model.

Project Settings → Costs & Budgets edits the project-wide keys under worca.pricing:

SettingKeyMeaning
Currencyworca.pricing.currencyDisplay currency for every cost figure (default USD). Label only — worca does no FX conversion.
Web search rateworca.pricing.server_tools.web_search_per_requestCost added per web-search request an agent makes.
Web fetch rateworca.pricing.server_tools.web_fetch_per_requestCost added per web-fetch request.

Per-model token rates deliberately do not live on this tab — each alias carries its own pricing in the Models editor, so a model and its rates travel together.

worca.budget is project cost policy — it watches the run’s accumulated cost and acts at two thresholds:

SettingKeyBehavior
Max costworca.budget.max_cost_usdHard ceiling. A run that crosses it is halted rather than allowed to keep spending. Unset = no ceiling.
Warning thresholdworca.budget.warning_pctAt this percentage of max cost (default 80%), worca emits a cost.budget_warning event — wire it to a webhook or chat notification to get pinged before the ceiling hits.

Budgets complement the loop limits and circuit breaker: loop limits bound iterations, the error circuit breaker bounds repeated failures, and the budget bounds spend — three independent ways a run is prevented from running away.

Every completed stage emits cost.stage_total; the run maintains cost.running_total, and the budget warning above fires once the threshold is crossed. The full event catalog is in the events overview.