{
  "id": 8845610,
  "title": "4 Days, 3 Wasted Calls Per Run: My Retry Loop Mistook a Quota-Limit Message for a 'Too Short' Article",
  "url": "https://urgent.news/2026/09/21/4-days-3-wasted-calls-per-run-my-retry-loop-mistook-a-quota-limit",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-21T05:00:05.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/bokuwalily/4-days-3-wasted-calls-per-run-my-retry-loop-mistook-a-quota-limit-message-for-a-too-short-4l23"
  },
  "original_language": "en",
  "account": "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.",
  "summary": "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…",
  "key_points": [
    "Script mistook quota limit message for generation failure",
    "Consumed 3 Claude -p calls per run instead of 1",
    "Fixed by identifying limit message after each generation pass"
  ],
  "editors_take": "The script's faulty retry mechanism meant it wasted resources on unfixable failures, a problem that persisted across multiple pipelines until a targeted fix was implemented.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}