{
  "id": 2722197,
  "title": "Rate Limits Cost Me a Whole Night of Work — Here's the 46-Line Script That Fixed It",
  "url": "https://urgent.news/2026/08/23/rate-limits-cost-me-a-whole-night-of-work-heres-the-46-line-script",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-23T05:00:06.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/bokuwalily/rate-limits-cost-me-a-whole-night-of-work-heres-the-46-line-script-that-fixed-it-7o3"
  },
  "original_language": "en",
  "account": "Lily shares her experience of losing a night of work due to a Claude Code rate limit block. The block wipes accumulated working context, forcing a restart from scratch. She created a 46-line script called resume-on-ratelimit.sh to automatically resume the session after the rate limit is cleared. The script watches the exit code of Claude and waits for a specified time before retrying up to 20 times. It relies on a PROGRESS.md file where users record task progress in human-readable text. This allows Claude to understand the context even after the session is severed during a rate limit. The script uses a different prompt for the first run and retries to maintain continuity of intent. Once the retries exceed the maximum limit, an error notification is displayed and the script exits. By automating the process, users can work on tasks without constantly monitoring the system, leading to increased productivity and revenue.",
  "summary": "Every heavy Claude Code user eventually hits the wall: the 5-hour rate limit block. I'm Lily. I lost my income overnight to a company-initiated layoff, rebuilt my setup starting that same month, and got back to ¥1.2M/month in revenue within six months. Why This Setup Works To most users, a rate limit block looks like a simple \"pause.\" Grab a coffee, wait it out. The reality is far more…",
  "key_points": [],
  "editors_take": "This development allows users to bypass manual intervention when rate limits interrupt their work, thereby increasing productivity and revenue by minimizing downtime and loss of accumulated context.",
  "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."
}