Battery and heat
Is it safe to keep a MacBook awake for hours?
Yes, if the MacBook sits on a hard, ventilated surface in 10 to 35 °C (50 to 95 °F) air, ideally on power. Staying awake costs battery, and a laptop held awake on battery can run down. Apple's pages never describe running one inside a bag.
On this page
- Does keeping a Mac awake use more power?
- What happens if a MacBook stays awake on battery until it is empty?
- What temperatures and surfaces does Apple allow?
- Is a closed MacBook in a bag safe while it is awake?
- Should you leave a MacBook plugged in while it stays awake?
- What stops a keep-awake session safely?
- How does Napless stop on heat and low battery?

Does keeping a Mac awake use more power?
Yes: Apple’s sleep and wake settings page says “Delaying, preventing, or allowing disruption of sleep may increase power consumption.” A Mac that never sleeps keeps its processor, memory, networking and any running apps powered for the whole session.
In Napless, a heat safety stop can end the hold if the Mac gets too hot, and you can turn on a battery stop. Allow Display to Sleep stays on by default, so the screen can turn off during a long session. Try Napless free for 7 days.
How much more depends on what stays on. Most keep-awake tools can hold two different things:
| What is held | caffeinate flag (man caffeinate) |
What stays powered |
|---|---|---|
| The system only | -i |
The Mac keeps running; the display can still turn off |
| The display too | -d |
The screen stays lit as well |
| The system, on power only | -s |
Valid only when the Mac is on AC power |
For a long job you don’t need to watch, hold the system and let the display sleep. Apple’s power-assertion header (IOPMLib.h in the macOS 27 SDK) says that while a display-sleep assertion is held, “the system cannot go into idle sleep,” so -d already implies -i, plus a lit screen.
To see what a session is costing, open Activity Monitor and click Energy. Apple’s Activity Monitor guide describes the Preventing Sleep column there, which shows whether each app is holding the Mac awake. For the full list of holders from Terminal, see how to read pmset -g assertions.
What happens if a MacBook stays awake on battery until it is empty?
macOS can still sleep the Mac when the battery runs low, but nothing in a basic keep-awake hold stops at a charge level you choose, so the battery drains until the system steps in or the session ends. Apple’s IOPMLib.h header says that while an idle-sleep assertion is held, “The system may still sleep for lid close, Apple menu, low battery, or other sleep reasons.”
caffeinate has no battery threshold. man caffeinate lists -d, -i, -m, -s, -u, -t and -w, and none of them reads the charge. A plain caffeinate -i lasts until you stop it.
Sleep on a MacBook normally protects your open work. man pmset says hibernatemode = 3 is the default on portables: “The system will store a copy of memory to persistent storage (the disk), and will power memory during sleep. The system will wake from memory, unless a power loss forces it to restore from hibernate image.” On our test MacBook Pro (Mac16,5, macOS 27.2), pmset -g reports hibernatemode 3 and standby 1.
macOS writes that hibernate image when the Mac goes to sleep. A Claude Code bug report, issue #85261 (opened August 9, 2026, Claude Code 2.1.226), describes a MacBook on battery whose charge “went 9% → 7% → 6%” while the CLI’s sleep holds stayed alive. The reporter writes that the Mac refused idle sleep until it “hard-powers-off at 0%, losing the session,” because “a machine that never sleeps also never hibernates.” That is one user’s report. We have not run a MacBook to 0 percent to confirm it, and Apple’s header above says low-battery sleep can still happen.
AI coding agents are the common way this happens without anyone noticing. Claude Code CLI 2.1.287 on macOS runs caffeinate -i -t 300 itself while it works, restarts it every 240 seconds, and releases it 30 seconds after it goes idle (read from the installed binary on October 2, 2026). The bug report above says the hold ignores the power source. If you leave an agent running on a MacBook, plug it in, and see keeping a Mac awake for AI coding agents for ways to bound the hold.
To check the charge and the holders while a long job runs:
pmset -g batt
pmset -g assertions
man pmset describes -g batt as the status of batteries and UPSs, and -g assertions as a summary of power assertions that “may prevent system sleep or display sleep.”
What temperatures and surfaces does Apple allow?
Apple says to use a Mac laptop where the ambient temperature is between 10° and 35° C (50° and 95° F), on a stable work surface that allows for good ventilation. Those numbers come from Apple’s page Keep your Mac laptop within acceptable operating temperatures, which also says:
- “Don’t use your Mac laptop in your bed, on a pillow, or under bedding.”
- “If your Mac laptop has ventilation openings, don’t put anything into them.”
- “Don’t put anything over the keyboard.”
Apple’s fans article adds that a hard, flat surface “like a table or desk” gives the best temperature control, and that on “a couch, pillow, bed, or your lap, its fans might run more.” When the room is hot, “the fans turn on sooner and run faster.” Fast fans during a long job are the Mac cooling itself, not a fault.
Heat also matters to the battery. Apple’s battery performance page warns that ambient temperatures above 35° C (95° F) “can permanently damage battery capacity,” and that charging inside certain styles of cases “may generate excess heat.” A MacBook kept awake and charging in a hot room gets both.
| Condition | What Apple says | Source |
|---|---|---|
| Room temperature | 10° to 35° C (50° to 95° F) | 102336 |
| Surface | Stable, well ventilated; hard and flat is best | 102336, 101576 |
| Bed, pillow, bedding | Don’t use the laptop there | 102336 |
| Above 35° C | Can permanently damage battery capacity | Apple batteries |
Is a closed MacBook in a bag safe while it is awake?
A MacBook in a bag should be asleep, and normally it is: closing the lid is one of the ways Apple lists to put a Mac laptop to sleep. The risk starts when something keeps it running with the lid shut, because none of Apple’s pages describe operating a Mac inside a bag.
Apple’s MacBook Pro handling page mentions bags only as a way to carry the computer, with a warning about loose items such as paper clips or coins getting into the vents or ports. Its ventilation rules above assume an open, well-ventilated surface.
An ordinary keep-awake hold does not stop lid sleep. The IOPMLib.h header lists lid close among the reasons the system may still sleep while an idle-sleep assertion is held, so caffeinate -i, or an agent running it, does not keep a closed MacBook awake. What can override lid sleep:
- A closed-display mode in a third-party app. Amphetamine’s App Store listing describes one that can “Keep your MacBook awake while its display/lid is closed.”
- A power setting that
man pmsetdoes not document. If a key isn’t in that man page, leave it alone. - Apple’s own closed-lid desk setup, which needs power and an external display, keyboard and mouse. That is a desk setup, not a bag. See MacBook lid-closed setups.
Before you pack a MacBook after a long job, check that it slept:
- Stop or time out anything holding it awake, then run
pmset -g assertionsand confirm no app still prevents sleep. - Close the lid and wait a few seconds.
- Open it again and run
pmset -g log | grep "Clamshell Sleep". On our test Mac a lid close appears asEntering Sleep state due to 'Clamshell Sleep'with the time it happened. A sleeping MacBook still makes short dark wakes for maintenance (our log shows them on battery), and those are expected; see why a Mac wakes from sleep by itself for how to read them.
Should you leave a MacBook plugged in while it stays awake?
Yes, for any session longer than the battery comfortably lasts. macOS has two features that keep a laptop that lives on the charger from sitting at 100 percent. Both are in System Settings > Battery and described in Apple’s Optimized Battery Charging and Charge Limit article:
- Optimized Battery Charging (macOS Big Sur 11 or later) is “designed to reduce the wear on your battery and improve its lifespan by reducing the time that your Mac spends fully charged.” Apple’s Battery settings page says the Mac “delays charging past 80% when it predicts that you’ll be plugged in for an extended period of time.”
- Charge Limit needs macOS Tahoe 26.4 or later and a Mac with Apple silicon. You choose a limit between 80% and 100%, and Apple’s article says the Mac charges to within a few percentage points of it, then stops.
Apple notes that with either feature the Mac “will occasionally charge to 100% to maintain accurate battery state-of-charge estimates.”
Power also unlocks two keep-awake options. Battery settings include “Prevent automatic sleeping on power adapter when the display is off”, which keeps a plugged-in Mac awake with its screen dark. And caffeinate -s creates a system-sleep assertion that man caffeinate says “is valid only when system is running on AC power.” The caffeinate command guide covers that flag and its limits.
What stops a keep-awake session safely?
A safe session has an end that doesn’t depend on you: a timeout, the end of the job, a heat stop or a battery floor. caffeinate gives you the first two; a heat stop, a battery floor or a Low Power Mode stop needs a tool that watches for them.
| Stop | How to get it | Notes |
|---|---|---|
| Timeout | caffeinate -i -t 3600 (seconds) |
man caffeinate: the assertion is dropped after the timeout |
| Process end | caffeinate -i <command> or -w <pid> |
Ends when the job ends |
| Heat | An app that reads the thermal state | macOS reports nominal, fair, serious or critical |
| Battery floor | An app with a charge threshold | caffeinate has none |
| Low Power Mode | An app that stops when Low Power Mode turns on | Turn it on in System Settings > Battery |
Low Power Mode is Apple’s way to “Reduce energy usage to increase battery life”; you can set it to Always, Only on Battery, or Only on Power Adapter (Save energy on your Mac). Apple’s pages don’t say it ends a keep-awake hold, which is why a Low Power Mode stop has to come from the keep-awake tool. The thermal states come from Apple’s NSProcessInfo.h header: fair is “slightly elevated,” serious is “high,” and critical “is significantly impacting the performance of the system and the device needs to cool down.” An app can read that state and stop holding the Mac awake before it gets there. From Terminal, pmset -g therm “shows thermal conditions that affect CPU speed” (man pmset), and on our test Mac it printed “No thermal warning level has been recorded.”
How does Napless stop on heat and low battery?
Napless stops keeping the Mac awake when its thermal state is serious or critical, and it can stop at a battery level you pick. Both settings are in Settings > General > Safety, as described in Napless safety stops:
- Stop keeping your Mac awake if it gets too hot is on by default. At a serious or critical thermal state, Napless stops, timed keep-awake ends, and the menu says “Stopped because your Mac is too hot.” Automatic keep-awake can start again after the state stays at fair or cooler for 5 minutes (heat protection).
- Stop keeping your Mac awake when battery is low is off by default. Turn it on and choose 10% to 90% under Stop at; Napless Help gives 20% as the default. The menu then says “Stopped: battery low.”
- Stop keeping your Mac awake in Low Power Mode is off by default, under Settings > General > Low Power Mode.
Safety stops notify you even when other Napless notifications are off; the alert is titled “Keep Awake Stopped.” A deliberate stop shows its reason without the orange warning triangle Napless uses for problems. Allow display to sleep is on by default, so Napless holds the system and lets the screen turn off.
On managed Macs, IT can force heat protection on and set the battery floor with a configuration profile; the keys are on Napless for IT. Keep Awake With Lid Closed is coming in an update and will stop on heat, at a battery floor and after a time limit; it isn’t available yet.
A new install of Napless is a 7-day free trial, then Napless Pro. It runs on macOS 13 or later, on Apple silicon and Intel. For the other ways to hold a Mac awake, start with how to keep a Mac awake. For the heat and battery stops, Try Napless free for 7 days.
Questions
Is it bad to keep a MacBook awake overnight?
Not if it is on power, on a hard surface with good ventilation, and the room is between 10 and 35 °C (50 to 95 °F), the range Apple gives for Mac laptops. Apple notes that preventing sleep may increase power consumption.
Does keeping a Mac awake drain the battery?
Yes. Apple's sleep settings page says delaying or preventing sleep may increase power consumption. If you don't need to see the screen, hold only the system (caffeinate -i) and let the display turn off.
Can a MacBook overheat in a bag?
A MacBook normally sleeps when its lid closes, so a closed laptop in a bag is usually asleep. If a closed-lid tool or a failed sleep keeps it running, Apple's ventilation rules are not met. Check that it slept before you pack it.
Should I keep my MacBook plugged in all the time?
Apple's Optimized Battery Charging delays charging past 80 percent when it predicts a long time on power, and Charge Limit (macOS Tahoe 26.4 or later, Apple silicon) caps the charge between 80 and 100 percent.
Does caffeinate stop when the battery is low?
caffeinate has no battery option. Apple's power-assertion header says the system may still sleep for low battery, lid close or the Apple menu while an idle-sleep assertion is held. Use a timeout or an app with a battery floor.


