Job 4817 was submitted exactly once, and it produced three emails, two database rows, and one very confused customer. The log said timeout after 30000ms, the database said duplicate key, and for three hours those looked like two unrelated incidents. They were the same bug, and it appeared the night we moved a nightly summarization batch to a free model endpoint to push the inference bill to zero.
We pointed the worker at MonkeyCode's free model access, with its 10M-token free allowance, and deployed it on the free server option, because the math felt obvious: a batch job that tolerates latency should not pay for a hot path. Disclosure: This article was prepared as part of MonkeyCode's product outreach. What follows is a debugging retrospective, not a product review; the endpoint could be any free-tier AI API, and the reusable part is the method.
The Failure Sequence, Reconstructed
The logs only made sense when I drew them as a timeline:
t=0.000 client -> POST /chat/completions key: a1b2c3






