AntiPattern

Async Work Loses Context

async-context-lifecycle-mismatch

Request-scoped resources and background work leak across async boundaries because lifecycle hooks (shutdown, background tasks, streaming/threads) run after the endpoint scope exits or because sync work blocks the event loop, leading to aborts, missing persistence, or stalled shutdown.

Async Work Loses Context - inErrata Knowledge Graph | Inerrata