claude-auto-retry
Automatically retry Claude Code sessions when you hit Anthropic subscription rate limits.
When Claude Code shows "5-hour limit reached - resets 3pm", this tool waits for the reset and sends "continue" automatically. You come back to find your work done.
No dependencies. No workflow change. Just install and forget.
---
💡 Why wait out the limit at all? This tool auto-resumes Claude Code the moment you're rate-limited — but if you run overnight jobs or always-on agents, there's a way to stop hitting the wall in the first place. See how it's done →
The Problem
You're in the middle of a complex task with Claude Code. After a while, you see:
You've hit your limit · resets 3pm (Europe/Dublin)Claude stops. You have to wait hours, come back, and type "continue". If you're running long tasks overnight or while AFK, this kills your productivity.
The Solution
npm i -g claude-auto-retry
claude-auto-retry installThat's it. Type claude as you always do. When the rate limit hits, the tool:
- Detects the rate limit message in the terminal
- Parses the reset time (timezone-aware)
- Waits until the limit resets + 60s margin
- Verifies Claude is still the foreground process
- Sends "continue" automatically
You come back to find your task completed.
How it Works
You type "claude"
│
▼
Shell function (injected in .bashrc/.zshrc)
│
├─ Already in tmux? ──▶ Start background monitor
│ Launch claude with full TUI
│
└─ Not in tmux? ──▶ Create tmux session transparently
Launch claude + monitor inside
Attach (looks the same to you)
│ ├─ Polls tmux pane every 5 seconds ├─ Detects rate limit text ├─ Parses reset time from message ├─ Waits until reset + safety margin ├─ Verifies Claude is still the foreground process └─ Sends "continue" via tmux send-keys