Does Claude Code Stop When a Mac Sleeps?

A dark display is usually fine; full Mac sleep can pause the local Claude Code process, terminal commands, and network access.

Claude Code runs through a local terminal environment and can execute tools on your Mac. If only the display sleeps, the Mac may continue working. If macOS suspends the system, local processes and network activity generally pause until wake.

A browser screen wake lock is not the right guarantee for a terminal agent. Use macOS power settings or a scoped command such as caffeinate when a local task must continue unattended.

Which parts depend on your Mac

Claude Code process

The terminal client and its orchestration run locally, so system suspension can pause them.

Tool commands

Builds, tests, scripts, and file changes execute on the local machine unless your workflow explicitly uses remote compute.

Model requests

A request already accepted by a remote service may run remotely, but the client still needs to receive and act on its result.

Display sleep

Turning off the display alone does not necessarily suspend the Mac or its local processes.

Practical answer

Prevent system sleep, not merely display sleep, when Claude Code is running builds, tests, or tools locally. Let the display turn off if you do not need to watch it.

Frequently asked questions

Is keeping the screen on enough for Claude Code?

Not as a guarantee. Prevent full system sleep for long local tasks; the screen itself does not need to remain bright.

Can I use caffeinate on macOS?

Yes. macOS includes caffeinate for scoped sleep prevention. Review its options and stop it when the protected task finishes.

What happens after the Mac wakes?

Local processes often resume, but network requests, timeouts, and external tools may have failed and should be checked.

Sources and further reading