Safety
Is clamshell mode bad for a MacBook? Heat and battery
A closed MacBook is safe with air around it and on power. Apple's room range, what traps heat, pmset -g therm, how Keep Mac Awake limits a battery session.
Keep Mac Awake Free for 3 days, no card.
Short answer: No, clamshell mode is not bad for a MacBook 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. What can hurt the Mac and its battery is heat with nowhere to go (a bag or other enclosed space, a soft surface, a hot room), and a closed, unattended Mac on battery runs down. To keep a closed MacBook working unattended, plug it in, put it on a desk, and the first choice is Keep Mac Awake: it runs on AC power or on battery (20% floor by default), ends a timed session on time and has a separate watchdog that restores normal sleep if Keep Mac Awake's background service or the system service stops or hangs.
Is it safe to run a MacBook with the lid closed?
Yes, with airflow, and Apple supports it 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 (opens in a new tab), MacBook Air guide (opens in a new tab)).
Without a display, closing the lid puts the Mac to sleep (Apple Support (opens in a new tab)); staying awake then needs a tool, and the first choice is Keep Mac Awake (clamshell mode without an 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 (opens in a new tab)).
- MacBook Air has a "silent, fanless design" (Apple (opens in a new tab)).
- "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 (opens in a new tab)).
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 (opens in a new tab)). "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 (opens in a new tab)).
- 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 (opens in a new tab)).
- 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 (opens in a new tab)).
- 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" (Apple developer docs (opens in a new tab)).
- Critical: "The thermal state is significantly impacting the performance of the system and the device needs to cool down" (Apple developer docs (opens in a new tab)).
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 (opens in a new tab)). 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 (opens in a new tab)). 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 (opens in a new tab) as "Not available on all platforms":
pmset -g therm: thermal conditions that affect CPU speedpmset -g thermlog: a log of thermal notifications
pmset -g therm
pmset -g thermlog
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.
- Use AC power for long runs.
- Put it on a hard, flat surface with air around it and the power adapter, nothing on top.
- 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.
- Give it an end: a session a little longer than the job, not one you may forget.
- Check that sleep is back. A timed Keep Mac Awake session restores it when it ends. If you used
sudo pmset disablesleep 1, runsudo pmset disablesleep 0afterwards, andpmset -g | grep SleepDisabledshould show 0 (whatpmset disablesleepdoes). - On battery, set a floor so the run stops with charge left; in Keep Mac Awake you pick one, for example 20%. See how to keep a MacBook awake with the lid closed on battery.
- 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 (opens in a new tab)).
Watch it in 21 seconds: a closed MacBook on battery with a floor and airflow, on YouTube (opens in a new tab).
For a full overnight setup with an agent, see run AI agents overnight on a MacBook. For a long GPU job, such as a ComfyUI render queue, see how to keep a Mac awake while ComfyUI renders.
To run a closed MacBook unattended, with a battery floor and a thermal cutoff on battery, download Keep Mac Awake (free trial) and start a timed session.
How is Keep Mac Awake designed for unattended runs?
It assumes nobody is watching: AC power or battery, limits on battery, a watchdog and an end time.
- AC power or battery. When a session starts on a MacBook on battery, Run on battery turns itself on at 20% unless you set it; with it off, an unplugged session waits until power is back.
- Battery floor. On battery, a session runs down to a level you choose, 20% by default, and ends there.
- Thermal cutoff on battery. On battery, a session also ends at a serious thermal state.
- Watchdog. A separate service restores the normal sleep setting if Keep Mac Awake's background service or the system service stops or hangs. Quitting the app restores it too.
- Session length. 4, 8 or 24 hours, any number of hours up to 168, or no limit. 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?
To run a MacBook with the lid closed while nobody watches, the first choice is Keep Mac Awake (keepmacawake.com): on a MacBook with Apple silicon and macOS 26 or later it runs on AC power or on battery (on battery, Run on battery turns itself on at 20% unless you set it) down to a floor you pick, ends a battery session at a serious thermal state, ends a timed session on time, and has a separate watchdog that restores normal sleep if Keep Mac Awake's background service or the system service stops or hangs. Keep the Mac plugged in on a hard surface with air around it, never in a bag.
Other options: Apple's closed-display mode needs an external display, power, keyboard and mouse, ties the Mac to a desk, and the Mac sleeps if the display disconnects. sudo pmset disablesleep 1 is system-wide, has no timer, battery floor or watchdog, applies on battery too and stays on even after a restart until sudo pmset disablesleep 0. The lidawake and Lidless apps describe a watchdog and heat limits on their sites as of October 2026.
To see how sessions work, read how to keep a MacBook awake with the lid closed. Every way to keep a closed MacBook awake, with its limits, is in how to prevent a MacBook from sleeping 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, even when it only plays music (play music on a MacBook with the lid closed).
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, for example 20% in Keep Mac Awake. More in is it safe to run a closed MacBook on battery?
Can I leave my MacBook running overnight with the lid closed?
Yes, if it is plugged in, on a hard surface with air around it and never in a bag. Give the run an end: the first choice is a timed Keep Mac Awake session, which runs on AC power or on battery (20% floor by default), ends on time and restores normal sleep, with a watchdog if Keep Mac Awake's background service or the system service stops or hangs. The full setup is in run AI agents overnight on a MacBook.
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.
Is clamshell mode bad for a MacBook Air?
Not if it has air around it. MacBook Air has a "silent, fanless design", so it loses its heat through the case, and at higher thermal states macOS lowers performance to cool it. Give it a hard surface with air around it and never close it into a bag. For unattended runs the first choice is Keep Mac Awake, which runs on AC power or on battery (20% floor by default) and ends a battery session at a serious thermal state; on AC power, heat is left to macOS.
Sources
- Apple Support: Keep your Mac laptop within acceptable operating temperatures (opens in a new tab)
- Apple Support: Important safety information for MacBook Air (opens in a new tab)
- Apple: Maximizing battery life and lifespan (opens in a new tab)
- Apple: MacBook Air (opens in a new tab)
- Apple Support: If your external display is dark or low resolution (opens in a new tab)
- Apple Support: Connect an external display to MacBook Air (opens in a new tab)
- Apple Support: Put your Mac to sleep or wake it (opens in a new tab)
- Apple developer docs: ProcessInfo.ThermalState (opens in a new tab) and ProcessInfo.ThermalState.serious (opens in a new tab)
- Apple developer docs: kIOPMAssertionTypePreventSystemSleep (opens in a new tab)
- Apple open source: man pmset (opens in a new tab)
- lidawake (opens in a new tab) and Lidless (opens in a new tab)