Automatically resumes Claude CLI tasks when usage limits are lifted. Ideal for operations teams managing AI workloads. Integrates with shell scripts and custom commands.
git clone https://github.com/terryso/claude-auto-resume.githttps://github.com/terryso/claude-auto-resume
[{"step":"Identify the paused task","action":"Run `claude --list-paused` to find the task ID and command. Note the exact command used to initiate the task (e.g., `claude --analyze dataset.csv --model haiku-3.5`).","tip":"Use `claude --verbose` for detailed logs to confirm the task was paused due to usage limits."},{"step":"Set up automation","action":"Create a shell script (e.g., `resume_claude_task.sh`) that includes the paused task's command and resume logic. Example: `#!/bin/bash\nTASK_ID=\"cli_7f8a2b1c\"\nLOG_FILE=\"/var/log/claude/resume_${TASK_ID}_$(date +%Y%m%d).log\"\nclaude --resume $TASK_ID --continue >> $LOG_FILE 2>&1\n# Add notification logic (e.g., curl for Slack webhook)","tip":"Test the script manually first to ensure the resume command works as expected."},{"step":"Schedule periodic checks","action":"Use `cron` to run the script every 5-15 minutes during business hours. Example: `*/10 * * * * /path/to/resume_claude_task.sh`","tip":"Adjust the frequency based on your usage limits reset time (e.g., every 5 minutes if limits reset hourly)."},{"step":"Monitor and log results","action":"Check the log file for errors or completion status. Use `claude --status [TASK_ID]` to verify progress. Set up alerts for failures (e.g., `if ! grep -q \"completed\" $LOG_FILE; then send_alert; fi`).","tip":"Use tools like `logrotate` to manage log file sizes if running long-term."},{"step":"Handle edge cases","action":"Add fallback logic for tasks that fail to resume automatically. Example: `if ! claude --status $TASK_ID | grep -q \"running\"; then claude --force-resume $TASK_ID; fi`","tip":"Test force-resume scenarios in a non-production environment first."}]
Automatically resume interrupted Claude tasks when usage limits are lifted.
Execute custom shell commands after waiting for usage limits, such as restarting services or running builds.
Continue previous conversations with Claude without needing to manually re-enter prompts.
Utilize the script in isolated development environments to automate repetitive tasks.
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/terryso/claude-auto-resumeCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
I need to automatically resume a paused Claude CLI task after usage limits reset. The task was running with the command: [CLAUDE_CLI_COMMAND]. Check if the task is still in the queue or paused. If paused, resume it using [RESUME_METHOD] (e.g., 'claude --resume [TASK_ID]'). Monitor progress and log the output to [LOG_FILE_PATH]. Notify me via [NOTIFICATION_METHOD] (e.g., Slack, email) when the task completes or fails.
Resuming paused Claude CLI task for 'claude --analyze dataset.csv --model haiku-3.5' (Task ID: cli_7f8a2b1c). Status Check: - Current usage: 85/100 tokens (15 tokens remaining) - Queue position: 3rd in line (estimated wait: 12 minutes) - Last checkpoint: Processed 4,215 records out of 10,000 Resume Command Executed: > claude --resume cli_7f8a2b1c --continue Output Log (auto-appended to /var/log/claude/resume_job_20240515.log): [2024-05-15 14:32:10] Resuming task cli_7f8a2b1c... [2024-05-15 14:32:12] Task resumed successfully. Progress: 4,215/10,000 records processed. [2024-05-15 14:32:15] Processing batch 142... (4,216-4,235) Estimated Completion: - Records remaining: 5,785 - Estimated time to completion: 2 hours 15 minutes (at current rate of 2,300 records/hour) Notification Sent: ✅ Slack: 'Task cli_7f8a2b1c has resumed. Progress: 42.15% complete. ETA: ~16:47 UTC.' Next Steps: 1. Monitor the log file for errors: `tail -f /var/log/claude/resume_job_20240515.log` 2. Check task status in 30 minutes: `claude --status cli_7f8a2b1c` 3. If the task stalls again, manually intervene with: `claude --force-resume cli_7f8a2b1c`
AI assistant built for thoughtful, nuanced conversation
Your one-stop shop for church and ministry supplies.
Automate your browser workflows effortlessly
Accounting software with automated invoicing and reporting
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan