billflare.

ivebenfreed: official @cloudflare/codemode Dynamic Workers came to nearly $80, about $155 at October’s pace

Ben Freed (@ivebenfreed) reports that Dynamic Workers used for code mode, including Cloudflare’s official @cloudflare/codemode package, created a new instance on each call. Unique Workers past the first 1,000 in a month are charged $0.002 each per day; a worst October day had more than 12,000, and the bill came to nearly $80. October’s pace would have been about $155 a month. After switching to static bash / Pyodide / QuickJS workers, the unique-worker count went from roughly 2,600 a day to zero from 13 November. These amounts are the author’s figures and are not added to guide totals; a related case already records the approximate $80 bill.

Products
Workers
Source
Author experience𝕏 post
Author
Ben Freed (ivebenfreed)

Key points

  • The author stopped using Dynamic Workers: bash runs in one ordinary Worker with just-bash, python3 in a Python Worker on Pyodide, and node in QuickJS compiled to wasm in the same bash Worker, with a Linux container as a fallback.
  • The replacement bash Worker handled 70 requests on 2.4 seconds of CPU, which the author says costs less than a hundredth of a cent. Separate model-cost figures from a 5-task benchmark ($0.107 to $0.0215 per run) are not Cloudflare usage charges.
  • FlareCost replied that calling .load(code) or loading with no stable ID creates a new Dynamic Worker, while .get() with a stable ID counts the same code once per day, and startup CPU is billed. The conversation had two replies; a second page returned no further posts.

Original sources

  1. Published

    Original post

    Read on 𝕏

    Ben Freed (@ivebenfreed) reports that Dynamic Workers used for code mode, including Cloudflare’s official @cloudflare/codemode package, created a new instance on each call. Unique Workers past the first 1,000 in a month are charged $0.002 each per day; a worst October day had more than 12,000, and the bill came to nearly $80. October’s pace would have been about $155 a month. After switching to static bash / Pyodide / QuickJS workers, the unique-worker count went from roughly 2,600 a day to zero from 13 November. These amounts are the author’s figures and are not added to guide totals; a related case already records the approximate $80 bill.

    Ben Freed

    @ivebenfreed · Original 𝕏 post

    Attention! Be careful using dynamic workers for codemode in your @CloudflareDev workers based app!! My bill for dynamic workers came to nearly $80 last month because every time you call codemode it spins up a new instance, and Cloudflare's official @cloudflare/codemode package works the same way. Cloudflare charges $0.002 per unique worker per day past the first 1,000 a month. On my worst day in October I had over 12,000 of them. The fix was to stop using dynamic workers altogether. Bash now runs in one ordinary Worker using just-bash. python3 runs in a Python Worker on Pyodide, and node runs in QuickJS compiled to wasm inside the same bash worker. That covers most of your code mode needs and you can fall back to a Linux container if you really need it. The Dynamic Worker count went from roughly 2,600 a day in October to zero since Nov 13. October's pace would have come to about $155 a month. The bash worker that replaced them handled 70 requests on 2.4 seconds of CPU, which costs less than a hundredth of a cent. While I was in there I also moved rordi's tools behind a search step, so the full tool list stays out of every prompt. On the same 5-task benchmark, model cost per run went from $0.107 to $0.0215 and the scores held. A batch test that pulled 250 items through a single bash call came out around $0.0001 per fetch, against $0.0003 when the agent made the calls directly. There's still a lot of optimization to do when you're trying to build a system of record for agents and you really need all the options out there. Maybe CF should shift their official code mode to static workers since it's way cheaper?
Community resourceWorkers +1

Workers and Durable Objects hard spend limits: early access preview

Cloudflare staff Sid and Brayden preview hard spend limits, starting with Workers and Durable Objects. Sid describes roughly ten-minute latency and an alert at 80% of the cap.

Durable Objects

igorrizzom: a forgotten Durable Object alarm billed US$ 2,038; Support refunded US$ 1,533.29, leaving US$ 505.

X user @igorrizzom (Igor Rizzo), who also posted on Cloudflare Community as igorarm (urnaaovivo.com), says a personal, non-commercial prototype that collected public election data in Brazil was left running after the October 25 runoff. A Durable Object kept rescheduling itself via alarm every ~5 seconds and writing to SQLite, and the invoice reached US$ 2,038, almost all from DO rows written, with about 10k pageviews. The author says budget alerts were set up but went to an old inbox that was never checked, and that alerts do not stop usage. Spend limits for Workers and Durable Objects were only announced on November 13, after almost all of the usage; the author then set a US$ 1 spend limit, turned the collector off, and removed Cron Triggers. The author says Support refunded US$ 1,533.29 as a one-time courtesy. The remaining US$ 505, which the author later described as US$ 500 of usage plus the US$ 5 Workers Paid fee, was closed as final; the author asked for a supervisor review in case #02442826 (follow-up to #02435308) and also asked @SidChatterjee whether any goodwill path remained for pre-launch cases. There is no Cloudflare staff reply on the public X thread or the Community thread. Public Support actions are reported by the author.

Author experienceD1 +1

风易: On the free tier, do not log in full; logging in full burns the D1 rows-written count first

On 2026-11-14, X user @Michael_liyang (风易) wrote: on the free tier, do not log in full; what full logging burns first is the D1 rows-written count. The approach is: log all errors, with a trace id and an error code; sample only 1% of successes, enough to see the trend; write the sample rate into the config, temporarily raise it when investigating, then lower it back. The chain is request → assign a level → log all errors / sample successes → redact → persist to D1. The author's judgment: logs are for investigation, not for stockpiling for retirement; the rows written that are saved are left for real errors.