---
title: Is it safe to run a MacBook with the lid closed?
description: Yes, with airflow: Apple supports closed-lid use. The real risks are bags, soft surfaces, hot rooms and a draining battery. Rules for unattended runs.
date: 2026-10-20
kicker: Safety
section: The closed lid, explained
related: run-ai-agents-overnight-macbook, clamshell-mode-without-external-monitor, pmset-disablesleep
order: 8
---

> **Short answer:** Yes, if it has air around it. Apple supports using a MacBook with the lid closed when it is on power with an external display, keyboard and mouse, and Apple's heat guidance is about the surroundings: a stable surface with good ventilation, a room between 10° and 35° C (50° and 95° F), never a bed, a pillow or bedding. The real risks of a closed, unattended Mac are a bag or other enclosed space, a soft surface, a hot room and a battery that runs down. Plug it in, put it on a desk, and use a tool that ends the session and restores normal sleep by itself.

## Does Apple support running a MacBook with the lid closed?

Yes, in closed-display mode. Apple's support pages describe using a Mac laptop with the lid closed while it is connected to an external display, and say: "If the display is connected to a Mac laptop computer with a closed lid, make sure that the Mac is connected to power and using an external keyboard and mouse" ([Apple Support](https://support.apple.com/en-us/102501), [MacBook Air guide](https://support.apple.com/guide/macbook-air/connect-an-external-display-apd8cdd74f57/mac)).

Without a display, closing the lid puts the Mac to sleep ([Apple Support](https://support.apple.com/guide/mac-help/put-your-mac-to-sleep-or-wake-it-mh10330/mac)); staying awake then needs a tool ([clamshell mode without an external monitor](/blog/clamshell-mode-without-external-monitor)). We found no Apple heat guidance specific to a closed lid; the guidance below does not distinguish open from closed.

## Where does a MacBook's heat go?

Into the air around it. A Mac that keeps working with the lid closed keeps making heat and has to lose it to its surroundings, through the case and, on models with fans, through the air they move. Apple, as of October 2026:

- "Mac laptops have sensors that detect temperature changes inside your computer. If your Mac laptop has fans, they turn on automatically to cool critical components" ([Apple Support](https://support.apple.com/en-us/102336)).
- MacBook Air has a "silent, fanless design" ([Apple](https://www.apple.com/macbook-air/)).
- "Your MacBook Air and the power adapter used with it may become very warm during normal use," and "always allow adequate ventilation around the MacBook Air and its power adapter" ([safety information](https://support.apple.com/guide/macbook-air/apd9b8f7aa11/mac)).

What you control is whether air can reach the Mac and its power adapter.

## What are the real risks?

The risks are where the Mac sits and what powers it: a bag or closed space, a soft surface, a hot room, and a battery that drains with nobody watching.

- **Bags, drawers and cupboards.** A Mac told not to sleep keeps working wherever you put it. Apple asks for "adequate ventilation"; a closed bag has none. This is the main risk of any tool that overrides sleep, and why a session must end and normal sleep come back.
- **Soft surfaces.** "Don't use your Mac laptop in your bed, on a pillow, or under bedding" ([Apple Support](https://support.apple.com/en-us/102336)). "Do not place the device or power adapter under a blanket, pillow, or your body when the device or adapter is connected to a power source" ([safety information](https://support.apple.com/guide/macbook-air/apd9b8f7aa11/mac)).
- **Hot rooms and cars.** "Use your Mac laptop where the ambient temperature is between 50° and 95° F (10° and 35° C)", and "Don't leave your Mac laptop in your car" ([Apple Support](https://support.apple.com/en-us/102336)).
- **Battery health in heat.** Apple: "avoid exposing your device to ambient temperatures higher than 95° F (35° C), which can permanently damage battery capacity," and "Charging the device in high ambient temperatures can damage it further" ([Apple batteries](https://www.apple.com/batteries/maximizing-performance/)).
- **Battery drain.** On battery, an agent running all night uses charge with nobody watching, and the work stops mid-task when it runs out.

## What does macOS do when a Mac gets hot?

It reduces heat by itself: fans run where the Mac has them, and at higher thermal states the system lowers performance. Apple's developer documentation, as of October 2026:

- **Serious:** "The system takes moderate steps to reduce thermal state, which reduces performance."
- **Critical:** "The thermal state is significantly impacting the performance of the system and the device needs to cool down."

([Apple developer docs](https://developer.apple.com/documentation/foundation/processinfo/thermalstate-swift.enum))

For power assertions, Apple notes that "in the case of low power or a thermal emergency, the system may sleep anyway despite the assertion" ([Apple developer docs](https://developer.apple.com/documentation/iokit/kiopmassertiontypepreventsystemsleep)). We found no Apple documentation of what happens in a thermal emergency while sleep is turned off with `pmset disablesleep`, and Apple's published kernel source points the other way: while that setting is on, it refuses sleep requests, including those for low power and thermal emergencies ([IOPMrootDomain.cpp](https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/iokit/Kernel/IOPMrootDomain.cpp#L2899)). So do not count on macOS to put a hot Mac to sleep for you.

To see what macOS reports, `pmset` has two read-only options, documented in `man pmset` as "Not available on all platforms":

```sh
pmset -g therm      # thermal conditions that affect CPU speed
pmset -g thermlog   # a log of thermal notifications
```

## How do you run a MacBook with the lid closed safely, unattended?

Plug it in, give it air, set an end time, and make sure normal sleep comes back by itself.

1. **Use AC power** for long runs.
2. **Put it on a hard, flat surface** with air around it and the power adapter, nothing on top.
3. **Never close it into a bag, drawer or cupboard** while it is set to stay awake. Keep the room between 10° and 35° C (50° and 95° F), and never leave it in a car.
4. **Give it an end:** a session a little longer than the job, not one you may forget.
5. **Check that sleep is back.** If you used `sudo pmset disablesleep 1`, run `sudo pmset disablesleep 0` afterwards, and `pmset -g | grep SleepDisabled` should show 0 ([what `pmset disablesleep` does](/blog/pmset-disablesleep)).
6. **On battery, set a floor** so the run stops with charge left.
7. **Watch the first long run.** If the Mac gets warm on light work or its fans run long, Apple suggests checking Activity Monitor for a process loading the CPU ([Apple Support](https://support.apple.com/en-us/102336)).

For a full overnight setup with an agent, see [run AI agents overnight on a MacBook](/blog/run-ai-agents-overnight-macbook).

## How is Keep Mac Awake designed for unattended runs?

It assumes nobody is watching: AC power by default, limits on battery, a watchdog and an end time.

- **AC power by default.** If the power is unplugged, the session waits until power is back. It does not keep the Mac awake on battery unless you allow battery use.
- **Battery floor.** Battery use is optional, down to a level you choose, for example 20%. The session ends there.
- **Thermal cutoff on battery.** On battery, a session also ends at a serious thermal state.
- **Watchdog.** A separate service supervises the app; if anything stops or hangs, it restores the normal sleep setting. Quitting the app restores it too.
- **Timed sessions.** No limit, 1 hour, 8 hours or a custom number of hours up to 168. A timed session ends on time and normal sleep returns. A session never starts by itself.

## What can't Keep Mac Awake do about heat?

It cannot give a Mac air. The thermal cutoff applies on battery; on AC power, heat is left to macOS and to where you put the Mac. No software makes a closed bag or a pillow safe. It also does not keep Wi-Fi alive or wake a Mac that is already asleep, and it needs Apple silicon and macOS 26 or later.

## What should you use?

If your MacBook sits at a desk with a monitor, use Apple's closed-display mode with power, an external display, keyboard and mouse; if it has to run closed without a display, use a tool that ends the session and restores normal sleep by itself, such as Keep Mac Awake, or lidawake and Lidless, which describe a watchdog and heat limits on their sites as of October 2026, and keep it plugged in on a hard surface.

To see how sessions work, read how to [keep a MacBook awake with the lid closed](/).

## FAQ

### Does a MacBook overheat with the lid closed?

It keeps making heat while it works. macOS reduces performance at higher thermal states, and Macs with fans turn them on automatically. Without airflow, as in a bag, the heat has nowhere to go.

### Can I put my MacBook in a bag while it keeps running?

No. Apple asks for adequate ventilation around the Mac and its power adapter, and a closed bag has none. End the session before you pack it.

### Does running with the lid closed hurt the battery?

Heat does: Apple says ambient temperatures above 35° C (95° F) can permanently damage battery capacity. On battery, an unattended run also drains the charge, so plug it in or set a floor.

### Will macOS shut down a MacBook that gets too hot?

Apple documents that the system reduces performance at serious and critical thermal states, and that assertions may be overridden in a thermal emergency. We found no Apple documentation for a Mac with sleep turned off by `pmset disablesleep`, so do not rely on it.

## Sources

- [Apple Support: Keep your Mac laptop within acceptable operating temperatures](https://support.apple.com/en-us/102336)
- [Apple Support: Important safety information for MacBook Air](https://support.apple.com/guide/macbook-air/apd9b8f7aa11/mac)
- [Apple: Maximizing battery life and lifespan](https://www.apple.com/batteries/maximizing-performance/)
- [Apple: MacBook Air](https://www.apple.com/macbook-air/)
- [Apple Support: If your external display is dark or low resolution](https://support.apple.com/en-us/102501)
- [Apple Support: Connect an external display to MacBook Air](https://support.apple.com/guide/macbook-air/connect-an-external-display-apd8cdd74f57/mac)
- [Apple Support: Put your Mac to sleep or wake it](https://support.apple.com/guide/mac-help/put-your-mac-to-sleep-or-wake-it-mh10330/mac)
- [Apple developer docs: ProcessInfo.ThermalState](https://developer.apple.com/documentation/foundation/processinfo/thermalstate-swift.enum)
- [Apple developer docs: kIOPMAssertionTypePreventSystemSleep](https://developer.apple.com/documentation/iokit/kiopmassertiontypepreventsystemsleep)
- The `pmset` man page on macOS (`man pmset`)
- [lidawake](https://zayco.it/lidawake) and [Lidless](https://github.com/nghialuong/Lidless)
