Keep Your Computer Awake for Claude, ChatGPT and Long Tasks
A browser tab can keep the screen on while it stays visible, which helps if you are watching a long task. It cannot stop the system sleeping in the background, so local agents and big downloads need an OS tool such as PowerToys Awake on Windows.

Two different jobs
Screen on: useful if you read or supervise output. The browser tool does this while its tab is visible.
System awake: needed for a local script, agent or download that runs without you watching. That is the system’s job, not a web page’s.
What to use
- Web chat on a laptop you are watching: the browser tool, with the tab in view.
- Windows with a long local task: PowerToys Awake. Microsoft says it keeps the PC awake by telling Windows a task needs a particular state, with modes for indefinite, timed or expiring use, without changing the power plan.
- Mac: Apple’s sleep settings page documents a Battery > Options setting to prevent automatic sleeping on the power adapter when the display is off, and the same on Energy for desktops.
Practical tips
Plug in, disable lid-close sleep only if you understand the heat and battery cost, and check task logs rather than assuming it finished.
Which tool for which job
| Job | Needs | Use |
|---|---|---|
| Reading a long answer in ChatGPT or Claude on the web | Screen on | The browser tool, tab in view |
| A coding agent or script running in a terminal | System awake | PowerToys Awake (Windows) or caffeinate -i (Mac) |
| A model download or training run overnight | System awake, screen can be off | OS sleep timer set to Never while plugged in |
| Watching a remote session or dashboard | Screen on and system awake | OS timers, or Awake with “Keep screen on” |
Why the web chat keeps working but your local agent stops
A cloud chat runs on the provider’s servers, so the answer keeps generating even if your laptop sleeps. You just see it when you come back. A local agent, a script in a terminal or a big download runs on your own machine, and sleep pauses it. That is why “keep the screen on” and “keep the computer awake” need different tools.
A safe setup for long runs
- Plug in, because battery saver modes shorten timers and limit background work.
- Keep the system awake with an OS tool and let the screen turn off, which saves power and avoids burn-in.
- Lock the computer when you step away. Locking does not sleep it, and the task keeps running.
- Write output to a log file so you can check what happened, rather than relying on the screen.
- Turn the keep-awake tool off when the job ends.
On a Mac
caffeinate is built into macOS. Run your command through it, for example caffeinate -i python train.py, and the Mac stays awake only for as long as that command runs. That is tidier than changing system settings and forgetting to change them back.
Frequently asked questions
Will a sleeping computer stop a web chatbot reply?
It can, because a sleeping device may drop the network connection or pause the tab. Keeping the screen on and the tab visible lowers that risk.
Does this help a local coding agent in a terminal?
Not directly. A terminal job needs the system itself to stay awake. Use an OS-level option such as PowerToys Awake on Windows.
Can the website run in a background tab?
No. The wake lock is released when the tab is hidden.
Sources
Written by Maurice Rana. Last verified against the sources above.