Existing documentation URL(s)
https://developers.cloudflare.com/workers/runtime-apis/handlers/fetch/#context-waituntil
What changes are you suggesting?
It would be helpful if the Workers docs more clearly explained what can happen when async work is started but neither awaited nor passed to ctx.waitUntil().
This can be confusing for developers who assume a background task will continue running after a response is returned. In practice, those tasks may be interrupted, which can lead to lost logs, incomplete writes, or other silent failures.
suggested improvement:
Please add a short warning or example explaining that:
- async work may not finish after the response is returned unless it is awaited or passed to
ctx.waitUntil()
ctx.waitUntil() should be used for background tasks that must continue after returning a response
This would help prevent a common source of confusion in Workers.
Additional information
No response
Existing documentation URL(s)
https://developers.cloudflare.com/workers/runtime-apis/handlers/fetch/#context-waituntil
What changes are you suggesting?
It would be helpful if the Workers docs more clearly explained what can happen when async work is started but neither awaited nor passed to
ctx.waitUntil().This can be confusing for developers who assume a background task will continue running after a response is returned. In practice, those tasks may be interrupted, which can lead to lost logs, incomplete writes, or other silent failures.
suggested improvement:
Please add a short warning or example explaining that:
ctx.waitUntil()ctx.waitUntil()should be used for background tasks that must continue after returning a responseThis would help prevent a common source of confusion in Workers.
Additional information
No response