A workflow that loops forever. Temporal will end it.
transcript
Your subscription workflow loops. Sleep 30 days. Charge. Repeat. Forever. Then one day, Temporal terminates it.
Here's why. Temporal records every step as an event in the workflow's history. Every loop adds more events. The history never shrinks. After a crash, the workflow replays that whole history. So replays get slower. And eventually, Temporal terminates the run.
From 10,000 events, you get warnings. At 51,200 events, the run is terminated. Or at 50 megabytes of history, whichever comes first.
The fix is continue-as-new. Bill for up to 12 cycles. One year. Then start again as a new run, passing along the state you need. Fresh, bounded history. Same customer, same subscription, forever.
But here's the catch. Run each cycle as a short child workflow? A parent that loops forever still grows its own history.
A workflow can run for years. Its history can't grow for years. Forever is a chain of fresh runs.
Full breakdown in the lecture.