Use case
Keep your computer awake while an AI agent or long build runs
If your agent or build runs in a terminal, the simplest fix is the operating system's own: caffeinate -i on a Mac, or PowerToys Awake on Windows. AwakeTab helps when you also want to watch progress. In Chrome or Edge, a visible AwakeTab tab keeps the display on, and while the display is on, neither Windows nor macOS idle-sleeps.
Try it
Start a session, switch tabs, then come back and watch the pill.
On this page
Set up a visible monitor for a long run
- Start the agent or build.Run Claude Code, Codex or your build as usual, with the laptop plugged in.
- Open AwakeTab in its own small window.Choose ∞, or "Until…" with a time such as 7:00 AM tomorrow. Pick Minimal mode, a dim screen with the elapsed time.
- Place it beside your terminal.It can sit unfocused; it only has to stay uncovered.
What to expect during the run
A web page can only ask for the screen to stay on, through the Screen Wake Lock API. What that does for the rest of the machine depends on the system:
- Windows: Chrome and Edge ask Windows to keep the display on, and while it is on, Windows doesn’t idle-sleep. Keep the screen on in Windows 11 has the settings.
- macOS: Chrome holds a “no display sleep” power assertion, so the Mac does not idle-sleep. The Mac page has the details.
- Linux: the browser asks your desktop over D-Bus, and some desktops honour it better than others.
This lasts only while the tab is visible.
The pill at the top of the tool tells you what the browser is doing:
- Screen awake
- The display stays on, so the computer does not idle-sleep.
- Paused — tab hidden
- The window is minimised or covered, so the normal sleep timer runs again. Uncover it and AwakeTab asks again.
- Blocked — here's the fix
- The browser said no. Chrome and Edge have no battery check, but Firefox refuses at 5% battery or less while not charging. The card names the fix.
Pick the tool for the job
| Your situation | Best fit | Why |
|---|---|---|
| Claude Code, Codex or a build in a Mac terminal | caffeinate -i in front of the command | Holds off idle sleep until the command exits, then lets go |
| The same job on Windows | PowerToys Awake | Keeps the PC awake; the display turns off unless you switch on “Keep screen on” |
| You want to watch the run | A visible AwakeTab tab | The screen stays lit for a glance at progress |
| Overnight, tab hidden, Chrome or Edge | AwakeTab for Chrome, System level | Keeps the computer awake with the tab hidden; the screen may dim or lock |
On a Mac, that looks like caffeinate -i codex or caffeinate -i npm run build. Microsoft documents PowerToys Awake on Microsoft Learn (checked 26 September 2026); our PowerToys Awake comparison sets the two side by side.
Check that it’s working
On a Mac, run pmset -g assertions in Terminal and look for a PreventUserIdleDisplaySleep or NoDisplaySleep line from your browser. On Windows, run powercfg /requests in Terminal as administrator; the browser should be listed under DISPLAY.
The lid, and other walls a tab can’t climb
Closing a laptop lid sleeps it, whatever any tab or command asks. The one exception is a Mac running closed with its charger and an external monitor connected (clamshell mode); our guide to Mac sleep with the lid closed explains the trade-offs. For a remote machine you reach over SSH, set sleep on that machine, not in your local browser.
Before a long run
0 of 4 checkedQuestions
What is the exact command to keep a Mac awake for one Claude Code session?
Run caffeinate -i claude instead of claude. The Mac will not idle-sleep until you quit Claude Code; the display can still turn off. Use caffeinate -di claude if you also want the screen to stay lit so you can glance at it. The same pattern works for codex or any build command.
Does the terminal window have to stay in front?
No. caffeinate and PowerToys Awake work whatever window is in front, even with the screen off. With the web page, the AwakeTab window is the one that must stay uncovered; the terminal can sit behind other windows.
Is the extension’s System level better than the web page for an overnight job?
Usually, yes. It keeps the computer awake with the tab hidden or the window minimised, and the popup shows “System awake”. The screen may still dim or lock, which suits a night run. Chrome or Edge must stay open.
Can AwakeTab stop a browser-based agent from timing out?
No. It keeps the display on and nothing else. A site that signs you out when idle, or a browser that slows a hidden agent tab, is outside its reach. Keep the agent’s tab visible, or run the agent from a terminal.