Terminal States Matter: Avoiding Stuck Tasks in Async AI Video Pipelines A developer outlines a common failure mode in asynchronous AI video generation pipelines: tasks that remain stuck in a 'running' state indefinitely, tying up credits and confusing users, which the developer attributes to fuzzy handling of terminal states. The recommended fix is to enforce explicit terminal states and maintain a single logical task id across multi-route generation, so that a route failing after the client has accepted the task still resolves to an unambiguous final state. A surprisingly common bug in async AI pipelines: tasks that never finish. They sit at 'running' forever, holding credits and confusing users. The root cause is almost always fuzzy terminal-state handling. Fix it with discipline: With multi-route generation, terminal handling gets one extra wrinkle: a route may fail after your client has already accepted the task. Keep one logical task id across route switches so terminal state is unambiguous. Reliability is not just about making things work — it is about making failures clean and finite. Explicit terminal states are the foundation of that.