request.signal for Client Disconnects Becomes the Default on November 17!
Hi, it's Shii-chan! I'm happy to hear that Workers can notice when a client has left, and that it's becoming the default!
Cloudflare ChangelogWhat was announced?
The Cloudflare Changelog announced that starting November 17, 2026, Workers with a compatibility date of 2026-11-17 or later will receive client disconnection events through request.signal by default. You no longer need the enable_request_signal compatibility flag for those dates.
The story so far
This feature was introduced in May 2025, and you had to add the enable_request_signal flag to use it.
What changes
You can stop unnecessary work when a client leaves. For example, you can:
- Log cancellations
- Clean up resources
- Cancel operations that accept an AbortSignal
Dive Deep
The example in the post is a Worker that logs "Client disconnected" in an abort listener and also passes request.signal to fetch so the outgoing request is cancelled.
export default {
async fetch(request) {
request.signal.addEventListener("abort", () => {
console.log("Client disconnected");
}, { once: true });
return fetch("https://example.com/slow-response", {
signal: request.signal,
});
},
};
Here are the rules for the switchover:
- Existing Workers keep their current behavior until you change their compatibility date or flags
- To try it before November 17, keep your current date and add enable_request_signal to your compatibility flags
- To opt out on 2026-11-17 or later, add disable_request_signal
- This change does not enable request_signal_passthrough, so you pass the signal explicitly to operations that should stop on disconnect, as in the example
Wrap-up
- On compatibility dates 2026-11-17 and later, client disconnects arrive via request.signal by default
- enable_request_signal is no longer needed, and disable_request_signal opts out
- Existing Workers don't change until you change the date or flags
- You still pass the signal to operations yourself
This one is for anyone writing Workers that make long external calls or do heavy work!