Limits and guardrails

Budgets and limits

Cap daily spend and tokens per project and across the host, and cap what one task may cost.

The Symphony spec retries failed work forever with backoff. With nobody watching, a broken credential or a task the agent can't finish becomes a steady drain of tokens. SI Fabrik's limits stop scheduling new work when money or retries run away. They never cut a turn short: running turns always finish.

Limits at a glance#

LimitWhereWhen it's hit
limits.daily_budget_usdWORKFLOW.mdThe project starts no new attempts or continuation turns until midnight. Running turns finish.
limits.daily_token_budgetWORKFLOW.mdThe same, counted in tokens.
limits.max_cost_per_issue_usdWORKFLOW.mdThe task is parked after its next failure.
limits.max_attempts_per_issue (default 5)WORKFLOW.mdAfter that many real failures in a row, the task is parked. Waiting for a free slot doesn't count.
limits.pause_after_consecutive_failures (default 5)WORKFLOW.mdAfter that many failures in a row across the project, the project pauses.
Max agents at once, daily budget, daily token budgetMac: Settings → Limits. Server: limits: in harnessd.yamlHost-wide: the same as the project limits, across all projects.
claude.max_budget_usdWORKFLOW.mdClaude Code itself stops one session that would cost more.

Set any limit to 0 (or leave it out, for budgets) to keep the spec's behaviour.

Set project limits#

WORKFLOW.md
limits:
  daily_budget_usd: 50              # this project, per day
  daily_token_budget: 20000000
  max_cost_per_issue_usd: 15        # across all attempts at one task
  max_attempts_per_issue: 5         # failed attempts in a row before a task is parked (0 = forever)
  pause_after_consecutive_failures: 5 # failures in a row across the project before it pauses (0 = never)

Or use Workflow → Settings → Limits: Daily budget, Daily tokens, Cost cap per task, Park a task after and Pause the project after.

Set host-wide limits#

Open Settings → Limits. Under Across all projects, turn on and set:

  • Max agents running at once (1–50);
  • Daily budget (USD);
  • Daily token budget.

The Today section shows what's been spent and how many tokens used, in total and per project.

How spend is counted#

  • Spend and tokens come from each turn's usage, as reported by the runner, and include agents still running.
  • Days are local calendar days; budgets reset at local midnight.
  • Spend, per-task cost, parked tasks and automatic pauses are stored per project (guardrails.json in its history folder) and kept across restarts.

When a budget blocks dispatch, the project header shows the reason, for example:

TEXT
daily_budget_reached: this project spent $50.12 of its $50.00 daily budget (limits.daily_budget_usd). Dispatch resumes at midnight.
host_daily_budget_reached: all projects together spent $200.40 of the $200.00 daily budget. Dispatch resumes at midnight.
Gateway costs

Claude Code's cost estimate may not match what a LiteLLM proxy charges. With a gateway, give each project its own virtual key with a budget, and use LiteLLM's spend logs (tagged per project and task) as the source of truth.

See also#