billflare.

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.

Products
Durable Objects
Source
Author experience𝕏
Author
Viking (@vikingmute)

Key points

  • The author describes an alarm as a durable timer that wakes the object even without requests and is billed per invocation. He writes that there appears to be no account-level hard cap, only alert emails.
  • Prohibited in his rules: calling setAlarm in the constructor, calling setAlarm at every exit of alarm(), refreshing before expiry so a chain never ends, and self-renewal shorter than 60 seconds unless the user explicitly asks and states a limit.
  • Required in his rules: return without setAlarm when no work remains, state a termination condition (count, deadline, or an active flag in storage) before renewing, test that alarms stop when there is no work, and explain in the commit message how the chain stops.

Original sources

  1. Original post

    Read on 𝕏

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

    Viking

    @vikingmute · Original 𝕏 post

    和我之前的观点一致https://t.co/A4vwxe9f4a 不管用什么云服务一定要注意啊,Vibe Coding 别写出什么死循环了,尤其是用 Durable Objects,要不直接天价账单了,而且好像它没有价格上限,只能发告警邮件,所以要格外小心。 如果用,可以加一个 规则,同时最好改动要另外一个模型… https://t.co/lHsTeWDfJ9
  2. The earlier post the author links to: quoting yvonuk, he writes that cloud platforms carry a chance of very large bills, especially with Durable Objects, while a VPS under attack at worst maxes out and takes the site down.

    Read on 𝕏

    Viking

    @vikingmute · Original 𝕏 post

    说的很中肯,虽然我是无脑 CF 吹,但是假如要做一个量大的产品的话,VPS 肯定比 serverless 贵,用云平台就会有天价账单出现的概率,尤其是用 Durable Objects,VPS 被刷,最坏是机器打满 站点挂掉。 而且 CF 的服务大多数都是 vendor locking,迁移不太方便,而且现在 VPS 配合 AI 加上类似 Coolify… https://t.co/2cNZZ58RPM
  3. Reply from another user, JasonC (@JasonC_Dev): each setAlarm() is billed as one row write; he suggests removing Durable Object bindings from preview environments and writing a budget circuit breaker.

    Read on 𝕏

    JasonC

    @JasonC_Dev · Original 𝕏 post

    补个更阴的:每次 setAlarm() 本身就按一次 row write 计费。 HN 上那个 8 天 $34k 的案例,炸点是 60 多个 preview 部署各自起了一套 DO,onStart 里无脑 setAlarm。 preview 环境先把 DO binding 拿掉,再自己写个预算熔断。别指望平台提醒你。
  4. Reply from another user, Kenny Chen (@KennyChinaTech): add a test that triggers the alarm once more after disabling; calling deleteAlarm() inside alarm() does not guarantee retries are stopped.

    Read on 𝕏

    Kenny Chen|AI 实战

    @KennyChinaTech · Original 𝕏 post

    停用后再触发一次的测试得补上,alarm() 里调 deleteAlarm() 也不保证阻止重试。
Community resourceDurable Objects +1

Workers Free: SQLite Durable Object row-write quota can still block after the 00:00 UTC reset

Two Workers Free users with SQLite-backed Durable Objects report that after exceeding the 100,000 daily row-write allowance, storage still threw “Exceeded allowed rows written in Durable Objects free tier” after the documented 00:00 UTC reset, even though GraphQL analytics already showed 0 rows written for the new UTC day. @vendasecoplast1 saw 114,211 rows written and 399,088 rows read on 2026-11-16 UTC, then a failure at 2026-11-17 00:17:32 UTC during CREATE TABLE IF NOT EXISTS in the constructor. @dimoncheck2020 saw 103,558 rows written on 2026-11-18 UTC and 24 failed Durable Object invocations with 0 rows written between 00:00:00 and 00:35:27 UTC on 2026-11-19, with the same constructor exception at 00:35:21 UTC. No Cloudflare staff reply as of 2026-11-19.

D1

Kun Save Point (@Savepoint_kk): a D1 bug rewrote unchanged data into a $2,739.12 bill; $2,141 goodwill credit granted.

Kun Save Point (@Savepoint_kk), an indie developer who says he recently lost his job, says a bug repeatedly rewrote unchanged data while inefficient queries amplified reads, producing a $2,739.12 Cloudflare bill already paid via PayPal (D1 rows written $2,641.00, rows read $64.06, other services $34.06); he says his bills were usually under $10 a month. Cloudflare granted a $2,141 goodwill account credit under case #02391058. He asks for it to be converted into a refund to the original PayPal payment, or at least for relief on the $2,641 write charges, and later writes that the initial request was declined and has been reopened for additional review. On October 25 he adds that he missed the only alert email Cloudflare sent, whose amount was not particularly high, and received no further warning before the large card charge; on October 26 he writes that the refund request to the original payment method is still under further review. On November 10 he posts a timeline saying that after following up on November 10–11, support again stated the $2,141 could only remain as account credit and the remaining $598.12 was still undecided while the ticket was being closed.

Community resourceWorkers +4

FlareMeter: Cloudflare usage in the macOS menu bar with early-warning alerts

Manish Rana's free, open-source (AGPL-3.0) macOS menu bar app and widgets show Workers, Durable Objects, KV, D1 and Workers AI usage against plan limits, estimate Workers Paid overage, and alert near limits, past a budget or on 10× spikes.