// AI Platform Drift
Cloudflare Workers AbortController now works at module global scope
Cloudflare developer changelog · published 2026-10-23 17:10 UTC
WHAT CHANGEDAs of 19 August 2026, AbortController, AbortSignal.abort(), WritableStream, and request.signal no longer throw when called during module evaluation in Cloudflare Workers. Previously these APIs required an active request context and would fail at the top level. AbortSignal.timeout() still requires an active request context.
WHY IT MATTERSWorkers that initialize abort controllers or writable streams at module scope will no longer crash on startup. Signals can now be shared and aborted across different requests, enabling cancellation coordination in long-lived Workers and Durable Objects without per-request initialization overhead.
WHAT TO DOReview Workers that currently wrap AbortController or WritableStream instantiation in request handlers solely to avoid the global scope error. These can now be moved to module scope if that simplifies your cancellation logic or reduces per-request allocation.
Model-reported confidence 85% (not measured accuracy)
Primary source ↗
written by anthropic/claude-sonnet-4.5
Show the reasoning — raw diff, triage verdict, confidence
RAW DIFF
+## Workers - AbortController and AbortSignal can be created at global scope +https://developers.cloudflare.com/changelog/post/2026-08-19-abort-signal-global-scope/ +Wed, 19 Aug 2026 00:00:00 GMT + +new AbortController(), AbortSignal.abort(), new WritableStream(), and request.signal no longer throw when used during module evaluation (that is, at the top level of your Worker module, outside of a request handler). Previously, these APIs required an active request context and would throw if called at the top level. +// This now works — no error during module startup +const controller = new AbortController(); + +export default { +async fetch(request) { +// The signal can be used across requests +return new Response("OK", { signal: controller.signal }); +}, +}; +Signals can also be observed and aborted across different requests, making it easier to coordinate cancellation in long-lived Workers such as Durable Objects. +AbortSignal.timeout() still requires an active request context because it needs to schedule a timer. +For more details, refer to the AbortController documentation.
HOW IT WAS JUDGED
Triage signals below are model-reported assertions, preserved verbatim; they are not independent arithmetic verification.
| triage verdict | MATERIAL at 0.92, needed 0.5 |
|---|---|
| triage reasoning | API behavior change removes previous error condition and enables new patterns for Workers developers. |
| signals | breaking API change: AbortController and AbortSignal no longer throw at global scope · execution model change: APIs previously requiring active request context now work during module evaluation · new capability: signals can be observed and aborted across different requests · future date: 2026-08-19 |
| suppression | — |
| triage model | anthropic/claude-haiku-4.5 ($0.00000) |
| writer model | anthropic/claude-sonnet-4.5 ($0.00000) |