Back to catalog

claude-auto-resume

by terryso

Pending

A shell script utility that automatically resumes Claude CLI tasks when usage limits are lifted.

657stars
45forks
Shell
Added 12/27/2025
CLI Toolsauto-resumeclaudeclaude-aiclaude-codeshell-script
Installation
# Add to your Claude Code skills
git clone https://github.com/terryso/claude-auto-resume
README.md

Claude Auto-Resume

A shell script utility that automatically resumes Claude CLI tasks when usage limits are lifted, or executes custom shell commands after waiting periods. It detects Claude usage restrictions, waits intelligently, and resumes task execution automatically.

English | 中文

Claude/Codex 拼车服务

| 平台 | 类型 | 服务 | 扫码拼团 | |:---|:---|:---|:---| | ctok.ai | 🤝 合作伙伴 | <small>✅ Claude Code<br>✅ Codex CLI</small> | |

ko-fi

⚠️ SECURITY WARNING

This script uses --dangerously-skip-permissions flag when executing Claude commands and can execute arbitrary shell commands, which means:

  • Claude Code will execute tasks WITHOUT asking for permission
  • Custom shell commands will execute WITHOUT user confirmation
  • File operations, system commands, and code changes will run automatically
  • Use ONLY in trusted environments and with trusted prompts/commands
  • Review your prompt or command carefully before running this script

Recommended Usage:

  • Use in isolated development environments
  • Avoid on production systems or with sensitive data
  • Be specific with your prompts to limit scope of actions
  • Consider the potential impact of automated execution

Use Cases

This script is particularly useful when using Claude Code for development in the following scenarios:

  1. Task Interrupted by Usage Limits: When your Claude Code shows Claude usage limit reached. but your task is not yet completely finished
  2. Automatic Task Resumption: Simply run claude-auto-resume in your project's root directory, and when the usage limit is lifted, the script will automatically let Claude Code continue executing your previously unfinished task
  3. Custom Command Execution: Execute any shell command after waiting for usage limits, useful for restarting services, running builds, or processing data

Features

  • 🔄 Automatically detects Claude CLI usage limits
  • ⏰ Smart waiting with countdown display
  • 🚀 Automatic task resumption
  • 🔧 Custom command execution after wait periods
  • 🛡️ Security warnings with cancellation options
  • 🔗 Support for complex commands (pipes, redirections, operators)
  • 🧪 Built-in test mode for development and validation
  • 🖥️ Cross-platform support (Linux/macOS)
  • 📦 Zero external dependencies (only standard Unix tools required)

Installation

method 1: using wget (Recommended)

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-resume

method 2: using Makefile

# Global installation
sudo make install

# Install to custom location
sudo make install PREFIX=/opt/local

# Uninstall
sudo make uninstall

method 3: Manual Installation

# Copy to system path
sudo...