Claude Auto-Resume waits out a usage limit, then restarts Claude with permissions skipped
A shell script utility that automatically resumes Claude CLI tasks when usage limits are lifted.
At a glance
- What is it?
- A single shell script that asks Claude whether it is rate limited, sleeps until the timestamp it reports has passed, and then re-launches the same prompt. It also runs arbitrary shell commands after the wait, and the page opens with a security warning rather than a feature list.
- Who is it for?
- This script fits a developer working in a disposable container or a throwaway worktree who is tired of a five hour usage window ending mid-task and who accepts that a resumed Claude session will act without asking permission. It does not fit a production host, a machine holding real secrets, or a workflow where an unattended agent should not be able to write files and run system commands, because that is exactly what the resumed command does.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Activity is slowing. The repository last received commits 6 months ago.
- What is it written in?
- Mainly Shell, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- terryso/claude-auto-resume820 ★ · -4
| Repository | 2026-09-21 | 2026-11-15 |
|---|---|---|
| terryso/claude-auto-resume | 824 | 820 |
-4 Stars in the last 55 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The page opens with a warning, not a feature list
The first substantive block on the page is a security warning, and it is unusually specific. The script uses the --dangerously-skip-permissions flag when it executes Claude commands, and it can execute arbitrary shell commands. That means Claude Code runs tasks without asking for permission, custom shell commands run without user confirmation, and file operations, system commands and code changes all run automatically. The recommended usage follows the same logic: isolated development environments, never production systems or sensitive data, prompts specific enough to limit the scope of actions, and a moment spent considering the impact of automated execution before you start. The instruction to review the prompt or command carefully before running the script is doing more work than a usual caution line, because the tool has no second gate once it is running.
Detection is a throwaway claude -p check parsed by string match
The mechanism is five steps and the first is the only clever part. It executes claude -p 'check', a cheap one-off request used purely to see what comes back. It then parses the output looking for messages in a Claude AI usage limit reached followed by a timestamp format. The wait time is calculated from that timestamp rather than from a fixed sleep, and a countdown is displayed while the script waits. Only after the countdown does it act, and the last step has three branches: a fresh session, a continued session when the -c flag was given, or a custom shell command when -e or --cmd was used. So the whole thing is a polling loop around a string match, which also means the parse is only as good as the message format the CLI happens to emit.
The resumed command is the part with teeth
When the script resumes, the command it runs is claude --dangerously-skip-permissions with the prompt passed in, or the same command with -c inserted ahead of the flag to continue an existing conversation. The custom command path is a separate branch, reached by -e, by its long form --execute, or by the --cmd alias, and the feature list notes that complex commands are supported, including pipes, redirections and operators. That combination is what the warning refers to. A prompt that resumes unattended, running without a permission prompt, in a directory where file changes and shell commands are both allowed, is a very different thing from the same prompt typed by hand at an interactive Claude session. The other flags are quieter: -v for version, --check for system information, and --test-mode, which the page labels for development and simulates a usage limit with a wait time you specify in seconds.
Four install routes, and one of them installs a symlink to your checkout
Installation is presented as four numbered methods. The first pipes the script straight from the develop branch into the system path:
wget -qO- https://raw.githubusercontent.com/terryso/claude-auto-resume/refs/heads/develop/claude-auto-resume.sh | sudo tee /usr/local/bin/claude-auto-resume >/dev/null && sudo chmod +x /usr/local/bin/claude-auto-resumeThat one takes whatever is on develop at the moment you run it, with no version to pin. The second is the Makefile:
sudo make install
sudo make install PREFIX=/opt/local
sudo make uninstallThe Makefile is thirty lines, with a PREFIX variable defaulting to /usr/local, an install target that copies claude-auto-resume.sh and makes it executable, and an uninstall that removes the copy. The third method copies the file by hand or creates a symbolic link from /usr/local/bin back into your checkout, so the installed command tracks whatever you edit locally. The fourth skips installation entirely and runs ./claude-auto-resume.sh from the repository.
Four test scripts sit at the root that the Makefile never runs
The repository root holds four shell scripts with names that look like a test suite: test-simulate-limit.sh, test_message_formats.sh, test_message_parsing.sh and test_unified_parser.sh. The Makefile does not reference any of them. Its test target is two lines, a bash -n syntax check on the main script and a message saying the syntax check passed, and it is listed in .PHONY alongside install and uninstall. So the parsing logic, which is the fragile part of this design, has dedicated test files that no make target invokes and no continuous integration job runs, while the target that does run stops at whether the file parses as bash. A docs directory is present too, and the Chinese README sits next to the English one as README_zh.md.
The Windows steps are the fork's, and the branch is develop
The page is explicit about provenance in two places. The Linux and macOS installation steps are described as identical to the original upstream repository and kept unchanged, while the Windows PowerShell steps are described as specific to this fork. Those steps copy claude-auto-resume.ps1 and claude-auto-resume.cmd into a bin directory under the user profile, ask you to put that directory on your user PATH, and then run claude-auto-resume --help to confirm it. The .cmd wrapper exists so the command works from PowerShell or from CMD, and it prefers pwsh when pwsh is available and falls back to Windows PowerShell otherwise. The default branch of the repository is develop, not main, and the wget one-liner points at refs/heads/develop for that reason, so the file you install is whatever the development branch currently holds.
A partner table for shared account access sits above the warning
Between the project description and the security warning there is a section in Chinese about pooled Claude and Codex access, presented as a table with one row. It names a single platform, marks it as a partner, lists Claude Code and Codex CLI as what it offers, and leaves the group sign-up column empty. A Ko-fi link sits underneath it. None of that is part of the script: the script itself has zero external dependencies and needs only standard Unix tools, and there is no affiliate link, referral code or vendor call inside the shell script. The distinction matters when you read the rest of the page, because the table is the one element that could be mistaken for something the tool depends on, and the warning that follows it is about the tool's own behaviour rather than about where the tool comes from.
Editorial conclusion
This script fits a developer working in a disposable container or a throwaway worktree who is tired of a five hour usage window ending mid-task and who accepts that a resumed Claude session will act without asking permission. It does not fit a production host, a machine holding real secrets, or a workflow where an unattended agent should not be able to write files and run system commands, because that is exactly what the resumed command does. Before running it, read the detection step so you know what string it is matching, check that the prompt you pass is one you would be willing to hand to an unattended process, and remember that the four test scripts at the repository root are not wired into the Makefile.
Frequently asked questions
How does Claude Auto-Resume detect that the usage limit was hit?
It executes claude -p 'check' and parses the output for messages in a Claude AI usage limit reached plus timestamp format. The wait time is then calculated from that timestamp rather than from a fixed sleep.
Does Claude Auto-Resume skip Claude's permission prompts?
Yes. The resumed command is claude --dangerously-skip-permissions with your prompt, or the same with -c added to continue a conversation. The page opens with a security warning about exactly this, advising isolated environments and no production or sensitive data.
What are the flags for Claude Auto-Resume?
A bare command starts a new session with the prompt continue, a single argument sets a custom prompt, -p passes a prompt as a flag, -c continues the previous conversation, -e or --cmd runs a custom shell command after the wait, and --test-mode simulates a limit with a wait time in seconds.
How do I install Claude Auto-Resume on Linux or macOS?
Four methods: pipe the script from the develop branch into /usr/local/bin with wget, sudo make install or sudo make install with a PREFIX, copy or symlink the file by hand, or run ./claude-auto-resume.sh from the repository without installing.
What do the test scripts in the Claude Auto-Resume repository do?
The root holds test-simulate-limit.sh, test_message_formats.sh, test_message_parsing.sh and test_unified_parser.sh. The Makefile test target does not call any of them; it runs bash -n on the main script as a syntax check only.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/terryso-claude-auto-resume)Star history chart for your README
[](https://hysenlabs.com/projects/terryso-claude-auto-resume)Was this useful?