One morning, our daily automated code review flagged a refactor we had just pushed. The finding fit in one line: in the new code, nothing renews a running generation's heartbeat while the model is thinking, so a generation can be reclaimed as dead while it's still working, and the model call is paid for, then thrown away.
It was right, and checking it turned up a hole older than the refactor.
Some context. I run backend engineering at GoodBarber , an app platform, and our AI Extension Builder generates the code of an app section from a description, then edits it on request. Each generation runs as a job on a worker. This post is about how that worker tells the rest of the system it's alive, and why reasoning models broke the way it did.
How a generation says it's alive
A running generation holds a key in Redis that says "I'm alive", with a 90-second expiry. Whoever runs the job is supposed to renew it.…