Your Claude Code session hit its limit at 2 a.m. — and resumed itself by morning.
Auto-resume Claude Code when your usage limit resets, with a live web dashboard you can drive from your phone.

The problem
You give Claude Code a long task and walk away. Twenty minutes in, it stops:
You've hit your limit · resets 2:30am
The quota comes back at 2:30 — but you're asleep. The work just sits there until you come back, notice it stalled, and press continue. Hours wasted for nothing.
The fix
cc-autoresume watches your Claude Code transcripts on disk, catches that limit message, parses the reset time, and the moment quota returns it resumes the session for you:
claude -p "<your continue message>" --resume <session-id>
Set it once and walk away. It's a single static Rust binary — no Python, no venv, no runtime to install — plus a live web dashboard so you can see and steer everything (even from your phone on the same Wi-Fi).
Highlights
🌙 Resumes while you sleep — detects the limit, waits for reset, resumes headless, retries with backoff if quota isn't fully back.
🎛️ Three modes — auto (just do it), ask (wait for your OK), off (notify only) — set globally, per-project, or per-session.
📊 Live dashboard — countdown rings, watcher status, usage stats, mode & message controls, all updating in real time over SSE.
🔭 Proactive setup — list sessions active in the last 24h and pre-write their resume message + mode before they ever hit a limit.
👀 Live conversation tail — watch a headless resume actually happen, streamed into the browser.
✍️ Per-session messages — every session can carry its own task-specific "here's where you were" instruction.
📱 Phone-ready — scan a QR in Settings to open the tokenized dashboard on your phone.
✨ Polished — light/dark theme, English/Vietnamese, inline help tooltips, friendly session titles.
Screenshots
Light themePhone


Pending resumes count down on animated rings; active sessions show a friendly title (their first prompt) instead of a raw UUID.
Install (macOS)
git clone [email protected]:cuongdev/cc-autoresume.git
cd cc-autoresume
./install.sh # builds the release binary, installs to ~/.local/bin, loads the LaunchAgentinstall.sh builds, drops cc-autoresume into ~/.local/bin, and registers a LaunchAgent so the watcher + dashboard run at login. Then open the dashboard:
cc-autoresume dashboard # prints http://<lan-ip>:7317/?token=...💤 Want it to wake a sleeping Mac exactly at reset time?
install.shprints an optional one-linesudoersentry forpmset. Skip it and the resume simply fires on the next wake.
CLI
Everything in the dashboard is also a command — use whichever you like.
CommandWhat it doescc-autoresume dashboardprint the tokenized dashboard URLcc-autoresume mode auto|ask|offset the global modecc-autoresume msg "<text>"set the global resume messagecc-autoresume list / statuslist pending resumescc-autoresume cancel [prefix]cancel one (by id prefix) or allcc-autoresume arm <prefix>confirm an ask-mode resumecc-autoresume fire <id>resume a session right nowcc-autoresume token [--rotate]print / rotate the dashboard tokencc-autoresume watchrun the daemon + dashboard (used by the LaunchAgent)
How it works
~/.claude/projects/**/*.jsonl (Claude Code transcripts)
│ tail (watcher, every 20s)
▼
detect "limit · resets <time>" → parse reset time → arm a pending resume
│ (per-session preset → per-project → global)
▼ at reset (best-effort pmset wake)
liveness check (lsof) → claude -p "<msg>" --resume <id> → backoff if still limited
The resume runs through a login shell so the revived session inherits your real PATH (Node-based hooks and friends keep working). State lives in ~/.claude/auto-resume/: config.json, pending/<id>.json, stats.json, sessions.json.
Configuration
~/.claude/auto-resume/config.json (camelCase):
KeyMeaningmodeauto / ask / offdefaultMessageglobal resume messageforceHeadlessresume in the background even if the old window is still openbackoff{ everySec, maxAttempts } retry policy when quota isn't fully backperProjectper-directory mode/message overridesportdashboard port (default 7317)tokendashboard access token (auto-generated)
Per-session presets live in sessions.json.
Security
The dashboard binds 0.0.0.0 (so your phone on the same Wi-Fi can reach it) and is guarded by a random bearer token over plain HTTP. Anyone with the token on your network can control resumes — which run claude — so use it on a trusted LAN and rotate the token from ⚙ Settings if it leaks. No TLS (out of scope). cc-autoresume never stores or transmits your Claude credentials; it only shells out to the claude CLI you already use.
Limitations
macOS-first — uses LaunchAgent + pmset + osascript notifications. Linux would need systemd + rtcwake + notify-send.
Waking a sleeping Mac at the exact reset time needs the optional sudoers entry; otherwise the resume fires on the next wake.
The official Claude usage % is server-side, so the dashboard shows locally-derived stats (limit hits, auto-resumes, active sessions), not the exact remaining percentage.
Development
cargo test # unit + integration tests
cargo clippy --all-targets # lints
cargo build --release # static binary at target/release/cc-autoresumeThe dashboard is a single src/web/index.html (vanilla JS, no build step) embedded into the binary at compile time via include_str!.

Auto-resume Claude Code when your usage limit resets — single static R

One Key. Every LLMs. Ship Faster. Claude Code Ready.

Hệ sinh thái để khám phá, phát triển và thương mại hóa các extension

UI/Web Feedback for Claude Code, Codex, Cursor and any Coding Agents
Biến mọi website thành file ZIP chỉ với 1 click 🔥

Claude awake while you're away

Dashboard cho Claude Code xem token, session, chí phí ước tính
No reviews yet
Cách bạn mô tả vấn đề thực tế là rất thuyết phục: Claude Code dừng giữa chừng vào lúc 2 sáng và ngủ yên cho đến sáng. Sản phẩm giải quyết chính xác điều đó bằng Rust binary tĩnh, không phức tạp như Python venv. Dashboard theo dõi thời gian thực và điều khiển qua QR code cũng là ý tưởng tốt. Để mô tả hoàn hảo hơn, bạn có thể thêm một ví dụ thực tế: "Sau khi cài đặt, bạn gắn một mô tả resume cụ thể cho mỗi session, rồi tắt máy đi ngủ. Công cụ sẽ tự đợi quota reset rồi tiếp tục tự động, không cần sự can thiệp." Điều này giúp người mới dễ hình dung workflow hơn. Sản phẩm của bạn có tiềm năng. Hãy cân nhắc viết một bài blog ngắn về trường hợp sử dụng điển hình (chạy script phân tích dữ liệu, tổng hợp tài liệu) để giúp người dùng tiềm năng thấy được giá trị.
No talks yet
Create the first talk
Reviews & comments