ShellRS
ShellRS is a free, open-source SSH client written in Rust: host management, terminals, WinSCP-style SFTP and port forwarding in one GPU-rendered window, for macOS, Windows and Linux.
Your Claude Code session sees the 5-hour limit coming, checkpoints its work, and resumes itself when the window resets. Hook-based, stdlib-only, macOS/Linux/Windows.
Developer toolsGitHub @asiagenawiSelf-installOwner unconfirmed
Paste into Claude or ChatGPT for installation instructions suited to your environment.
Have you tried it? One tap is enough. No sign-in needed.
Repository information has not been collected yet.
No updates detected yet. GitHub releases will appear here.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Your Claude Code session sees the usage limit coming, saves its work, and resumes itself when the window resets. You do nothing.
(Demo below is an illustrative mock-up of a real cycle the tool ran.)
You kick off a long Claude Code automation — a big refactor, a batch migration, an overnight research run. You check back three hours later and find it died 40 minutes in:
You've hit your session limit · resets 3:00am
Everything since the last commit is in limbo. The context that session had built up is sitting frozen mid-thought. And the limit reset hours ago — the session just had no way to know, no way to save itself, and no way to come back. Your subscription's 5-hour window reset while your automation sat dead in a terminal.
A session that's about to hit the limit still has tokens left. That's enough budget to do something smarter than die:
/usage screen shows.If the estimate is ever wrong and a session hard-hits the wall anyway, a background watcher catches that too: after the reset it reopens the session in a visible terminal window with the "continue from your checkpoint" prompt already submitted. If the original window is still open, you get a notification instead — it will never fork a live session.
| warns before the limit | session saves its work | resumes automatically | needs tmux | |
|---|---|---|---|---|
| claude-powernap | ✅ | ✅ | ✅ same session | no |
| usage monitors (ccusage, claude-monitor) | ⚠️ warns you, not the session | ❌ | ❌ | — |
| auto-retriers (unsnooze, claude-auto-retry, …) | ❌ reacts after death | ❌ dies mid-thought | ✅ | mostly yes |
Free, privacy-first, local-only, no dependencies (Python 3 stdlib only). macOS, Linux (incl. WSL), native Windows (experimental).
As a Claude Code plugin (inside any Claude Code session):
/plugin marketplace add asiagenawi/claude-powernap
/plugin install powernap@claude-powernap
The plugin activates the monitoring hooks immediately. The one thing a
plugin can't do itself is register the fallback watcher (an OS-level
background job) — so on first run the hook notices it's missing and has the
session offer you the one command to set it up (or run /powernap:watcher
yourself anytime). Also ships /powernap:status, /powernap:on, and
/powernap:off.
If the /powernap:* commands don't appear after installing: restart the
Claude Code session (plugin commands register at session start), and if the
interactive install didn't take, run
claude plugin install powernap@claude-powernap from a terminal instead.
From PyPI (all platforms):
uvx claude-powernap setup # or: pipx install claude-powernap && claude-powernap setup
Or from a clone, if you'd rather read what you run first:
git clone https://github.com/asiagenawi/claude-powernap.git && cd claude-powernap
./install.sh # macOS / Linux / WSL — same as `claude-powernap setup`
Native Windows clone (PowerShell 7 recommended): .\install.ps1
Pick ONE install method — plugin or pip/clone. (Both at once is harmless — the shared state throttle makes duplicate checks no-ops — but pointless.)
That's the whole setup. Every Claude Code session on the machine is covered — no per-project config, no special launcher, no flags to remember. Start your long automations exactly the way you already do.
Setup is deliberately boring and inspectable: it copies a few Python files
to ~/.claude/claude-powernap/, merges three hook entries into
~/.claude/settings.json (backing it up first), and schedules the fallback
watcher (launchd / systemd user timer / Task Scheduler).
claude-powernap remove (or ./uninstall.sh) reverses all of it. If you
set CLAUDE_CONFIG_DIR, setup follows it — run setup from a normal shell,
not from inside a Claude Code session, so the right settings file is edited.
On macOS the first usage check may trigger one Keychain prompt — the monitor reads Claude Code's own OAuth token to ask Anthropic for your real usage numbers (see Caveats). Click "Always Allow".
claude-powernap on # enable everything
claude-powernap off # disable everything
claude-powernap status # current 5h + weekly usage, watcher state
claude-powernap log # what the watcher and monitor have been doing
~/.claude/claude-powernap/config.json| key | default | meaning |
|---|---|---|
enabled | true | master switch (what on/off flips) |
threshold_pct | 90 | warn/pause threshold for the 5h window |
check_interval_s | 120 | base seconds between checks (auto-tightens to 30s above 80%, every event above 90%) |
safety_margin_min | 9 | also warn when the current burn rate projects the limit within this many minutes |
weekly_guard | false | opt-in: also warn/pause on the weekly window (no auto-resume — its reset is days away) |
weekly_threshold_pct | 90 | weekly-guard warning threshold |
endpoint_enabled | true | false = fully local estimation only |
endpoint_failure_grace_min | 15 | for this long after a good endpoint reading, a failed read (e.g. HTTP 429) is skipped instead of switching to local estimation, as long as that reading's trend is clear of the warning triggers; 0 = switch at once |
terminal_app | Terminal | macOS: Terminal/iTerm2; Linux: terminal binary name (auto-detected if unset) |
resume_grace_min | 3 | schedule resume this long after reset |
headless_resume_extra_args | [] | extra flags for last-resort headless resume |
local_budget_weighted_tokens | null | manual budget for local estimation |
token_weights | in/out/cache | per-token-type weights for local estimation |
claude-powernap works with the usage limit, not around it:
/usage screen makes, and endpoint_enabled: false turns
even that off./usage uses (read-only, via the OAuth token already on
your machine; a ToS gray area). Handled: if the endpoint fails or
you set endpoint_enabled: false, the tool switches automatically to
local transcript estimation, self-calibrated whenever endpoint data was
available. A brief failure right after a good reading (a 429 when
several tools poll the endpoint) only skips that check while the last
reading's trend is clear of the warning triggers; otherwise, or after
endpoint_failure_grace_min, it switches../install.sh inside WSL.caffeinate -is on macOS.loginctl enable-linger $USER keeps the
watcher running while logged out.By install method:
| installed via | uninstall with |
|---|---|
| plugin | run python3 ~/.claude/claude-powernap/cli.py watcher-remove (if you set up the watcher), then /plugin uninstall powernap |
| PyPI | claude-powernap remove (add --purge to delete config/state too), then pip uninstall claude-powernap — in that order |
| clone | ./uninstall.sh (or --purge); Windows: .\uninstall.ps1 (or -Purge) |
MIT