billflare.

After a $10,000 loop bill: budget alerts and a cost-audit prompt for vibe-coded projects

铁柱AGI (@cgnot996) writes an X article that walks through creating a Cloudflare budget alert, explains why it is only a notice, lists cost-amplifying code patterns, and gives a read-only audit prompt and steps for when a bill has already spiked.

Products
WorkersDurable ObjectsD1QueuesKV
Source
Author experience𝕏
Author
铁柱AGI (@cgnot996)

Key points

  • The author argues that vibe-coded projects pass functional checks while polling, alarms, retries and full-table scans keep running without errors, and that AI-written code does not estimate trigger frequency × unit price × run time.
  • He shows the dashboard path for a billing budget alert (Manage Account → Billing → Billable Usage → notifications → Create alert → Billing budget alert) and suggests a threshold of two to three times normal monthly spend, capped by the loss you can bear.
  • He notes alerts are based on the previous day’s data, send one email per billing period, need a Super Administrator, Administrator or Billing role, exclude fixed fees such as Workers Paid, and do not pause service or cap spend.
  • He lists patterns to check: alarms that reschedule themselves without a stop condition, polling without backoff, cron jobs without cursors or idempotency, D1 queries without indexes or WHERE, Worker/Queue call loops without retry limits or dead-letter queues, per-request KV or Durable Object writes, and AI loops without iteration caps, and gives a read-only audit prompt covering them.
  • If a bill has already spiked, he suggests stopping the triggering sources first, exporting usage data and fix records, and filing a billing appeal in Support, and writes that relief is decided case by case.

Original sources

  1. Original post

    Read on 𝕏

    铁柱AGI

    @cgnot996 · Original 𝕏 post

    https://t.co/6G2XYCLf2h
Official docsAccount-wide usage-based products

Budget alerts

Cloudflare documents account-wide spend alerts and their notification limits.

D1

OpenCils: a $231 D1 charge reported waived after a three-month ticket.

@OpenCils reports emailing Cloudflare on June 24 about a D1 charge. He says billing support forwarded the ticket to billing engineering on August 27, and that Cloudflare later waived the $231 D1 charge as a one-time courtesy and lifted account restrictions.

Author experienceDurable Objects

Durable Object alarm rules for agents.md

Viking (@vikingmute) shares the AI-generated Durable Object alarm rules he keeps in agents.md and suggests having another model review changes.