Disable MacOS going to sleep Use-cases let local Claud Code run with laptop lid closed, be connected to Internet via tethered mobile connection (via mobile phone) and with mobile Claude Code app, connect to the laptop to continue the session. That is useful in commuting, when carrying laptop. Purpose: let loads be running when Macbook's lid is closed and AC electricity is disconnected = carrying laptop in the bag / backup Set sudo pmset -a disablesleep 1 Verify sudo pmset -g To enable "go to sleep" sudo pmset -a disablesleep 0 Verify sudo pmset -g There is another widely used application for this purpose, but upon it's naming, it will be avoided on this page. Warnings: running laptop without sufficient colling might damage it author does not carry any responsibility on circumstances