# Repository Briefing: terryso/claude-auto-resume
> Source: https://repoforai.com/repo/terryso/claude-auto-resume (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/terryso/claude-auto-resume
- **Official Docs / Website**: https://gptkit.eth.limo/
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Shell
- **License**: MIT
- **Engineering Health**: C (45/100 · Maintenance 6/35 · Adoption 13/25 · Releases 6/20 · License 20/20)
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: CLI
- **Momentum**: 819 ★ total (+0 24h / +0 7d) · 63 forks
- **Topics**: `auto-resume`, `claude`, `claude-ai`, `claude-code`, `shell-script`
- **When to Use**: Best for: Developers with an isolated, version-controlled workspace who want a known Claude session or a reviewed local command to run after a quota reset. Skip if: You need MCP integration, persistent task checkpoints, per-action approvals, or unattended execution on hosts with production access.

## Overview
```text
### Architecture & Core Mechanics
Claude Auto-Resume is a local wrapper around the Claude executable, not an MCP server or a checkpointing engine. It runs `claude -p 'check'`, looks for a usage-limit message such as `Claude AI usage limit reached|`, and turns the reported reset timestamp into a countdown. When the wait ends, it launches Claude or hands off to a user-supplied shell command.

On Linux and macOS, `claude-auto-resume.sh` uses Bash and standard tools including `grep`, `date`, `sleep`, and `awk`. Windows has a PowerShell implementation, `claude-auto-resume.ps1`, and a `.cmd` launcher. The integration boundary is the executable and its human-readable output: no MCP registration is needed, and conversation state remains with Claude CLI.

### Key Capabilities & Differentiators
The wrapper separates when to launch from what to launch. The default path opens a fresh Claude session; `-c` continues the last conversation, while `-p` or a positional argument supplies a prompt. `-e`/`--execute` and its `--cmd` alias instead run a shell command after the wait, with support for pipelines, redirections, and compound operators. The wrapper does not select another model or backend.

`--test-mode` simulates a usage limit with a wait specified in seconds, so the countdown and command handoff can be exercised without waiting for a real reset. `--check` provides system-check information. Exit codes 1, 2, and 4 distinguish Claude CLI execution failure, invalid or missing reset timestamps, and resume-command failure. The tree includes parsing and limit-simulation scripts; `make test` is a syntax check, not proof of compatibility with a live Claude CLI version.

### Trade-offs & Limitations
Compared with manual continuation, the wrapper removes the need to return at the reset time, but also removes a chance to review what will run. Unlike a fixed-time scheduler, it derives the launch time from Claude's reset message; the cost is sensitivity to CLI wording and timestamp changes. It waits out the reported limit rather than increasing quota, and launching a new session is not equivalent to recovering an interrupted conversation.

The main adoption risk is the default execution policy: Claude launches use `--dangerously-skip-permissions`, and custom commands execute without confirmation. The wrapper's warning and cancellation options are not a sandbox or an approval gate for individual actions. Reserve unattended use for a low-privilege, isolated development workspace with trusted inputs and no production credentials. Prefer manual continuation when approvals or reliable selection of the prior session matter.

### Hardware & Deployment Guide
Install Claude CLI and make it available on `PATH`. Linux and macOS can run the Bash entry point directly or install it through the Makefile. On Windows, put the PowerShell script and `.cmd` launcher in a directory on the user's `PATH`; the launcher prefers `pwsh` and falls back to Windows PowerShell. Use PowerShell 7+ or Windows PowerShell 5.1+.

The wrapper does not require a GPU, container, or model server, but Claude execution still relies on Claude CLI and its service. No GitHub release is listed. Prefer reviewing and pinning a source revision to installing from a moving branch with elevated privileges. Before relying on unattended operation, test the countdown with a harmless command and verify reset-message parsing against the Claude CLI version you intend to run.
```

## Key Capabilities
```text
- Reset detection: Probes with `claude -p 'check'` and derives the countdown from a reset timestamp in CLI output.
- Session selection: Starts a fresh conversation by default; `-c` continues the last conversation through Claude CLI.
- Delayed execution: `-e`, `--execute` and `--cmd` accept shell commands with pipelines, redirections and operators.
- Execution boundary: Claude launches bypass its normal permission prompts; custom commands run without confirmation.
- Platform entry points: Bash on Linux/macOS, PowerShell 5.1+ or 7+ on Windows, and a `.cmd` wrapper that prefers `pwsh`.
- Verification: `--test-mode` simulates a wait in seconds; exit codes 1, 2 and 4 distinguish CLI, timestamp and launch failures.
```

## Quick Start / Clone
```bash
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
```
