fabro/docs/public
Bryan Helmkamp b32164b086
Add [run.limits] run budgets: halt runs on token/cost spend
A run can now carry an optional spend budget. New [run.limits] settings
table with max_cost (USD) and max_tokens; when accumulated LLM spend
exceeds either limit, the run halts immediately and fails with the
existing BudgetExhausted failure reason.

- RunBudget (fabro-model): thread-safe accumulator shared across the
  engine, agent sessions, hooks, and the prompt path. Charges per LLM
  response; queues one-shot 80% warnings drained into run notices.
- Enforcement is inline at every usage-recording site: the agent turn
  loop (interrupting like the wall-clock timeout via a new
  InterruptReason::BudgetExhausted), subagent sessions, the one-shot
  prompt path with schema-repair retries, context compaction, web_fetch
  summarization, and prompt/agent hooks (which skip once the budget is
  spent, matching their fail-open posture).
- Budget exhaustion terminates the run as an engine-level error
  (fabro_core::Error::BudgetExhausted, following the StallTimeout
  pattern) so fail edges are not followed, plus a between-stage gate for
  non-LLM stages and a run-start gate that makes a resumed
  budget-failed run fail fast until the limit is raised (spend is
  seeded from the billing projection).
- Exposed on the RunNamespace OpenAPI schema (RunLimitsSettings);
  Rust and TypeScript clients regenerated; docs updated.

Known gaps, by design for now: ACP external agents report no usable
per-response usage (cumulative UsageUpdate capture is a follow-up), and
post-run PR content generation is outside the engine.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 14:22:10 -04:00
..
administration Merge remote-tracking branch 'origin/main' into fix/modal-provider-catalog 2026-08-01 09:32:19 -04:00
agents Merge pull request #676 from fabro-sh/remove-run-agent-permissions 2026-08-01 10:18:45 -04:00
api-reference Add [run.limits] run budgets: halt runs on token/cost spend 2026-08-06 14:22:10 -04:00
changelog refactor(model): rename Kimi provider to Moonshot 2026-07-31 09:00:52 -04:00
core-concepts Merge remote-tracking branch 'origin/main' into fix/modal-provider-catalog 2026-08-01 09:32:19 -04:00
examples feat: add model-keyed fallback policies 2026-07-30 12:02:41 -04:00
execution Add [run.limits] run budgets: halt runs on token/cost spend 2026-08-06 14:22:10 -04:00
getting-started refactor: rationalize server secret scopes (vault-only for optional int… (#401) 2026-05-25 17:26:01 -04:00
human-tools fix(config): disable Slack unless configured 2026-06-02 18:41:36 -04:00
images Add system resources settings page (#328) 2026-05-20 17:22:53 -04:00
integrations feat(models): add Fireworks Kimi K3 Fast 2026-08-04 13:55:48 -04:00
languages refactor(docs): split docs/ into public/ and internal/ 2026-04-27 07:21:13 -07:00
logo refactor(docs): split docs/ into public/ and internal/ 2026-04-27 07:21:13 -07:00
reference Add [run.limits] run budgets: halt runs on token/cost spend 2026-08-06 14:22:10 -04:00
tutorials refactor(graphviz): parse node classes in one place 2026-07-29 22:15:30 -04:00
workflows fix(workflow): pause timeouts for human input 2026-07-31 08:19:10 -04:00
.mintignore refactor(docs): move .mintignore into docs/public and update skill paths 2026-04-27 07:29:59 -07:00
docs.json feat(llm): add direct DeepSeek provider 2026-07-31 13:10:08 -04:00
dot-highlight.js refactor(docs): split docs/ into public/ and internal/ 2026-04-27 07:21:13 -07:00
favicon.svg refactor(docs): split docs/ into public/ and internal/ 2026-04-27 07:21:13 -07:00