# Keep Mac Awake: keep your Mac awake with the lid closed, for AI agents

Close the lid, not the work. Your MacBook keeps working with the lid closed, no external display or keyboard needed. Agents keep going, and you steer them from your phone with their own remote control.

- For MacBooks with Apple silicon on macOS 26 or later.
- Free for 3 days, no card. Then 9 USD once, plus tax, for this Mac.
- [Download for Mac](https://keepmacawake.com/download) · [Let your agent set it up](https://keepmacawake.com/agents.md)

## How it works

A MacBook sleeps when you close it, unless a display, a keyboard and power are plugged in. With Keep Mac Awake: lid closed, display dark, still working. During a session it runs on AC power, for the time you chose, with the watchdog on.

Remote control from your phone: away from your desk, still in the loop. The Mac stays shut and safe while the agent works on your files, and you steer it from your phone with your agent's own remote control, such as Claude Code Remote Control or Codex in the ChatGPT app. Keep Mac Awake keeps the Mac awake; it does not provide the remote connection, and it does nothing special for Wi-Fi.

One night, as the remote control shows it on your phone:

| Time | Who | Message |
| --- | --- | --- |
| 23:41 | | You close the lid. The display goes dark. |
| 00:12 | agent | Reading the project |
| 00:30 | you, from your phone | Also cover the parser with tests |
| 00:31 | agent | On it. Adding parser tests. |
| 03:20 | agent | Running the test suite |
| 05:05 | agent | Writing the summary |
| 06:58 | agent | Done. Pull request ready. |
| 07:02 | you | Nice. I'll review it over coffee. |

07:41. Open the lid. The work is done. The session ended on time and normal sleep came back on its own. Nothing to undo.

Made for the jobs you'd rather not watch: AI coding agents, test suites, release builds, renders and exports, big downloads, backups, overnight jobs.

## Your turn: three steps, then walk away

1. **Pick how long.** No limit, 1 hour, 8 hours, or a custom number of hours up to 168, from the panel in the menu bar.
2. **Press the button.** The panel says Awake and how long is left.
3. **Close the lid.** The built-in display goes dark, even if another app asked to keep it on. The Mac keeps working, and a timed session ends on its own.

## For agents: your agent starts it, and stops it

`keepmacawake` answers every call with one line of JSON and a documented exit code. Your agent starts a session for its task, checks on it, and stops it the minute the work is done.

```sh
# 23:41  before the long task
keepmacawake start --hours 8 --json | jq .session.phase
# "active"
# 03:20  lid closed, still working
keepmacawake status --json | jq .session.remaining_seconds
# 15660
# 06:58  pull request ready, so stop now, not at 07:41
keepmacawake stop --json | jq .result
# "ok"
```

Exit codes an agent can branch on: 0 success, 1 the request failed, 2 invalid arguments, 4 needs you (AC power or a purchase), 5 already running or nothing to stop, 6 not installed, 7 no answer in time.

Works with Claude Code, Codex, Gemini CLI, Cursor, OpenCode, Aider and any agent that can run a command. To let your agent set it up, paste this into it: "Read keepmacawake.com/llms.txt and set up Keep Mac Awake for my long tasks."

Rules from the [agent guide](https://keepmacawake.com/agents.md): it starts a session only for a task you asked for, stops it when the task is done, never asks for your password in chat, and never pays. Also: [llms.txt](https://keepmacawake.com/llms.txt), [agent skill](https://keepmacawake.com/skill/keepmacawake/SKILL.md), [command-line reference](https://keepmacawake.com/command-line.md), and [install.sh](https://keepmacawake.com/install.sh), one command to install, update or remove it: `curl -fsSL https://keepmacawake.com/install.sh | sh`.

## What if: careful by default, calm when things break

It changes one system setting for one session, then puts it back. Here's what happens on a bad night.

- **What if the app hangs?** A separate service, the watchdog, supervises the app. If anything stops or hangs, it puts the normal sleep setting back. Quitting the app does too.
- **What if it runs hot?** A battery session ends at a serious thermal state. It can't give a Mac air, though: keep it out of bags and off pillows.
- **What if I unplug it?** Sessions run on AC power by default. Unplug, and the session waits until power is back.
- **What if there's no outlet?** Allow battery and pick a floor, like 20%. The session ends when the battery gets there.
- **What if I forget about it?** A timed session ends on time and normal sleep returns. Nothing starts on its own.

## Compared

We checked 21 established keep-awake apps in October 2026. None had an independent watchdog. None had a thermal cutoff. None had an interface for AI agents. And `caffeinate`, the command built into macOS, does not keep a MacBook awake with the lid closed and no display. Keep Mac Awake has all three.

| | `caffeinate` | 21 established apps | Keep Mac Awake |
| --- | --- | --- | --- |
| Independent watchdog | Nothing to restore | None | Yes |
| Thermal cutoff on battery | No | None | Yes |
| Agent interface | A command, no JSON status | None | JSON, exit codes, Agent Skill |

## Private: no account, no analytics, no logs

The only network request the app makes is Restore purchase, and only when you ask. It never reads your files, your screen or your clipboard. It needs no special permissions: no Accessibility, no Full Disk Access, no changes to SIP, Gatekeeper or FileVault; just your password once, at install, because the sleep setting is system-wide. A native Swift app: no Electron, no web view. Signed and notarized by Apple. [Privacy details](https://keepmacawake.com/privacy.md).

## Price: three days free, then $9 once

No subscription. Pay once for this Mac and keep it.

- **Free trial, 3 days.** Starts with your first session. Sessions up to 8 hours. No card, no account. After 3 days, a running session still finishes.
- **Yours to keep, 9 USD** once, for this Mac, plus tax where it applies. Sessions with no limit, or up to 168 hours. Works offline once bought. Restore purchase after a reinstall.

When you're ready, choose **Buy for $9** in the panel or run `keepmacawake buy`. Stripe handles payment, tax and promotion codes.

## Before you download

### Lid closed, agents and your phone

- **How do I keep my MacBook awake with the lid closed?** Start a session in the menu bar panel or with `keepmacawake start`: no limit, 1 hour, 8 hours or a custom number of hours up to 168. Then close the lid. The display goes dark, the Mac keeps working, and normal sleep returns when the session ends.
- **Can I use clamshell mode without an external monitor?** Yes. A MacBook with Apple silicon keeps running with the lid closed and no display, keyboard or mouse attached. By default a session needs AC power; battery use is optional, down to a level you choose.
- **Will Claude Code keep running if I close my laptop?** Not by default: closing the lid puts the Mac to sleep, and Claude's own Keep computer awake setting does not cover a closed lid. During a Keep Mac Awake session, closing the lid does not stop Claude Code, Codex or any other agent.
- **Can I steer my agent from my phone with the lid closed?** Yes, with your agent's own remote access, such as Claude Code Remote Control, Codex in the ChatGPT app, or SSH. Keep Mac Awake keeps the Mac awake with the lid closed, so the agent keeps running and stays reachable while the Mac's network connection holds. It does not provide the remote connection itself.
- **Does Claude Code Remote Control work with the lid closed?** Remote Control needs your computer on and the claude process running, and a sleeping Mac can't be reached. During a session the Mac stays awake with the lid closed, so you can keep steering from your phone while its network connection holds.
- **Can I use Codex from my phone with the MacBook closed?** Codex runs on your Mac, which has to stay awake and online. With Keep Mac Awake it stays awake with the lid closed and no external display; the connection comes from the ChatGPT app and your network.
- **Why doesn't caffeinate keep my Mac awake with the lid closed?** caffeinate holds sleep assertions, and macOS can still sleep when the lid closes without a display. Keep Mac Awake changes one system sleep setting for one session, then puts it back.
- **Can I keep my MacBook awake with the lid closed on battery?** Yes, if you allow it. Sessions run on AC power by default. On battery, a session ends at the level you choose, like 20%, or at a serious thermal state.
- **Can I SSH into my MacBook with the lid closed?** Yes, with Remote Login turned on and a network you can reach, for example through Tailscale. Keep Mac Awake keeps the Mac awake; it does not set up SSH or the network.
- **Do I need a Mac mini to run AI agents overnight?** Not with a MacBook with Apple silicon: plugged in and in a session, it keeps working with the lid closed. Keep it ventilated, never in a bag or under a pillow.

### Buying, privacy and setup

- **Which Macs does it support?** Macs with Apple silicon and macOS 26 or later. It is checked daily on a MacBook Air M5 and a MacBook Air M1; other Apple silicon Macs with macOS 26 are expected to work.
- **Why does the installer ask for my password?** The sleep setting applies to the whole Mac, so a small system service changes it. Nothing else needs special permission.
- **Will my Mac get hot?** As warm as any Mac doing the same work. Keep it ventilated and off soft surfaces, never in a closed bag or under a pillow. On battery, the session ends at a serious thermal state, but it cannot protect a Mac from a place without airflow.
- **Does it keep Wi-Fi connected?** It keeps the Mac awake; it does nothing special for Wi-Fi or other network connections. It also does not wake a Mac that is already asleep.
- **What happens when the trial ends?** A session that is running continues to its planned end. After that, starting a new session needs a purchase.
- **How does buying work?** Choose Buy for $9 in the panel, or run `keepmacawake buy`. A page with the price opens in your browser, where you can enter a promotion code. Stripe takes care of payment and tax, then the page unlocks the app. There is no key to type.
- **What if I reinstall, or get a new Mac?** On the same Mac, choose Restore purchase. For a new Mac, or after a repair that replaced the logic board, write to hi@keepmacawake.com with your receipt.
- **What does it collect?** Nothing. There are no accounts, analytics or logs. Buy opens the purchase page with an identifier of this Mac, and Restore purchase sends that identifier, only when you choose them.
- **How do I uninstall it?** Open the uninstall package from the same release, or run `curl -fsSL https://keepmacawake.com/install.sh | sh -s -- --uninstall`. It restores the sleep setting, stops the services and removes the app and the command.

## Links

[Download](https://keepmacawake.com/download) · [Releases](https://github.com/bartdudzic/keepmacawake/releases) · [Command line](https://keepmacawake.com/command-line.md) · [For AI agents](https://keepmacawake.com/agents.md) · [Privacy](https://keepmacawake.com/privacy.md) · [Terms](https://github.com/bartdudzic/keepmacawake/blob/main/TERMS.md) · hi@keepmacawake.com

Mac and MacBook are trademarks of Apple Inc. Keep Mac Awake is not affiliated with Apple.
