Enforced Budgets and spending caps

A Budget puts an enforced monthly or total limit on an org, a project or a labelled group of work, and spec.maxCostUSD caps a single run. Both are checked before any paid work starts: a create that does not fit is refused with 402, the exact amounts and the command that fixes it. They are checked again every few minutes while work runs, and a Budget set to Notify sends its 50, 80 and 100 % notices once each period without stopping anything.

When credits, a Budget or a cap run out, running work stops inside the shutdown reserve it already paid for: Jobs checkpoint and suspend, and resume on their own after a top-up, a raised Budget or a raised cap. You are warned first, once a day, when your balance drops below the larger of $5 and 20 % of what the next renewal needs. See Budgets and spending caps and When money runs out.