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.
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
Questions
Soubhik Biswas · Builds AwakeTab. Sources checked Saturday, 26 September 2026. About AwakeTab