Keeps Windows awake while Claude Code is working, using the native SetThreadExecutionState API. No Electron, no tray icon, no npx cold-starts.
A Claude Code plugin that keeps Windows awake while Claude Code is actively working — and lets the PC sleep normally when it isn't.
Unlike cc-caffeine, this plugin uses the native SetThreadExecutionState API directly via PowerShell. There is no Electron tray icon, no npx cold-start on every tool call, and no background server that can fail to boot.
tickle.ps1 — on every UserPromptSubmit and PreToolUse hook, writes now + 10min to ~/.claude/cc-stay-awake/deadline.txt and spawns the supervisor if it isn't already running.supervisor.ps1 — a hidden PowerShell process that acquires ES_CONTINUOUS | ES_SYSTEM_REQUIRED and holds it. Every 10 seconds it re-reads the deadline file; when the deadline has passed (or the file disappears) it releases the lock and exits.release.ps1 — on SessionEnd, deletes the deadline file so the supervisor exits on its next poll.Net effect: Claude working → Windows stays up. Claude idle > 10 minutes → Windows can sleep. You close Claude Code → Windows can sleep within 10 seconds.
Monitor sleep is not prevented (we don't pass ES_DISPLAY_REQUIRED), so the screen can still turn off while the box stays on. That makes this safe for remote-control and phone-driven workflows.
SetThreadExecutionState API). macOS and Linux support are not currently included./plugin marketplace add FixerOfTheNorth/cc-stay-awake
/plugin install cc-stay-awake@fixer-of-the-north
Then restart Claude Code so the hooks register.
When a new version is published:
/plugin marketplace update fixer-of-the-north
/plugin update cc-stay-awake@fixer-of-the-north
/plugin uninstall cc-stay-awake@fixer-of-the-north
/plugin marketplace remove fixer-of-the-north
Runtime state at ~/.claude/cc-stay-awake/ (deadline.txt, supervisor.pid) is left in place on uninstall. Delete the directory manually if you want a clean slate.
The idle threshold is defined by $minutesAhead = 10 at the top of scripts/tickle.ps1. Edit it if you want a shorter or longer window between tool calls before sleep is allowed. (A proper plugin-config mechanism will come later.)
Verify the supervisor is holding the lock. From an elevated PowerShell:
powercfg /requests
You should see a SYSTEM entry pointing at a powershell.exe process while Claude Code is active.
Logs. The scripts are silent by design. If you want to debug, run scripts/supervisor.ps1 directly in a PowerShell window — it will print any errors to the console.
Matches all tools
Hooks run on every tool call, not just specific ones
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub fixerofthenorth/cc-stay-awake --plugin cc-stay-awakeClaude harness - A harness for solo developers (Vibecoders) to handle full-cycle contract development.
Core skills library for Claude Code: TDD, debugging, collaboration patterns, and proven techniques
Harness-native ECC operator layer - 67 agents, 271 skills, 92 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses
Plugin-safe Claude Code distribution of Antigravity Awesome Skills with 1,561 supported skills.
Superpowers Plus core skills library for Claude Code: planning, execution routing, TDD, debugging, and collaboration workflows