Claude Code & long AI runs
Does Claude Code stop when your laptop sleeps?
Short, honest answer: a locked screen won't stop it — a fully sleeping system will. Those are two different things, and this tool only controls one of them. Here's exactly what's going on.
Pick a duration and hit start.
Duration
Screen lock vs. system sleep — the actual distinction
Claude Code runs as a local process in your terminal, actually executing on your machine — editing files, running commands, reading output. That process only cares about one thing: is the CPU running?
A locked screen (Win+L, or your laptop auto-locking after a few idle minutes) doesn't pause background processes. Your CPU keeps running, your terminal keeps executing, Claude Code keeps working — with the screen off or locked. This is true with or without this tool.
Full system sleep (suspend) is different — it powers down the CPU itself, and everything running on it pauses, including Claude Code, until you wake the machine back up. This is the thing that actually interrupts a long run.
What this tool does and doesn't cover
This tool uses the browser's Screen Wake Lock API, which — despite the name overlap — only ever controls display sleep/lock, not system sleep. An earlier draft of the underlying spec included a separate "system" wake lock type that would have prevented full CPU suspend, butChrome's own documentation confirms it was dropped — no browser ships it. So no web-based tool, including this one, can directly keep your system from fully sleeping.
What it's genuinely useful for: keeping your display visible and your session looking active while Claude Code runs, so you're not constantly re-unlocking just to glance at progress, and so your machine doesn't look idle/away on a call or to teammates while you're watching a long run.
For the actual guarantee: set your system sleep timer
If you want certainty that a long Claude Code run won't get suspended mid-task, the fix is in your OS's power settings, not a browser tool:
- Windows: Settings → System → Power & sleep → set "Sleep" to Never (at least while plugged in).
- Mac: System Settings → Battery → Options → enable "Prevent automatic sleeping on power adapter when the display is off," or use
caffeinate -sin a second terminal tab for just that run.
Use this tool for the display-lock annoyance, and one of those for the actual sleep guarantee — together they cover the whole problem.