
AI-written code has a default bias: cramming all logic into a single HTTP request. Sending emails, calling big models, bulk imports — users stare at a spinner for 30 seconds, then hit a 500 timeout. This guide covers when vibe projects must push work to the background, how to pick a queue (Inngest / Trigger.dev / BullMQ / pg-boss), idempotency and retries, and a task template for getting agents to wire it up right.













