PaPoo
cover

The part everyone gets wrong about batch jobs

What struck me here is how unglamorous the advice is. That is a compliment. Most “AI production” writing wants to talk about orchestration, agent loops, and all the sexy failure modes. This piece stays on the boring bit that actually burns teams: what you do when a batch comes back half-finished and somebody is tempted to just rerun the whole thing.

That temptation is real, and I think the article is right to push back hard on it. If you resubmit everything, you are not “being safe”; you are inviting duplicate side effects, especially if the batch feeds refunds, notices, account changes, or payments. The source keeps coming back to the same separation, and it’s the right one: a model can return a message, but that is not the same as approving an action. Those need to be different fields, different checks, and ideally different services.

The other thing I like is the insistence on custom_id as a join key, not as a magic idempotency wand. That distinction matters more than people admit. A lot of people see a stable ID and mentally stop there, but the article is careful to say the ID only helps you match output to input. It does not stop your downstream system from doing the same thing twice. That responsibility belongs where the real action happens.

I do wonder how many teams will actually keep the discipline this requires. The advice is good, but it asks for a real data model: store prompt version, submission time, status, original IDs, human decisions, retry rules. That’s the sort of thing teams say they’ll add later and then never quite do until a duplicate payment or duplicate ticket teaches them why it mattered.

The strongest line in the whole piece is the one buried in the middle: succeeded means a message exists, not that the message is correct for your business decision. That should be obvious, but in practice people still treat a 200-ish outcome from an LLM API like approval. It isn’t. If I were building on Message Batches, I’d take this article as a reminder to make the “validated and approved” step explicit in the schema, not just in someone’s head.


Reference: Claude Message Batches: What to Do With Each Result State

同じ著者の記事