Urgent.News

What's breaking now, across thousands of outlets.

Tech

4 Days, 3 Wasted Calls Per Run: My Retry Loop Mistook a Quota-Limit Message for a 'Too Short' Article

Last time I wrote about using a probe to decide which jobs to stop first when the quota runs dry . This post is about the problem sitting right next to it: my script could tell when the quota was exhausted, but it treated the limit message as if it were real article body text, then kept retrying a failure that no rewrite could ever fix. From September 13 to 16, every run burned 3 claude -p calls…

In September 13-16, a script that auto-generates product review articles encountered a problem where retrying failed runs consumed 3 Claude -p calls per run instead of just 1. The script would mistake a quota limit message, which does not include a title line, for an ordinary generation failure caused by an article that was too short.

It would continue retrying, wasting 3 Claude -p calls when only 1 was necessary. The fix was to grep for the limit message after each generation pass and abort if it matched, preventing the script from spending extra resources on unfixable failures. This fix was not implemented in other similar scripts, so the problem persisted across multiple pipelines.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

@zharwebsite | Muhammad idzhar Al-asyari

Hello, I'm Idzhar 👋 Halo! Saya @zhar_website atau biasa di kenal Muhammad Idzhar Al Asyari, lulusan SMK Tunas Pemuda jurusan Rekayasa Perangkat Lunak (RPL) dari Indonesia.

More from Monday 21 September →