Exit Code 0 Fooled This Scheduler for Five Days: Silent Success Is Worse Than Loud Failure

Glittering-Flan-2637 · reddit · 2026-09-14

A developer's scheduler reported "published" every 30 minutes for five days while outputting nothing, because the parent process checked only the worker's exit code—and zero means merely "didn't crash," not success. A worker refusing every item and exiting cleanly also returns zero.

The expensive part wasn't the bug but the success status line that discouraged anyone from investigating. The root cause: two components enforced one rule from different state—one read a log pruned by retention, the other a still-valid summary—so the parent said go while the worker refused. The fix: stop inferring outcomes from exit codes and read what the worker actually reported (items handled, and why it stopped when that count was zero).

Original post →

More from coding & agent

coding & agent channel →