billflare.

Killowatt: a multi-cloud spend circuit breaker with a Cloudflare suspend adapter

An MIT-licensed circuit breaker that keeps a rolling spend ledger per account, trips when a policy window is exceeded, and on Cloudflare meters Durable Object invocations per script and suspends the Worker behind a tripped account. Enforcement is dry-run until switched on.

Products
WorkersDurable Objects
Source
Community resourceGitHub repository
Author
Mascottz

Key points

  • The README opens with an illustration of a misconfigured loop burning $34k in 8 days unnoticed until the invoice; this is the project's motivating example, not a documented case.
  • Two postures: armed stops the loop when a window breaks; watch observes everything, touches nothing and counts what it would have saved. Exported bills can be replayed offline as JSON lines in integer cents, with per-account breakers.
  • For Cloudflare, the token needs account-scoped Workers Scripts Edit and Analytics Read; a read-only check script verifies which account the token can see. The poller meters Durable Object invocations per script name and, when an account trips, suspends the Worker; re-enabling it is the undo.
  • Enforcement stays dry-run until KILLOWATT_ENFORCE_MODE is set to cloudflare or aws; the README describes the order as reversible first, and says kill has no code path yet on purpose.

Original sources

  1. Last updated

    Killowatt: a multi-cloud spend circuit breaker with a Cloudflare suspend adapter

    Open original source

    An MIT-licensed circuit breaker that keeps a rolling spend ledger per account, trips when a policy window is exceeded, and on Cloudflare meters Durable Object invocations per script and suspends the Worker behind a tripped account. Enforcement is dry-run until switched on.

Author experienceWorkers +4

Cloudflare costs $5 a month, but the bill is not capped

不追高 (@Ariella1213) writes an X article explaining that Workers Paid’s $5 is a minimum, that per-product limits and budget alerts do not cap the account bill, and how denial-of-wallet requests, write amplification, delayed stops and background retries add cost.

Other

stevesprompt: an agent clicked Upgrade in the Cloudflare dashboard and charged $1.5k; the money was refunded.

X user @stevesprompt (Steve Huang) says an agent clicked Upgrade in his Cloudflare dashboard and he was charged $1.5k, and that the money was luckily refunded. The author then lists precautions before an agent can spend money or send anything. The post does not name the product that was upgraded. There is no official public Cloudflare response in the thread.

Author experienceD1 +2

Michael Liyang: record every AI call in D1 and downgrade before the budget runs out

@Michael_liyang argues that on a free tier the danger is not one expensive call but not knowing which call is expensive: write each call's usage to D1 by user and model, have a daily Cron check budgets and downgrade first, and look at which user is burning quota rather than only the total.