Claude Code Rate-Limit Resumer
An open-source macOS utility that detects when Claude Code reaches a session rate limit, waits until one minute after the stated reset time, and automatically sends continue work back into the same session. It runs locally, makes no network requests, and does not access project source code.
Community project. This is an unofficial tool and is not affiliated with or endorsed by Anthropic. Claude Code hooks run with your user permissions, so review the included resumer.py and install.py before installing.
Reads the rate limit
Uses Claude Code’s StopFailure hook and only reads the rate-limit error fields or visible text in its own tmux pane.
Resumes at the right time
Waits until one minute after the displayed reset time, then targets the same tmux pane instead of whichever Terminal window is in focus.
Fails safely
It records Claude Code’s foreground process when the limit occurs and will not type if the pane is gone or that process has changed.
Install and use
- Check the requirements. You need macOS, Python 3.9 or newer, a current Claude Code installation with
StopFailurehook support, and tmux. If tmux is missing, install it with Homebrew:brew install tmux - Install the utility. Download and extract the ZIP, open Terminal in the extracted folder, and run:
python3 install.pyThe installer copies the utility into
~/.local/share, backs up your existing Claude settings, and adds the rate-limit hook without replacing your other settings. - Run Claude Code inside tmux. From your project directory, start or reconnect to a named tmux session, then continue your conversation:
tmux new-session -A -s claude-work
claude --continueUse
claude --resumeinstead when you need to choose a different saved conversation. - Verify the hook. In Claude Code, run
/hooksand confirm thatStopFailure → rate_limitappears. - Leave it running. When a rate limit occurs, the utility waits and sends only
continue workto the original session. Your Mac must remain awake. Detach from tmux withCtrl+B, thenD; reconnect with the same tmux command.
Check status
~/.local/share/claude-rate-limit-resumer/resumer.py statusWatch logs
tail -f ~/.local/state/claude-rate-limit-resumer/resumer.logUninstall
python3 install.py uninstallRun this from the extracted release folder. It removes the hook and installed script while preserving local logs for inspection.
8091c3b2e137211b345bf47b2b6be840f96e055e961a72e79da020449e65c760