Guide · Clamshell mode

Keep a MacBook awake, lid closed (clamshell mode)

Shut the lid and your MacBook goes to sleep — that is the default, and it is usually what you want. But when a build, a download, or an AI coding agent is still running, closing the lid can stop the work dead. This guide explains why the lid triggers sleep, what real clamshell mode actually requires, and how Perked keeps your Mac awake with the lid closed — without an external display, extra cables, or a risky system-wide override.

What closing the lid actually does

On a MacBook, closing the lid is a hardware signal to sleep. By default macOS suspends the whole system: the CPU idles, the display and keyboard power down, network connections drop, and anything mid-flight is paused until you open the lid again. It does not matter whether a long job is running — the lid switch wins. That is great for battery and for tossing the laptop in a bag, but it is exactly the wrong behavior when you want a task to keep going on your desk.

What true clamshell mode requires

Apple does support running a MacBook with the lid shut — it is called clamshell (or closed-display) mode. But the built-in version has strict conditions. All of these must be true at once:

If you just want an overnight build or an agent run to continue — with nothing plugged in but the charger — the built-in clamshell mode is more setup than the job deserves.

Keep it cool: ventilation and heat

A closed MacBook running under load has less room to shed heat — the lid sits against the keyboard, and a soft surface like a bed or sofa can block the vents. Give it a hard, flat surface with airflow around it, and ideally raise it on a stand so air can move underneath. macOS will throttle the CPU to protect the hardware if it gets too hot, which slows the very job you are trying to finish. Keeping the machine cool is not just about safety; it is about the run actually completing on time.

The manual routes, and their limits

Before reaching for an app, it is worth knowing the built-in options and where they fall short:

Where Perked fits

Perked is a macOS menu-bar app built for exactly this. Its clamshell mode keeps your Mac awake with the lid closed — and, unlike the built-in one, it does not need an external display, keyboard, or mouse. You approve the permission once; after that, closing the lid no longer stops your work.

It is also tied to what you are doing rather than left running forever. Perked auto-detects coding agents like Claude Code and Cursor and stays awake only while they run, it can require AC power or a battery threshold you set, and if it ever quits or crashes with the lid down, your Mac goes back to sleeping normally on its own — so it can never get stuck awake.

It is a one-time purchase from €1 — currently €1, and whatever you pay is locked in for good.

Lid-closed FAQ

Can I keep a MacBook awake with the lid closed and no external monitor?

Not with Apple's built-in clamshell mode, which requires an external display plus a keyboard or mouse. Perked keeps your Mac awake with the lid closed without any external display — you approve a one-time permission and then closing the lid no longer sleeps it.

Is it safe to run my Mac with the lid closed?

Yes, as long as it can breathe. Put it on a hard, flat surface with airflow, avoid soft surfaces that block the vents, and keep it on power for a long run. macOS still throttles the CPU if it gets too hot, so good ventilation also helps the job finish faster.

Does pmset disablesleep keep the lid-closed Mac awake?

It does, but bluntly: pmset disablesleep 1 stops all sleep system-wide until you turn it off, needs an admin password, and can drain the battery or overheat the Mac if you forget it. Perked scopes keep-awake to when an agent is actually running and restores normal sleep on its own.

Will keeping the lid closed drain my battery?

It can, since the Mac stays powered. Perked is power-aware: you can require it to be on AC power, or only stay awake above a battery level you choose, so a lid-closed run never flattens the battery by surprise.

Keep working with the lid closed

One-time purchase, yours forever — €1 today, and your price is locked in for good.

See the full price ladder →

Related guides

Running long agent sessions? Keep your Mac awake for Claude Code & Cursor →

Kicking off runs before bed? Run AI coding agents overnight on a Mac →

← Back to Perked