devops #cloudflare #cloudflare-workers #spending-limits #durable-objects #cost-control #cf-cli #billing #change-control

A Cloudflare Spending Limit Covers the Whole Account, So a Test Worker Can Interrupt Production

Cloudflare added spending limits for Workers on Nov 13, 2026. The limit is one switch for the whole account, so a test Worker can stop a production one. Here is what stops, what keeps running, and the commands to set an alert first.

Open your Cloudflare dashboard and answer one question without scrolling: how many Workers live in the account that pays for production? Now answer a second one: which of them is the test one?

If the two lists share an account, this post is for you. On Friday, Nov 13, 2026, Cloudflare announced that you can set spending limits for Workers and Durable Objects. The announcement is good news. The one sentence inside the docs that decides whether it is good news for you is easy to skim past: a Workers limit applies to the whole account.

That means a limit is not “this app can spend $50.” It is “everything in this account that runs a Worker can spend $50 together, and then it stops.”

The question is not whether the new control works. The question is whether the person who turns it on knows which Worker will go dark first, and who gets the email when it does.

What Cloudflare announced on Nov 13

I re-read four official pages on Monday, Nov 16, 2026: the changelog entry, the billing guide, the Workers page and the cf CLI page. Cloudflare’s own changelog opens like this:

“You can now set spending limits for Workers and Durable Objects to help control unexpected usage costs, or receive email alerts while your applications keep running. Support for more products is coming soon.”

Here is the short version, with the exact words kept where they matter.

FactWhat the page says
DateNov 13, 2026 (changelog entry and “Last updated” on the guides)
Products coveredWorkers and Durable Objects, each with its own separate limit
Two kinds of controlA spending limit blocks. An email alert only notifies.
What counts toward a Workers limitRequests and CPU time, after included usage
What does not countThe Workers Paid subscription fee, and charges for other products
UnitUS dollars per subscription billing period
One limit per product“You can have one enabled limit per product on an account.”
Where to clickBilling, then Spend Management (the changelog calls the same screen Spend limits)

Two things in that table are worth a second look. First, there are two controls with very different consequences. An email alert is a smoke detector. A spending limit is a circuit breaker. Second, the limit lives in the billing period, not on the calendar month. If your subscription renews on the 15th, the limit resets on the 15th.

[Source: https://developers.cloudflare.com/changelog/post/2026-11-13-spend-management/] [Source: https://developers.cloudflare.com/billing/manage/spend-management/]

One account, one shared Workers limit: a test Worker and a production Worker count toward the same gauge, and both stop when it is reached.

The sentence that decides everything

Here is the sentence from the Workers page, word for word:

“A Workers limit applies to the whole account, rather than one application or environment. For example, a test Worker can reach the shared limit and interrupt a production Worker in the same account.”

Read it as a junior would on a Friday afternoon. You have a side project, a staging Worker, a half-finished experiment from last month, and the one Worker that real users hit. All of them are in one account because that was the easy way to start. You set a limit “to be safe.” Nothing in that flow asks which Worker you are protecting.

The billing guide repeats the same boundary from another angle: “Workers and Durable Objects limits cannot target an individual Worker, Durable Object namespace, or billing metric.” You choose one number for the combined usage of that product across the account.

So the honest picture is a shared gauge. A runaway test loop fills it. When it is full, the production Worker is on the wrong side of the line, even though production did nothing wrong.

[Source: https://developers.cloudflare.com/workers/platform/spend-management/]

What stops, and what keeps running

When the limit takes effect, the Workers page says Cloudflare “rejects new invocations of your Workers.” It lists what that includes. I turned the list into a table with one extra column: what a junior will notice first.

What the Worker was doingAt the limitWhat you will notice
Answering incoming HTTP requestsRejectedVisitors see error 1103
Running on a Cron TriggerRejectedThe scheduled code does not run
Consuming a queue (a queue consumer invocation)RejectedThe consumer code does not run
Handling an Email Worker invocationRejectedThe email handler does not run
Being called by another Worker or a Durable ObjectRejectedThe caller’s call fails
Static assets served without running your WorkerKeep runningFiles still load

The last row is the useful one. The page says: “Static assets served without running your Worker continue to be available.” It also adds the catch: “Requests that need Worker code, such as requests routed through run_worker_first, can fail.” And it says that a limit “does not delete your Workers or assets.”

Notice the second and third rows. A failed web page is loud. A cron job that never fires and a queue that stops draining are quiet. If your Workers do background work, the first symptom of a limit may be a report that is a day late, not an error.

Timeline of the docs example: a $50 Workers limit, near limit at $40, limit reached at $50, new invocations blocked, resume at the next billing period.

The error you will see: 1103

HTTP visitors who hit a blocked Worker “receive error 1103.” The next sentence is the one to keep: “This error has other causes, so check Billing > Spend Management before contacting support.”

That is a debugging order, and it saves an hour:

  1. A visitor or a monitor reports error 1103.
  2. Do not open a support ticket first. Open Billing, then Spend Management.
  3. Look at the Workers row. Is the limit marked as reached?
  4. If yes, you found it. If no, 1103 has another cause, and now you can say you ruled the limit out.

One more detail from the Workers page: “Requests rejected by the spending limit are not billed as Worker invocations.” The blocked request does not add to your bill. It also does not reach your code, so your own logs will not show it.

A limit is not an exact bill

The docs are plain about this, and I will quote it rather than soften it:

“A spending limit is not an exact maximum bill. Usage reporting and blocking take time, so usage can continue after the threshold is reached.”

The billing guide adds three more facts that change how you set the number.

  • The limit counts spend already recorded. The guide’s example: saving a $50 limit after the product has already accrued $60 “can trigger a pause as soon as Cloudflare evaluates the policy.” If you set a low limit late in the billing period, you can block yourself on the first evaluation.
  • “Limit reached” is a record, not a proof. The dashboard status reflects a recorded threshold event. The guide says that Limit reached “does not confirm that blocking has finished propagating.”
  • The invoice is the final record. In the guide’s words: “Your invoice is the final record of charges.”

The practical reading for a junior: treat the limit as a brake, not a wall. A brake slows the car. It does not promise the car stops at the painted line.

Four controls, four jobs

The billing guide has a small table that I keep open when I explain this to someone new. I shortened the wording.

ControlScopeAt the threshold
Spending limitWorkers or Durable Objects, across the accountBlocks supported operations
Email alertWorkers or Durable Objects, across the accountEmails you; the product keeps running
Budget alertAccount-wide usage-based spendEmails your recipients; products keep running
AI Gateway spend limitAI requests through your gateway, by user, model or providerBlocks matching requests until the budget window resets

If your Worker calls a model through AI Gateway, that last row is a separate control with its own page. A Workers limit “does not include Durable Objects, Workers AI, Workers KV, R2, or other products.” Each has separate charges. Do not assume one number covers your whole stack.

Alert first, limit second

If you are not sure which Worker should stop, start with the control that stops nothing. An email alert tells you the spend is moving and leaves every Worker running. The guide says a policy with an email address sends notifications at 80% and 100% of the threshold, so a $20 alert can notify you at $16 and at $20.

The cf CLI can show you what it would do before it does it. The docs say: “To preview the request without creating a policy, add --dry-run.” Use that first.

1# Preview an email alert for Workers at $20. Nothing is created.
2cf billing spend-policies create \
3  --name 'Workers $20 email alert' \
4  --product-id workers \
5  --enabled true \
6  --threshold-cents 2000 \
7  --action notification \
8  --notification-email [email protected] \
9  --dry-run

--threshold-cents is a whole number of US cents, so 2000 means $20 and zero is not supported. --action notification means email only. Replace the address with a mailbox a human reads.

Remove --dry-run to create the alert. The guide says you can create several alerts, including next to a limit, so a second one at a higher number is fine.

Once an alert has run for a week and you know your normal spend, add the limit. This is the command from Cloudflare’s changelog, with the optional notification address added:

1# A $50 Workers limit that blocks, with an email address attached.
2cf billing spend-policies create \
3  --name 'Workers $50 spending limit' \
4  --product-id workers \
5  --enabled true \
6  --threshold-cents 5000 \
7  --action usage_block \
8  --notification-email [email protected]

The two highlighted lines are the ones that matter. 5000 means $50, and usage_block means the limit blocks. If you get HTTP 409, the guide says an enabled limit already exists for that product: update it, or turn it off before enabling another.

Now a gotcha that the dashboard path hides. The billing guide says: “Spending limits created in the dashboard do not automatically have an email recipient.” To get notified, update the policy with a notification_email. The changelog says you also choose a notification email on the setup screen, so the two pages read slightly differently. Trust what your own screen shows. If you are not sure, run cf billing spend-policies list and read the policy back.

Resume: three ways back

At 2 a.m. the hard part is not knowing what the limit does. It is knowing how to turn it back. The guide lists three options in Spend Management:

ActionResult
Raise the limit above the product’s current spendRestores operations, keeps a higher limit
Turn the limit OffRestores operations, keeps the saved amount
Remove limit and confirmRestores operations, removes the policy

“Changes can take a few minutes to apply.” And: “Turning the same limit off and on does not reset this period’s spend.” The block also ends on its own at the start of the next subscription billing period, and an enabled limit stays configured for the new period.

From the terminal, an update replaces the whole policy, so you must pass every required option again, plus the policy’s current version:

 1# 1. Find the policy and read its current version.
 2cf billing spend-policies list
 3cf billing spend-policies get <POLICY_ID>
 4
 5# 2. Raise the Workers limit to $100. --if-match refuses to overwrite
 6#    someone else's newer change.
 7cf billing spend-policies update <POLICY_ID> \
 8  --if-match <VERSION> \
 9  --name 'Workers $100 spending limit' \
10  --product-id workers \
11  --enabled true \
12  --threshold-cents 10000 \
13  --action usage_block \
14  --notification-email [email protected]

Two error codes are worth knowing now, so you meet them calm instead of at 2 a.m. 412 means someone changed the policy: fetch it again, read the new settings, retry with the current version. 428 means you forgot --if-match. Both are in the CLI guide’s error table.

The guide is blunt about the cost of resuming: “Further usage can incur charges once service resumes.” Resuming is a spending decision. It belongs to a named person, not to whoever is awake.

Name the owner before you turn it on

A limit without an owner is a trap with a timer. Write four lines on the ticket before you save anything:

1Cloudflare Workers spending control
2  Product:        workers  (Durable Objects is a separate policy)
3  Type:           email alert at $__ first; limit at $__ after one week
4  Notified:       __________@________   (a mailbox a human reads)
5  Blocked first:  list every Worker in this account, test ones included
6  Allowed to raise or remove the limit:  __________
7  Resume check:   open Billing > Spend Management, Workers row

The Blocked first line is the one that earns its keep. It forces someone to open the Workers list and read every name. If one of those names is production and another is a test Worker with a loop in it, you have just found the reason to split accounts or to start with an alert only.

Three choices: email alert only, limit with Block usage, or both; each shows what keeps running and who is told.

What this post is not saying

  • It is not saying you should turn on a blocking limit. For many accounts the right first step is an email alert.
  • It is not saying every account is at risk. If your account holds one Worker, the shared gauge has one occupant.
  • It is not saying the limit is a guaranteed cap. Cloudflare says plainly that it is not an exact maximum bill.
  • It is not covering products the docs list separately. Durable Objects has its own limit and its own docs page, which I did not read for this post. KV, R2 and Workers AI have their own charges. AI Gateway has its own spend limits page.
  • It is not saying anything about prices or plans. Look at your own Billing page for numbers.
  • It is not a claim that your site is affected. A static site that serves files without running a Worker keeps running, by the docs’ own rule.

What you should do Monday morning

  1. Open Billing, then Spend Management, in the Cloudflare account that pays for production. Find the Workers row. Write down whether a limit or alert exists today.
  2. Open the Workers list for that account. Write every Worker name on the ticket. Mark each one production, staging or test. If production and test share the account, say so out loud in standup.
  3. Create an email alert first with cf billing spend-policies create ... --action notification --dry-run. Read the preview. Then remove --dry-run.
  4. Put a mailbox a human reads in --notification-email. Check the dashboard-created ones: the guide says they have no recipient by default.
  5. Write down who may raise, turn off or remove a limit, and the one place they do it: Billing, then Spend Management.
  6. Wait a week. Read the alerts. Only then decide whether a blocking limit is worth the shared-gauge risk, and at what number.
  7. Add one line to your incident runbook: “Error 1103: open Billing, then Spend Management before filing a support ticket.”

What this connects to

This is a change-control problem more than a billing one: a shared setting, a named owner, a way back. I made the same argument about Wrangler config in A Missing Previews Block Is Not a License to Reuse Production Bindings, where preview and production shared more than the team realized. The Durable Objects side of Cloudflare has its own surprise in A Green Wrangler Deploy Is Not an Immediate Durable Object Code Cutover.

If a coding agent runs your deploys and could save a limit for you, read I Do Not Give a Coding Agent Merge Rights first. Cloudflare’s own changelog even offers a prompt for a coding agent to set the limit. The command is short; the decision about which Worker should stop is not. The wider family of agent-operations checks lives in /ai-agent-operations/, the tool notes are under /developer-tools/, and new readers should start at /start-here/.

Further reading

Source Cloudflare changelog: Set spending limits for Workers and Durable Objects

Source Cloudflare Billing: Spending limits and alerts

Source Cloudflare Workers: Spending limits

Source Cloudflare Billing: Manage spending limits and alerts with the cf CLI